VTEX Shopping Cart API

The Shopping Cart API from VTEX — 11 operation(s) for shopping cart.

Documentation

📖
Documentation
https://developers.vtex.com/docs/guides/how-the-integration-protocol-between-vtex-and-antifraud-companies-works
📖
Documentation
https://developers.vtex.com/docs/guides/bulk-import-buyer-organizations-spreadsheet
📖
Documentation
https://developers.vtex.com/docs/guides/catalog-api-seller-portal-overview
📖
Documentation
https://developers.vtex.com/docs/guides/catalog-overview
📖
Documentation
https://developers.vtex.com/docs/guides/checkout-overview
📖
Documentation
https://help.vtex.com/en/tutorial/customer-credit-overview--1uIqTjWxIIIEW0COMg4uE0
📖
Documentation
https://help.vtex.com/en/tutorial/data-subject-rights--6imchxTx09icupKMbzHVIM
📖
Documentation
https://developers.vtex.com/docs/api-reference/do-api
📖
Documentation
https://developers.vtex.com/docs/guides/managing-vtex-gift-cards
📖
Documentation
https://developers.vtex.com/docs/guides/gift-card-integration-guide
📖
Documentation
https://developers.vtex.com/docs/guides/faststore/headless-cms-overview
📖
Documentation
https://developers.vtex.com/docs/api-reference/vtex-id-api
📖
Documentation
https://help.vtex.com/en/tracks/vtex-intelligent-search--19wrbB7nEQcmwzDPl1l4Cb/3qgT47zY08biLP3d5os3DG
📖
Documentation
https://developers.vtex.com/docs/apps/vtex.search@1.0.8
📖
Documentation
https://help.vtex.com/en/tracks/cms--2YcpgIljVaLVQYMzxQbc3z/1oN446gRGcR2s70RvBCAmj
📖
Documentation
https://developers.vtex.com/docs/guides/search-overview
📖
Documentation
https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3
📖
Documentation
https://developers.vtex.com/docs/guides/fulfillment
📖
Documentation
https://developers.vtex.com/docs/guides/marketplace-overview
📖
Documentation
https://developers.vtex.com/updates/release-notes/marketplace-protocol-documentation-update
📖
Documentation
https://developers.vtex.com/docs/guides/external-marketplace-integration-guide
📖
Documentation
https://developers.vtex.com/docs/guides/external-seller-integration-connector
📖
Documentation
https://developers.vtex.com/docs/guides/external-seller-integration-guide
📖
Documentation
https://help.vtex.com/en/tutorial/master-data--4otjBnR27u4WUIciQsmkAw
📖
Documentation
https://help.vtex.com/en/tutorial/understanding-the-message-center--tutorials_84
📖
Documentation
https://developers.vtex.com/docs/guides/orders-overview
📖
Documentation
https://developers.vtex.com/docs/guides/changes-in-vtex-features-behavior-to-handle-pii-data
📖
Documentation
https://help.vtex.com/en/tutorial/payment-provider-protocol--RdsT2spdq80MMwwOeEq0m
📖
Documentation
https://developers.vtex.com/docs/guides/payments-integration-guide
📖
Documentation
https://help.vtex.com/en/tutorial/vtex-pick-and-pack-last-mile--HN7WKV0xoq2ssVjsJlfzr
📖
Documentation
https://developers.vtex.com/docs/guides/vtex-io-documentation-policies
📖
Documentation
https://developers.vtex.com/docs/guides/pricing-hub
📖
Documentation
https://developers.vtex.com/docs/guides/pricing-overview
📖
Documentation
https://developers.vtex.com/docs/guides/profile-system
📖
Documentation
https://developers.vtex.com/docs/guides/promotions-overview
📖
Documentation
https://developers.vtex.com/docs/apps/vtex.reviews-and-ratings
📖
Documentation
https://developers.vtex.com/docs/guides/sent-offers-integration-guide-connectors
📖
Documentation
https://developers.vtex.com/docs/guides/sessions-system-overview
📖
Documentation
https://developers.vtex.com/docs/guides/vtex-shipping-network
📖
Documentation
https://help.vtex.com/en/tutorial/sku-bindings--1SmrVgNwjJX17hdqwLa0TX
📖
Documentation
https://developers.vtex.com/docs/guides/subscriptions
📖
Documentation
https://developers.vtex.com/docs/apps/vtex.search/suggestions
📖
Documentation
https://developers.vtex.com/docs/guides/vtex-tracking

Specifications

OpenAPI Specification

vtex-shopping-cart-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: VTex Anti-fraud Provider Account Shopping Cart API
  description: ">ℹ️ Onboarding guide\r\n>\r\n> Check the new [Payments onboarding guide](https://developers.vtex.com/docs/guides/payments-overview). We created this guide to improve the onboarding experience for developers at VTEX. It assembles all documentation on our Developer Portal about Payments and is organized by focusing on the developer's journey.\r\n\r\nThe Anti-fraud Provider Protocol is a set of definitions to help you integrate your anti-fraud service API into VTEX platform.\r\n\r\nTo achieve this, you need to implement a web API (REST) following the specifications described in this documentation.\r\n\r\n>⚠️ You can also access our [template on GitHub](https://github.com/vtex-apps/antifraud-provider-example) to help you quickly develop your anti-fraud connector using the Anti-fraud Provider Protocol and VTEX IO.\r\n\r\nTo learn more about the Anti-fraud Provider Protocol, check our [developer guide](https://developers.vtex.com/docs/guides/how-the-integration-protocol-between-vtex-and-antifraud-companies-works).\r\n\r\n## Anti-fraud Provider API Index\r\n\r\n### Anti-fraud  Flow\r\n\r\n- `POST` [Send Anti-fraud Pre-Analysis Data (optional)](https://developers.vtex.com/docs/api-reference/antifraud-provider-protocol#post-/pre-analysis)\r\n- `POST` [Send Anti-fraud Data](https://developers.vtex.com/docs/api-reference/antifraud-provider-protocol#post-/transactions)\r\n- `PUT` [Update Anti-fraud Transactions (optional)](https://developers.vtex.com/docs/api-reference/antifraud-provider-protocol#put-/transactions/-transactionId-)\r\n- `GET` [List Anti-fraud Provider Manifest](https://developers.vtex.com/docs/api-reference/antifraud-provider-protocol#get-/manifest)\r\n- `GET` [Get Anti-fraud Status](https://developers.vtex.com/docs/api-reference/antifraud-provider-protocol#get-/transactions/-transactions.id-)\r\n- `DELETE` [Stop Anti-fraud Analysis (optional)](https://developers.vtex.com/docs/api-reference/antifraud-provider-protocol#delete-/transactions/-transactions.Id-)\r\n\r\n### OAuth Flow\r\n\r\n1. `POST` [Retrieve Token](https://developers.vtex.com/docs/api-reference/antifraud-provider-protocol#post-/authorization/token)\r\n2. `GET` [Redirect](https://developers.vtex.com/docs/api-reference/antifraud-provider-protocol#get-/redirect)\r\n3. `GET` [Return to VTEX](https://developers.vtex.com/docs/api-reference/antifraud-provider-protocol#get-/authorizationCode)\r\n4. `GET` [Get Credentials](https://developers.vtex.com/docs/api-reference/antifraud-provider-protocol#get-/authorization/credentials)"
  version: '1.0'
servers:
- url: https://{providerApiEndpoint}
  description: Anti-fraud provider endpoint URL.
  variables:
    providerApiEndpoint:
      description: Anti-fraud provider endpoint URL.
      default: '{providerApiEndpoint}'
tags:
- name: Shopping Cart
paths:
  /api/checkout/pub/orderForms/simulation:
    post:
      tags:
      - Shopping Cart
      summary: VTex Cart simulation
      description: "This endpoint is used to simulate a cart in VTEX Checkout.\r\n\r\nIt receives an SKU ID, the quantity of items in the cart and the seller ID.\r\n\r\nIt returns all information about the cart, such as the selling price of each item, pricing and promotion data, payment and logistics info.\r\n\r\nThis 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.\r\n\r\n>⚠️ 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.\r\n\r\n## Permissions\r\n\r\nThis endpoint does not require [authentication](https://developers.vtex.com/docs/guides/authentication) or [permissions](https://help.vtex.com/en/tutorial/license-manager-resources--3q6ztrC8YynQf6rdc6euk3)."
      operationId: CartSimulation
      security: []
      parameters:
      - $ref: '#/components/parameters/Content-Type'
      - $ref: '#/components/parameters/Accept'
      - name: RnbBehavior
        in: query
        description: "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.\n\r\n\rNote that if this not sent, the parameter is `1`."
        required: false
        style: form
        schema:
          type: integer
          example: 0
      - name: sc
        in: query
        description: Trade Policy (Sales Channel) identification.
        required: false
        style: form
        schema:
          type: integer
          example: 1
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - id
              - quantity
              - seller
              properties:
                items:
                  type: array
                  description: Array containing information about the SKUs inside the cart to be simulated.
                  items:
                    type: object
                    description: SKU information.
                    properties:
                      id:
                        type: string
                        description: The SKU ID.
                        example: '1'
                      quantity:
                        type: integer
                        format: int32
                        description: The quantity of items of this specific SKU in the cart to be simulated.
                        example: 1
                      seller:
                        type: string
                        description: The ID of the seller responsible for this SKU. This ID can be found in your VTEX Admin.
                        example: '1'
                country:
                  type: string
                  description: Three letter ISO code of the country of the shipping address. This value must be sent along with the `postalCode` or `geoCoordinates` values.
                  example: BRA
                postalCode:
                  type: string
                  description: Postal code.
                  example: 12345-000
                geoCoordinates:
                  type: array
                  description: Array containing two floats with geocoordinates, first longitude, then latitude.
                  example:
                  - -47.924747467041016
                  - -15.832582473754883
                  items:
                    description: Geocoordinates.
                    type: number
                    example: -47.924747467041016
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    description: Information on each item in the cart.
                    items:
                      type: object
                      description: Object containing information of the item.
                      properties:
                        id:
                          type: string
                          description: ID of the item.
                        requestIndex:
                          type: integer
                          description: Request index information.
                        quantity:
                          type: integer
                          description: The quantity of the item the cart.
                        seller:
                          type: string
                          description: The seller responsible for the SKU.
                        sellerChain:
                          type: array
                          description: 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.
                          items:
                            type: string
                            description: Seller.
                        tax:
                          type: integer
                          description: Tax value in cents.
                        taxCode:
                          type: string
                          description: A unique identifier code assigned to a tax within the VTEX Admin.
                        priceValidUntil:
                          type: string
                          description: Price expiration date and time.
                        price:
                          type: integer
                          description: Price in cents.
                        listPrice:
                          type: integer
                          description: List price in cents.
                        rewardValue:
                          type: integer
                          description: Reward value in cents.
                        sellingPrice:
                          type: integer
                          description: 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:
                          type: array
                          description: 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.
                          items:
                            type: object
                            description: Service general information.
                            properties:
                              type:
                                type: string
                                description: Service type.
                              id:
                                type: string
                                description: Service type ID.
                              name:
                                type: string
                                description: Name of the service type.
                              allowGiftMessage:
                                type: boolean
                                description: Option to display the service type on the gift card.
                              attachmentOfferings:
                                type: array
                                description: Array of attachments that will be added to the service type. The attachment is used to add customized information to the service.
                                items:
                                  type: string
                                  description: Attachment of the product.
                              price:
                                type: integer
                                description: Service type price.
                        priceTags:
                          type: array
                          description: Array of price tags, each of which, modifies the price in some way, like discounts or rates that apply to the item in the context of the order.
                          items:
                            type: object
                            description: Price tag information.
                            properties:
                              name:
                                type: string
                                description: Price tag name.
                              value:
                                type: integer
                                description: Price tag value.
                              rawValue:
                                type: integer
                                description: Price tag raw value.
                              isPercentual:
                                type: boolean
                                description: Indicates whether price tag value is applied through a percentage.
                              identifier:
                                type: string
                                description: Price tag identifier.
                                nullable: true
                              owner:
                                type: string
                                description: Identification of the responsible for the price tag.
                        measurementUnit:
                          type: string
                          description: Measurement unit.
                        unitMultiplier:
                          type: integer
                          description: Unit multiplier.
                        parentItemIndex:
                          type: integer
                          description: Parent item index.
                          nullable: true
                        parentAssemblyBinding:
                          type: string
                          description: Parent assembly binding.
                          nullable: true
                        availability:
                          type: string
                          description: Availability.
                        priceDefinition:
                          type: object
                          description: Price information for all units of a specific item.
                          properties:
                            calculatedSellingPrice:
                              type: integer
                              description: Item's calculated unitary selling price in cents.
                            total:
                              type: integer
                              description: Total value for all units of the item in cents.
                            sellingPrices:
                              type: array
                              description: 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.
                              items:
                                type: object
                                description: Item value and rounding quantity.
                                properties:
                                  value:
                                    type: integer
                                    description: Value in cents for that specific rounding.
                                  quantity:
                                    type: integer
                                    description: Rounding quantity, meaning how many items are rounded to this value.
                  ratesAndBenefitsData:
                    type: object
                    description: Information on pricing and promotions that apply to the order.
                    properties:
                      rateAndBenefitsIdentifiers:
                        type: array
                        description: List with pricing and promotions identifiers.
                        items:
                          type: string
                          description: Promotion identifier.
                      teaser:
                        type: array
                        description: List with pricing and promotions teaser.
                        items:
                          type: string
                          description: Promotion teaser.
                  paymentData:
                    type: object
                    description: Payment data information.
                    properties:
                      installmentOptions:
                        type: array
                        description: List of Installment options.
                        items:
                          type: object
                          description: Information about the installment option.
                          properties:
                            paymentSystem:
                              type: integer
                              description: Payment system identification.
                            bin:
                              type: string
                              description: Card bin.
                              nullable: true
                            paymentName:
                              type: string
                              description: Payment name.
                              nullable: true
                            paymentGroupName:
                              type: string
                              description: Payment group name.
                              nullable: true
                            value:
                              type: integer
                              description: Total value assigned to this payment.
                            installments:
                              type: array
                              description: Installment information.
                              items:
                                type: object
                                description: Installment information.
                                properties:
                                  count:
                                    type: integer
                                    description: Count information.
                                  hasInterestRate:
                                    type: boolean
                                    description: Indicates whether the payment has interest.
                                  interestRate:
                                    type: integer
                                    description: Interest rate value.
                                  value:
                                    type: integer
                                    description: Value of the order without the interest rate. The value is shown without separating cents.
                                  total:
                                    type: integer
                                    description: Total value of the order without separating cents. For example, $24.99 is represented `2499`.
                                  sellerMerchantInstallments:
                                    type: array
                                    description: Seller merchant installments information.
                                    items:
                                      type: object
                                      description: Installment information.
                      paymentSystems:
                        type: array
                        description: Information on payment systems.
                        items:
                          type: object
                          description: Payment system information.
                          properties:
                            id:
                              type: integer
                              description: Payment system ID.
                            name:
                              type: string
                              description: Payment system name.
                            groupName:
                              type: string
                              description: Payment group name.
                            validator:
                              type: object
                              description: Payment system validator.
                              nullable: true
                            stringId:
                              type: string
                              description: String ID.
                            template:
                              type: string
                              description: Template.
                            requiresDocument:
                              type: boolean
                              description: Indicates whether a document is required.
                            displayDocument:
                              type: boolean
                              description: Indicates whether a document is shown.
                            isCustom:
                              type: boolean
                              description: Indicates whether it is custom.
                            description:
                              type: string
                              description: Description.
                            requiresAuthentication:
                              type: boolean
                              description: Indicates whether a authentication is required.
                            dueDate:
                              type: string
                              description: Payment due date.
                            availablePayments:
                              type: string
                              description: Availability of payment.
                              nullable: true
                      payments:
                        type: array
                        description: Information on each payment.
                        items:
                          type: string
                          description: Payment information.
                      giftCards:
                        type: array
                        description: Gift card information, if it applies to the order.
                        items:
                          type: string
                          description: Gift card.
                      giftCardMessages:
                        type: array
                        description: Array of gift card messages.
                        items:
                          type: string
                          description: Gift card message.
                      availableAccounts:
                        type: array
                        description: Available accounts.
                        items:
                          type: string
                          description: Available account.
                      availableTokens:
                        type: array
                        description: Available tokens.
                        items:
                          type: string
                          description: Available token.
                      availableAssociations:
                        type: object
                        description: Available associations.
                  selectableGifts:
                    type: array
                    description: Array containing the data of the items selected as a gift.
                    items:
                      type: string
                      description: Selected gift item.
                  marketingData:
                    type: object
                    description: Object containing promotion data such as coupon tracking information and internal or external UTMs.
                    nullable: true
                  postalCode:
                    type: string
                    description: Postal code.
                    nullable: true
                  country:
                    type: string
                    description: Three letter ISO code of the country of the shipping address.
                  logisticsInfo:
                    type: array
                    description: Array with logistics information on each item of the `items` array in the `orderForm`.
                    items:
                      description: Logistics information of a item.
                      type: object
                      properties:
                        itemIndex:
                          type: integer
                          description: Index of item in items array.
                        addressId:
                          type: string
                          description: Address ID.
                          nullable: true
                        selectedSla:
                          type: string
                          description: Selected SLA. For example, `"normal"` or `"express"`.
                          nullable: true
                        selectedDeliveryChannel:
                          type: string
                          description: Delivery channel selected by the customer. For example, `"delivery"` or `"pickup-in-point"`.
                          nullable: true
                        quantity:
                          type: integer
                          description: Quantity.
                        shipsTo:
                          type: array
                          description: List of countries that the item may be shipped to.
                          items:
                            type: string
                            example: Brazil
                            description: Country that the item may be shipped to.
                        slas:
                          type: array
                          description: Information on available SLAs.
                          items:
                            description: SLA information.
                            type: object
                            properties:
                              id:
                                type: string
                                description: SLA ID.
                              deliveryChannel:
                                type: string
                                description: Delivery channel.
                              name:
                                type: string
                                description: SLA name.
                              deliveryIds:
                                type: array
                                description: Information on each delivery ID.
                                items:
                                  type: object
                                  description: Object with delivery infomation.
                                  properties:
                                    courierId:
                                      type: string
                                      description: Courier ID.
                                    warehouseId:
                                      type: string
                                      description: Warehouse ID.
                                    dockId:
                                      type: string
                                      description: Warehouse ID.
                                    courierName:
                                      type: string
                                      description: Courier name.
                                    quantity:
                                      type: integer
                                      description: Quantity.
                              shippingEstimate:
                                type: string
                                description: Shipping estimate. For instance, "three business days" will be represented as `3bd`.
                              shippingEstimateDate:
                                type: string
                                description: Shipping estimate date.
                                nullable: true
                              lockTTL:
                                type: string
                                description: Estimate date of delivery.
                                nullable: true
                              availableDeliveryWindows:
                                type: object
                                description: This object contains information about the delivery window available to the shopper.
                                properties:
                                  startDateUtc:
                                    type: string
                                    description: Delivery window starting day and time in UTC.
                                  endDateUtc:
                                    type: string
                                    description: Delivery window ending day and time in UTC.
                                  price:
                                    type: integer
                                    description: Delivery window price.
                                  lisPrice:
                                    type: integer
                                    description: Delivery window list price.
                                  tax:
                                    type: integer
                                    description: Delivery window tax.
                              deliveryWindow:
                                type: object
                                description: In case of scheduled delivery, this object will contain information on the delivery window selected by the shopper.
                                properties:
                                  startDateUtc:
                                    type: string
                                    description: Delivery window starting day and time in UTC.
                                  endDateUtc:
                                    type: string
                                    description: Delivery window ending day and time in UTC.
                                  price:
                                    type: integer
                                    description: Delivery window price.
                                  lisPrice:
                                    type: integer
                                    description: Delivery window list price.
                                  tax:
                                    type: integer
                                    description: Delivery window tax.
                              price:
                                type: integer
                                description: Price in cents.
                              listPrice:
                                type: integer
                                description: List price in cents.
                              tax:
                                type: integer
                                description: Tax in cents.
                              pickupStoreInfo:
                                type: object
                                description: Information on the pickup store.
                                properties:
                                  isPickupStore:
                                    type: boolean
                                    description: Indicates whether it is the pickup store.
                                  friendlyName:
                                    type: string
                                    description: Friendly name.
                                    nullable: true
                                  address:
                                    type: object
                                    description: Address information.
                                    nullable: true
                                  additionalInfo:
                                    type: string
                                    description: Additional information.
                                    nullable: true
                                  dockId:
                                    type: string
                                    description: Corresponding dock ID.
                                    nullable: true
                              pickupPointId:
                                type: string
                                description: Pickup point ID.
                                nullable: true
                              pickupDistance:
                                type: integer
                                description: Pickup point distance.
                              polygonName:
                                type: string
                                description: Polygon name.
                                nullable: true
                              transitTime:
                                type: string
                                description: Transit time. For instance, "three business days" is represented as `3bd`.
                        deliveryChannels:
                          type: array
                          description: List of available delivery channels.
                          items:
                            type: obje

# --- truncated at 32 KB (269 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/vtex/refs/heads/main/openapi/vtex-shopping-cart-api-openapi.yml