v52

latestOpenAPI 3.0.0raw.githubusercontent.com2026-08-014683.0 MB
Shopping cart

Cart 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 guide to check the available fields.

Permissions

This endpoint does not require authentication or permissions.

post/api/checkout/pub/orderForms/simulation

Query parameters

RnbBehaviorinteger

This parameter defines which promotions apply to the simulation. Use 0 for simulations at cart stage, which means all promotions apply. In case of window simulation use 1, which indicates promotions that apply nominal discounts over the total purchase value shouldn't be considered on the simulation.

Note that if this not sent, the parameter is 1.

scinteger
Example:1

Trade Policy (Sales Channel) identification.

individualShippingEstimatesboolean
Example:true

Shows the product's estimated shipping date in the shippingEstimate field from the orderForm.

Headers

Content-Typestring required

Type of the content being sent.

Acceptstring required

HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand.

Request body

countrystring

Three letter ISO code of the country of the shipping address. This value must be sent along with the postalCode or geoCoordinates values.

postalCodestring

Postal code.

geoCoordinatesnumber[]

Array containing two floats with geocoordinates, first longitude, then latitude.

allowedOutdatedDatastring[]

Array of allowed data that can be skipped in the cart simulation.

Example request

{
  "items": [
    {
      "id": "1",
      "quantity": 1,
      "seller": "1"
    }
  ],
  "country": "BRA",
  "postalCode": "12345-000",
  "geoCoordinates": [
    -47.924747467041016,
    -15.832582473754883
  ]
}

Response

OK

selectableGiftsstring[]

Array containing the data of the items selected as a gift.

marketingDataobject nullable

Object containing promotion data such as coupon tracking information and internal or external UTMs.

postalCodestring nullable

Postal code.

countrystring

Three letter ISO code of the country of the shipping address.

All 46 operations