Request a list of prices
This endpoint will provide a list of all the Green Shipping Protection costs, based on the cart price range that they are associated with. This endpoint can be used to retrieve all of the cart value tiers, and their associated price and GSP variant information
If this endpoint is used, it will be up to your implementation to properly select the correct variant, and add it to the customer cart for purchase.
Because Corso assumes 2-digit precision across all API's, checking for inclusion in a range should be performed by verifying that a value is "greater than or equal to". For example, cartValue >= rangeMin && cartValue <= rangeMax
should be used rather than cartValue > rangeMin && cartValue < rangeMax
. A side-effect of this approach is that if a cart has a value of 23.9999, this approach will not match on a tier - so a maximum of 2 digits of precision should be used when performing any comparisons.
Any currency conversions are performed dynamically. The "source of truth" for the cart value ranges as well as the GSP prices is always stored in USD, and converted as needed. As the exchange rate evolves between USD and your store currency, the values of rangeMin, rangeMax, and cost will evolve as well. Corso updates our exchange rates on no less than a daily basis. Depending on the approach used by your store to manage the pricing of the GSP variants, the price you are set to charge customers may not line up with the amount quoted by Corso.
Path Parameters
- shopId string required
A UUID belonging to the store
Query Parameters
- currencyCode string required
- 200
- 400
- 404
OK
- application/json
- Schema
- Example (from schema)
Schema
prices object[] required
Array [cost string requiredThe cost to protect the quoted order, in the currency specified in the request
productId string nullable requiredIdentifier of the store's Green Shipping Protection product. This product will be added to the order to complete the protection purchase on that order
variantId string requiredIdentifier of the product variant that represents the cost of protection as quoted. When the Green Shipping Protection product is added, having the correct variant will ensure that the correct amount is paid by the customer.
product string deprecatedThis field is deprecated, please use 'productId' instead
variant string deprecatedThis field is deprecated, please use 'variantId' instead
currencyCode string nullable requiredThe 3 letter currency code of the provided cost (in ISO 4217 format).
rangeMin string requiredThe lower end, or minimum (inclusive) of the cart value range for a tier.
rangeMax string requiredThe upper end, or maximum (inclusive) of the cart value range for a tier.
]
{
"prices": [
{
"cost": "1.25",
"productId": "5184895212",
"variantId": "3487998736",
"currencyCode": "USD",
"rangeMin": "string",
"rangeMax": "string"
}
]
}
Bad Request
Not Found