---
title: "Cart simulation"
method: POST
path: "/api/checkout/pub/orderForms/simulation"
tags: ["Shopping cart"]
---

# Cart simulation

`POST /api/checkout/pub/orderForms/simulation`

This endpoint is used to simulate a cart in VTEX Checkout.

It receives an SKU ID, the quantity of items in the cart and the seller ID.

It returns all information about the cart, such as the selling price of each item, pricing and promotion data, payment and logistics info.

This request is useful whenever you need to know the availability of fulfilling an order for a specific cart setting, since the API response will let you know the updated price, inventory and shipping data.

>⚠️ The fields (`sku id`, `quantity`, `seller`, `country`, `postalCode` and `geoCoordinates`) are just examples of content that you can simulate in your cart. You can add more fields to the request as per your need. Access the [orderForm](https://developers.vtex.com/docs/guides/orderform-fields) guide to check the available fields.

## Permissions

This endpoint does not require [authentication](https://developers.vtex.com/docs/guides/authentication) or [permissions](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3).

## Query parameters

- `RnbBehavior` integer
- `sc` integer
- `individualShippingEstimates` boolean

## Headers

- `Content-Type` string, required
- `Accept` string, required

## Request body

- object
  - `items` object[] — Array containing information about the SKUs inside the cart to be simulated.
    - `id` string, required — The SKU ID.
    - `quantity` integer, required — The quantity of items of this specific SKU in the cart to be simulated.
    - `seller` string, required — The ID of the seller responsible for this SKU. This ID can be found in your VTEX Admin.
  - `country` string — Three letter ISO code of the country of the shipping address. This value must be sent along with the `postalCode` or `geoCoordinates` values.
  - `postalCode` string — Postal code.
  - `geoCoordinates` number[] — Array containing two floats with geocoordinates, first longitude, then latitude.
  - `allowedOutdatedData` string[] — Array of allowed data that can be skipped in the cart simulation.

## Response `200`

OK

- object
  - `items` object[] — Information on each item in the cart.
    - `id` string — ID of the item.
    - `requestIndex` integer — Request index information.
    - `quantity` integer — The quantity of the item the cart.
    - `seller` string — The seller responsible for the SKU.
    - `sellerChain` string[] — Sellers involved in the chain. The list should contain only one seller, unless it is a [Multilevel Omnichannel Inventory](https://help.vtex.com/en/tutorial/multilevel-omnichannel-inventory--7M1xyCZWUyCB7PcjNtOyw4) order.
    - `tax` integer — Tax value in cents.
    - `taxCode` string — A unique identifier code assigned to a tax within the VTEX Admin.
    - `priceValidUntil` string — Price expiration date and time.
    - `price` integer — Price in cents.
    - `listPrice` integer — List price in cents.
    - `rewardValue` integer — Reward value in cents.
    - `sellingPrice` integer — Selling price in cents. Note that this field may be subject to rounding discrepancies. We recommend retrieving data from the `priceDefinition` data structure instead.
    - `offerings` object[] — Array containing offering information of SKU service. A service is an item that may come with a product, optionally and with cost. It is used to assign a value of an additional service itself to an SKU.
      - `type` string — Service type.
      - `id` string — Service type ID.
      - `name` string — Name of the service type.
      - `allowGiftMessage` boolean — Option to display the service type on the gift card.
      - `attachmentOfferings` object[], nullable — List of attachments details.
        - `name` string, nullable, required — Name of the attachment.
        - `required` boolean, nullable, required — Defines if the attachment is required (`true`) or not (`false`).
        - `schema` object, nullable, required — Custom values [created into attachment](https://help.vtex.com/en/tutorial/adding-an-attachment--7zHMUpuoQE4cAskqEUWScU).
      - `price` integer — Service type price.
    - `priceTags` object[] — Array of price tags, each of which, modifies the price in some way, like discounts or taxes that apply to the item in the context of the order.
      - `identifier` string, nullable — Promotion unique identifier.
      - `isPercentual` boolean — Indicates whether the `value` and `rawValue` of the price tag represent a percentage to be applied during checkout calculation. The default value is `false`. When set to `true`, the `value` and `rawValue` fields are interpreted as percentages, and the final price is calculated accordingly.
      - `name` string — Price tag name in the format: `{type}@{where}-{identifier}#{calculationId}`. Where: - `type` indicates whether the tag refers to a discount or tax. - `where` specifies the context, either price or shipping. - `identifier` is the promotion ID. - `calculationId` is a hash that may vary with each price calculation.
      - `rawValue` number — Raw price tag value with up to five decimals, sourced from the promotion configuration. This value is informational only and is not used in checkout calculations.
      - `value` integer — Price tag value representing either a promotion (value decrease) or a tax (value increase).
    - `measurementUnit` string — Measurement unit.
    - `unitMultiplier` integer — Unit multiplier.
    - `parentItemIndex` integer, nullable — Parent item index.
    - `parentAssemblyBinding` string, nullable — Parent assembly binding.
    - `availability` string — Availability.
    - `priceDefinition` object — Price information for all units of a specific item.
      - `calculatedSellingPrice` integer — Item's calculated unitary selling price in cents.
      - `total` integer — Total value for all units of the item in cents.
      - `sellingPrices` object[] — Array of objects, each containing value (in cents) and quantity for the different rounding instances that can be combined to form the correctly rounded total.
        - `value` integer — Value in cents for that specific rounding.
        - `quantity` integer — Rounding quantity, meaning how many items are rounded to this value.
  - `ratesAndBenefitsData` object — Information on pricing and promotions that apply to the order.
    - `rateAndBenefitsIdentifiers` string[] — List with pricing and promotions identifiers.
    - `teaser` string[] — List with pricing and promotions teaser.
  - `paymentData` object — Payment data information.
    - `installmentOptions` object[] — List of Installment options.
      - `paymentSystem` integer — Payment system identification.
      - `bin` string, nullable — Card bin.
      - `paymentName` string, nullable — Payment name.
      - `paymentGroupName` string, nullable — Payment group name.
      - `value` integer — Total value assigned to this payment.
      - `installments` object[] — Installment information.
        - `count` integer — Count information.
        - `hasInterestRate` boolean — Indicates whether the payment has interest.
        - `interestRate` integer — Interest rate value.
        - `value` integer — Value of the order without the interest rate. The value is shown without separating cents.
        - `total` integer — Total value of the order without separating cents. For example, $24.99 is represented `2499`.
        - `sellerMerchantInstallments` object[] — Seller merchant installments information.
    - `paymentSystems` object[] — Information on payment systems.
      - `id` integer — Payment system ID.
      - `name` string — Payment system name.
      - `groupName` string — Payment group name.
      - `validator` object, nullable — Payment system validator.
      - `stringId` string — String ID.
      - `template` string — Template.
      - `requiresDocument` boolean — Indicates whether a document is required.
      - `displayDocument` boolean — Indicates whether a document is shown.
      - `isCustom` boolean — Indicates whether it is custom.
      - `description` string — Description.
      - `requiresAuthentication` boolean — Indicates whether a authentication is required.
      - `dueDate` string — Payment due date.
      - `availablePayments` string, nullable — Availability of payment.
    - `payments` object[] — Array with information on each payment chosen by the shopper.
      - `paymentSystem` integer — Payment system ID.
      - `paymentSystemName` string — Payment system name.
      - `group` string — Payment system group.
      - `installments` integer — Selected number of installments.
      - `installmentsInterestRate` number — Installments' interest rate.
      - `installmentsValue` integer — Value of the installments.
      - `value` integer — Total value assigned to this payment.
      - `referenceValue` integer — Reference value used to calculate total order value with interest.
      - `hasDefaultBillingAddress` boolean — Indicates whether billing address for this payment is the default address.
    - `giftCards` string[] — Gift card information, if it applies to the order.
    - `giftCardMessages` string[] — Array of gift card messages.
    - `availableAccounts` string[] — Available accounts.
    - `availableTokens` string[] — Available tokens.
    - `availableAssociations` object — Available associations.
  - `selectableGifts` string[] — Array containing the data of the items selected as a gift.
  - `marketingData` object, nullable — Object containing promotion data such as coupon tracking information and internal or external UTMs.
  - `postalCode` string, nullable — Postal code.
  - `country` string — Three letter ISO code of the country of the shipping address.
  - `logisticsInfo` object[] — Array with logistics information on each item of the `items` array in the `orderForm`.
    - `itemIndex` integer — Index of item in items array.
    - `addressId` string, nullable — Address ID.
    - `selectedSla` string, nullable — Selected SLA. For example, `normal` or `express`. If the store uses the [Delivery Options](https://help.vtex.com/en/docs/tutorials/delivery-options-beta) feature, this field returns the delivery option ID selected for this SLA, as the example `1223d5b4-52a4-442f-ab23-01345b60be48`.
    - `selectedDeliveryChannel` string, nullable — Delivery channel selected by the customer. For example, `"delivery"` or `"pickup-in-point"`.
    - `quantity` integer — Quantity.
    - `shipsTo` string[] — List of countries that the item may be shipped to.
    - `slas` object[] — Information on available SLAs.
      - `id` string — SLA ID. If the store uses the [Delivery Options](https://help.vtex.com/en/docs/tutorials/delivery-options-beta) feature, this field returns the delivery option ID selected for this SLA, as the example `1223d5b4-52a4-442f-ab23-01345b60be48`.
      - `deliveryChannel` string — Delivery channel.
      - `name` string — SLA name. If the store uses the [Delivery Options](https://help.vtex.com/en/docs/tutorials/delivery-options-beta) feature, the value of this field will show the specific delivery option name selected for this SLA, as the example `Delivery | BRA | Up to 30 hours`.
      - `deliveryIds` object[] — Information on each delivery ID.
        - `courierId` string — Courier ID.
        - `warehouseId` string — Warehouse ID.
        - `dockId` string — Warehouse ID.
        - `courierName` string — Courier name.
        - `quantity` integer — Quantity.
      - `attachmentOfferings` object[], nullable — List of attachments details.
        - `name` string, nullable, required — Name of the attachment.
        - `required` boolean, nullable, required — Defines if the attachment is required (`true`) or not (`false`).
        - `schema` object, nullable, required — Custom values [created into attachment](https://help.vtex.com/en/tutorial/adding-an-attachment--7zHMUpuoQE4cAskqEUWScU).
      - `shippingEstimate` string — Shipping estimate. For instance, "three business days" will be represented as `3bd`. The unit can be `bd` for business days, `d` for days, `h` for hours, or `m` for minutes.
      - `shippingEstimateDate` string, nullable — When using the query parameter `individualShippingEstimates=true`, it will contain the estimated shipping date (e.g. `2023-09-09T11:29:00+00:00`), otherwise it will contain `null`.
      - `useIndividualShippingEstimates` boolean — Shows the product's estimated shipping date in the `shippingEstimate` field from the `orderForm`.
      - `lockTTL` string, nullable — Estimate date of delivery.
      - `availableDeliveryWindows` object — This object contains information about the delivery window available to the shopper.
        - `startDateUtc` string — Delivery window starting day and time in UTC.
        - `endDateUtc` string — Delivery window ending day and time in UTC.
        - `price` integer — Delivery window price.
        - `lisPrice` integer — Delivery window list price.
        - `tax` integer — Delivery window tax.
      - `deliveryWindow` object — In case of scheduled delivery, this object will contain information on the delivery window selected by the shopper.
        - `startDateUtc` string — Delivery window starting day and time in UTC.
        - `endDateUtc` string — Delivery window ending day and time in UTC.
        - `price` integer — Delivery window price.
        - `lisPrice` integer — Delivery window list price.
        - `tax` integer — Delivery window tax.
      - `price` integer — Price in cents.
      - `listPrice` integer — List price in cents.
      - `tax` integer — Tax in cents.
      - `pickupStoreInfo` object — Information on the pickup store.
        - `isPickupStore` boolean — Indicates whether it is the pickup store.
        - `friendlyName` string, nullable — Friendly name.
        - `address` object, nullable — Address information.
        - `additionalInfo` string, nullable — Additional information.
        - `dockId` string, nullable — Corresponding dock ID.
      - `pickupPointId` string, nullable — Pickup point ID.
      - `pickupDistance` integer — Pickup point distance.
      - `polygonName` string, nullable — Polygon name.
      - `transitTime` string — Transit time. For instance, "three business days" is represented as `3bd`.
    - `deliveryChannels` object[] — List of available delivery channels.
      - `id` string — Delivery channel ID.
    - `messages` string[] — Array containing an object for each message generated by our servers while processing the request.
    - `purchaseConditions` object — Purchase conditions information.
      - `itemPurchaseConditions` object[] — List of objects containing purchase condition information on each item in the order.
        - `id` string — Unique ID of the item in the cart. This ID is generated by VTEX and is used to identify the item in the cart.
        - `seller` string — Seller.
        - `sellerChain` string[] — Sellers involved in the chain. The list should contain only one seller, unless it is a [Multilevel Omnichannel Inventory](https://help.vtex.com/en/tutorial/multilevel-omnichannel-inventory--7M1xyCZWUyCB7PcjNtOyw4) order.
        - `slas` object[] — Information on available SLAs.
          - `id` string — SLA ID. If the store uses the [Delivery Options](https://help.vtex.com/en/docs/tutorials/delivery-options-beta) feature, this field returns the delivery option ID selected for this SLA, as the example `1223d5b4-52a4-442f-ab23-01345b60be48`.
          - `deliveryChannel` string — Delivery channel.
          - `name` string — SLA name. If the store uses the [Delivery Options](https://help.vtex.com/en/docs/tutorials/delivery-options-beta) feature, the value of this field will show the specific delivery option name selected for this SLA, as the example `Delivery | BRA | Up to 30 hours`.
          - `deliveryIds` object[] — Information on each delivery ID.
            - `courierId` string — Courier ID.
            - `warehouseId` string — Warehouse ID.
            - `dockId` string — Warehouse ID.
            - `courierName` string — Courier name.
            - `quantity` integer — Quantity.
          - `attachmentOfferings` object[], nullable — List of attachments details.
            - `name` string, nullable, required — Name of the attachment. Ex. `vtex.subscription.weekly`.
            - `required` boolean, nullable, required — Defines if the attachment is required (`true`) or not (`false`).
            - `schema` object, nullable, required — Custom values [created into attachment](https://help.vtex.com/en/tutorial/adding-an-attachment--7zHMUpuoQE4cAskqEUWScU).
          - `shippingEstimate` string — Shipping estimate. For instance, "three business days" will be represented as `3bd`. The unit can be `bd` for business days, `d` for days, `h` for hours, or `m` for minutes.
          - `shippingEstimateDate` string, nullable — When using the query parameter `individualShippingEstimates=true`, it will contain the estimated shipping date (e.g. `2023-09-09T11:29:00+00:00`), otherwise it will contain `null`.
          - `useIndividualShippingEstimates` boolean — Shows the product's estimated shipping date in the `shippingEstimate` field from the `orderForm`.
          - `lockTTL` string, nullable — Estimate date of delivery.
          - `availableDeliveryWindows` object — This object contains information about the delivery window available to the shopper.
            - `startDateUtc` string — Delivery window starting day and time in UTC.
            - `endDateUtc` string — Delivery window ending day and time in UTC.
            - `price` integer — Delivery window price.
            - `lisPrice` integer — Delivery window list price.
            - `tax` integer — Delivery window tax.
          - `deliveryWindow` object — In case of scheduled delivery, this object will contain information on the delivery window selected by the shopper.
            - `startDateUtc` string — Delivery window starting day and time in UTC.
            - `endDateUtc` string — Delivery window ending day and time in UTC.
            - `price` integer — Delivery window price.
            - `lisPrice` integer — Delivery window list price.
            - `tax` integer — Delivery window tax.
          - `price` integer — Price in cents.
          - `listPrice` integer — List price in cents.
          - `tax` integer — Tax in cents.
          - `pickupStoreInfo` object — Information on the pickup store.
            - `isPickupStore` boolean — Indicates whether it is the pickup store.
            - `friendlyName` string, nullable — Friendly name.
            - `address` object, nullable — Address information.
            - `additionalInfo` string, nullable — Additional information.
            - `dockId` string, nullable — Corresponding dock ID.
          - `pickupPointId` string, nullable — Pickup point ID.
          - `pickupDistance` integer — Pickup point distance.
          - `polygonName` string, nullable — Polygon name.
          - `transitTime` string — Transit time. For instance, "three business days" is represented as `3bd`.
        - `price` integer — Price in cents.
        - `listPrice` integer — List price in cents.
    - `pickupPoints` string[] — Array containing pickup points information.
    - `subscriptionData` object, nullable — Subscription information.
    - `totals` object[] — Information on order totals.
      - `id` string — Total ID.
      - `name` string — Total name.
      - `value` integer — Total value.
    - `itemMetadata` object — Item metadata.
      - `items` object[] — List of objects containing metadata on each item in the order.
        - `id` string — Unique ID of the item in the cart. This ID is generated by VTEX and is used to identify the item in the cart.
        - `seller` string — Seller.
        - `assemblyOptions` string[] — Assembly options information.

---

[API](https://skmtc.net/vtex/apis/checkout-api.md) · [All operations](https://skmtc.net/vtex/apis/checkout-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/vtex/checkout-api/versions/fc777477b318/schema)
