Preview pricing
POST
/ admin/ v1/ stores/ {store_id}/ pricing/ preview- Idempotency-Key supported
Price a cart exactly as checkout will: catalog prices, entered codes and automatic discounts, taxes for the destination and the chosen delivery option. Nothing is saved. and products:read.
Path parameters
store_idstringrequiredThe store's ID, like
store_01k8qs5s…. Apps get it with the install, in the OAuth redirect and the token response.
Headers
Idempotency-KeystringSend the same key to retry safely: the first answer is replayed for 24 hours.
shop-api-versionYYYY-MMThe version to answer in. Without it, your app’s pinned version, else the newest.
Body
linesarray of objectsrequired1–50 lines.
discount_codesarray of stringscustomerobject · or nullPrice for a signed-in customer; omit for a guest.
destinationobject · or nullWhere the order ships. Without it no tax rate or shipping applies.
shipping_rate_idstring · or nullOne of the returned
delivery_options. Without it shipping isn't charged.
Returns
200 The priced cart.
Errors
- 403
forbiddenMissing permission. - 409Store data in another currency.
- 422
validation_failedValidation failed.