Cart

Estimate shipping methods and tax

Estimates shipping and tax for the cart of the Bearer token from a country, state and postcode, without saving an address. Returns the cart with shippingMethods, the methods available for that address. Send shippingMethod to price one of them into the totals.

post/estimate-shippings

Request

Headers

X-STOREFRONT-KEYstring required

Storefront API Key for authentication. Required for all shop/storefront API requests.

X-Localestring
Example:en

Locale code for localized data (e.g. "en", "fr", "ar"). Defaults to channel's default locale.

X-Channelstring
Example:default

Channel code (e.g. "default"). Defaults to the current channel.

X-Currencystring
Example:USD

Currency code (e.g. "USD", "EUR", "INR"). Defaults to channel's base currency.

Request body

countrystring required
statestring required
postcodestring required
shippingMethodstring

Example request

{
  "country": "US",
  "state": "CA",
  "postcode": "90001",
  "shippingMethod": "flatrate_flatrate"
}

Response

Returns the full cart.

idinteger nullable
cartTokenstring nullable

Cart token for guest users

customerIdinteger nullable
channelIdinteger nullable
itemsCountinteger nullable
subtotalnumber nullable

Subtotal before discounts and taxes

baseSubtotalnumber nullable
discountAmountnumber nullable

Total discount amount

baseDiscountAmountnumber nullable
taxAmountnumber nullable

Total tax amount

baseTaxAmountnumber nullable
shippingAmountnumber nullable

Shipping cost

baseShippingAmountnumber nullable
grandTotalnumber nullable

Grand total

baseGrandTotalnumber nullable
formattedSubtotalstring nullable

Formatted subtotal price

formattedDiscountAmountstring nullable

Formatted discount amount

formattedTaxAmountstring nullable

Formatted tax amount

formattedShippingAmountstring nullable

Formatted shipping amount

formattedGrandTotalstring nullable

Formatted grand total price

couponCodestring nullable

Applied coupon code

miniCartOfferInfoEnabledboolean nullable

Whether to show the mini cart offer: the mini cart is switched on and an offer text is set (Sales > Checkout > Mini Cart)

miniCartOfferInfostring nullable

The mini cart offer text for the requested channel and locale (Sales > Checkout > Mini Cart > Offer Info)

shippingMethodsobject[] nullable

Shipping methods available for the estimate address. Returned by estimate shipping only.

successboolean nullable
messagestring nullable
sessionTokenstring nullable

Unique session token for guest cart

isGuestboolean

Is this a guest cart

itemsQtyinteger nullable

Total quantity of all items

subTotalInclTaxnumber nullable

Subtotal including tax

baseSubTotalInclTaxnumber nullable

Base subtotal including tax

formattedSubTotalInclTaxstring nullable

Formatted subtotal including tax

taxTotalnumber nullable

Tax total

formattedTaxTotalstring nullable

Formatted tax total

shippingAmountInclTaxnumber nullable

Shipping amount including tax

baseShippingAmountInclTaxnumber nullable

Base shipping amount including tax

formattedShippingAmountInclTaxstring nullable

Formatted shipping amount including tax

haveStockableItemsboolean nullable

Has stockable items

paymentMethodstring nullable

Payment method code

paymentMethodTitlestring nullable

Payment method title

selectedShippingRatestring nullable

Selected shipping rate

selectedShippingRateTitlestring nullable

Selected shipping rate title

paymentRedirectUrlstring nullable

Payment redirect URL (if payment gateway redirect needed)

orderIdstring nullable

Order ID after order creation

redirectUristring nullable

Redirect URL for buy now checkout

redirectboolean nullable

True when the selected payment method requires the shopper to be sent to a payment page before the order is created

redirectUrlstring nullable

Redirect URL for payment gateway

orderIncrementIdstring nullable

Order ID after successful order creation

Changes