---
title: "Estimate shipping methods and tax"
method: POST
path: "/estimate-shippings"
tags: ["Cart"]
---

# Estimate shipping methods and tax

`POST /estimate-shippings`

## Request

- Base URL: `http://localhost:8000/api/shop`
- URL: `http://localhost:8000/api/shop/estimate-shippings`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/bagisto/apis/bagisto-shop-api/docs/estimate-shippings/post.ts> (a function with typed inputs; its response is checked against the schema)

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.

## Headers

- `X-STOREFRONT-KEY` string, required
- `X-Locale` string
- `X-Channel` string
- `X-Currency` string

## Request body

- object
  - `country` string, required
  - `state` string, required
  - `postcode` string, required
  - `shippingMethod` string

## Response `201`

Returns the full cart.

- EstimateShippingCartDataMutation: EstimateShipping - GraphQL API Resource for Estimating Shipping Methods and Tax Provides mutation for estimating shipping methods and tax based on address.
  - `id` integer, nullable
  - `cartToken` string, nullable: Cart token for guest users
  - `customerId` integer, nullable
  - `channelId` integer, nullable
  - `itemsCount` integer, nullable
  - `items` CartItemDataMutation[]: Individual cart items
    - `id` integer, nullable
    - `cartId` integer, nullable
    - `productId` integer, nullable
    - `name` string, nullable
    - `sku` string, nullable
    - `quantity` integer, nullable
    - `price` number, nullable
    - `basePrice` number, nullable
    - `total` number, nullable
    - `baseTotal` number, nullable
    - `discountAmount` number, nullable
    - `baseDiscountAmount` number, nullable
    - `taxAmount` number, nullable
    - `baseTaxAmount` number, nullable
    - `options` unknown[], nullable
      - unknown
    - `type` string, nullable
    - `formattedPrice` string, nullable
    - `formattedTotal` string, nullable
    - `priceInclTax` number, nullable
    - `basePriceInclTax` number, nullable
    - `formattedPriceInclTax` string, nullable
    - `totalInclTax` number, nullable
    - `baseTotalInclTax` number, nullable
    - `formattedTotalInclTax` string, nullable
    - `baseImage` string, nullable
    - `productUrlKey` string, nullable
    - `canChangeQty` boolean, nullable
  - `subtotal` number, nullable: Subtotal before discounts and taxes
  - `baseSubtotal` number, nullable
  - `discountAmount` number, nullable: Total discount amount
  - `baseDiscountAmount` number, nullable
  - `taxAmount` number, nullable: Total tax amount
  - `baseTaxAmount` number, nullable
  - `shippingAmount` number, nullable: Shipping cost
  - `baseShippingAmount` number, nullable
  - `grandTotal` number, nullable: Grand total
  - `baseGrandTotal` number, nullable
  - `formattedSubtotal` string, nullable: Formatted subtotal price
  - `formattedDiscountAmount` string, nullable: Formatted discount amount
  - `formattedTaxAmount` string, nullable: Formatted tax amount
  - `formattedShippingAmount` string, nullable: Formatted shipping amount
  - `formattedGrandTotal` string, nullable: Formatted grand total price
  - `couponCode` string, nullable: Applied coupon code
  - `miniCartOfferInfoEnabled` boolean, nullable: Whether to show the mini cart offer: the mini cart is switched on and an offer text is set (Sales > Checkout > Mini Cart)
  - `miniCartOfferInfo` string, nullable: The mini cart offer text for the requested channel and locale (Sales > Checkout > Mini Cart > Offer Info)
  - `shippingMethods` object[], nullable: Shipping methods available for the estimate address. Returned by estimate shipping only.
  - `success` boolean, nullable
  - `message` string, nullable
  - `carts` unknown[], nullable
    - unknown
  - `sessionToken` string, nullable: Unique session token for guest cart
  - `isGuest` boolean: Is this a guest cart
  - `itemsQty` integer, nullable: Total quantity of all items
  - `subTotalInclTax` number, nullable: Subtotal including tax
  - `baseSubTotalInclTax` number, nullable: Base subtotal including tax
  - `formattedSubTotalInclTax` string, nullable: Formatted subtotal including tax
  - `taxTotal` number, nullable: Tax total
  - `formattedTaxTotal` string, nullable: Formatted tax total
  - `shippingAmountInclTax` number, nullable: Shipping amount including tax
  - `baseShippingAmountInclTax` number, nullable: Base shipping amount including tax
  - `formattedShippingAmountInclTax` string, nullable: Formatted shipping amount including tax
  - `billingAddress` unknown[], nullable: Billing address
    - unknown
  - `shippingAddress` unknown[], nullable: Shipping address
    - unknown
  - `appliedTaxes` unknown[], nullable: Applied taxes
    - unknown
  - `haveStockableItems` boolean, nullable: Has stockable items
  - `paymentMethod` string, nullable: Payment method code
  - `paymentMethodTitle` string, nullable: Payment method title
  - `selectedShippingRate` string, nullable: Selected shipping rate
  - `selectedShippingRateTitle` string, nullable: Selected shipping rate title
  - `paymentRedirectUrl` string, nullable: Payment redirect URL (if payment gateway redirect needed)
  - `orderId` string, nullable: Order ID after order creation
  - `redirectUri` string, nullable: Redirect URL for buy now checkout
  - `redirect` boolean, nullable: True when the selected payment method requires the shopper to be sent to a payment page before the order is created
  - `redirectUrl` string, nullable: Redirect URL for payment gateway
  - `orderIncrementId` string, nullable: Order ID after successful order creation

## Other responses

- `400`: Missing or invalid input.
- `404`: Cart not found for the Bearer token.
- `422`: Validation Error

## Changes

- **2026-10-28** `52d9bb5c7a63`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/bagisto/apis/bagisto-shop-api/changes/estimate-shippings/post.md)

---

[API](https://skmtc.dev/bagisto/apis/bagisto-shop-api.md) - [All operations](https://skmtc.dev/bagisto/apis/bagisto-shop-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bagisto/apis/bagisto-shop-api/revisions/f619df36bf29?raw)
