Skip to content

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_idstringrequired

    The store's ID, like store_01k8qs5s…. Apps get it with the install, in the OAuth redirect and the token response.

Headers

  • Idempotency-Keystring

    Send the same key to retry safely: the first answer is replayed for 24 hours.

  • shop-api-versionYYYY-MM

    The version to answer in. Without it, your app’s pinned version, else the newest.

Body

  • linesarray of objectsrequired

    1–50 lines.

  • discount_codesarray of strings
  • customerobject · or null

    Price for a signed-in customer; omit for a guest.

  • destinationobject · or null

    Where the order ships. Without it no tax rate or shipping applies.

  • shipping_rate_idstring · or null

    One of the returned delivery_options. Without it shipping isn't charged.

Returns

200 The priced cart.

Errors

  • 403forbiddenMissing permission.
  • 409Store data in another currency.
  • 422validation_failedValidation failed.