VTEX · Example Payload

Vtex Cartsimulation Example

CommerceE-CommerceRetailMarketplacePayments

Vtex Cartsimulation Example is an example object payload from VTEX, with 6 top-level fields. It illustrates the shape of data this provider's APIs accept or return.

Top-level fields

operationIdmethodpathsummaryrequestExamplesresponseExamples

Example Payload

Raw ↑
{
  "operationId": "CartSimulation",
  "method": "POST",
  "path": "/api/checkout/pub/orderForms/simulation",
  "summary": "VTex Cart simulation",
  "requestExamples": [],
  "responseExamples": [
    {
      "status": "200",
      "contentType": "application/json",
      "example": {
        "items": [
          {
            "id": "1",
            "requestIndex": 0,
            "quantity": 1,
            "seller": "1",
            "sellerChain": [
              "1"
            ],
            "tax": 0,
            "taxCode": "54WC8ZN6K8",
            "priceValidUntil": "2023-07-12T11:49:01Z",
            "price": 9999,
            "listPrice": 9999,
            "rewardValue": 0,
            "sellingPrice": 2999700,
            "offerings": [
              {
                "type": "removal of additional old appliance",
                "id": "1",
                "name": "removal of additional old appliance",
                "allowGiftMessage": false,
                "attachmentOfferings": [],
                "price": 2999
              }
            ],
            "priceTags": [
              {
                "name": "DISCOUNT@MANUALPRICE",
                "value": -5000,
                "rawValue": -50,
                "isPercentual": false,
                "identifier": "1234abc-5678b-1234c"
              }
            ],
            "measurementUnit": "un",
            "unitMultiplier": 300,
            "parentItemIndex": null,
            "parentAssemblyBinding": null,
            "availability": "available",
            "priceDefinition": {
              "calculatedSellingPrice": 2999700,
              "total": 2999700,
              "sellingPrices": [
                {
                  "value": 2999700,
                  "quantity": 1
                }
              ]
            }
          }
        ],
        "ratesAndBenefitsData": {
          "rateAndBenefitsIdentifiers": [],
          "teaser": []
        },
        "paymentData": {
          "installmentOptions": [
            {
              "paymentSystem": 2,
              "bin": null,
              "paymentName": "Visa",
              "paymentGroupName": "creditCardPaymentGroup",
              "value": 2999700,
              "installments": [
                {
                  "count": 1,
                  "hasInterestRate": false,
                  "interestRate": 0,
                  "value": 2999700,
                  "total": 2999700,
                  "sellerMerchantInstallments": [
                    {
                      "id": "LOJADOBRENO",
                      "count": 1,
                      "hasInterestRate": false,
                      "interestRate": 0,
                      "value": 2999700,
                      "total": 2999700
                    }
                  ]
                }
              ]
            },
            {
              "paymentSystem": 6,
              "bin": null,
              "paymentName": "Boleto Banc\u00e1rio",
              "paymentGroupName": "bankInvoicePaymentGroup",
              "value": 2999700,
              "installments": [
                {
                  "count": 1,
                  "hasInterestRate": false,
                  "interestRate": 0,
                  "value": 2999700,
                  "total": 2999700,
                  "sellerMerchantInstallments": [
                    {
                      "id": "LOJADOBRENO",
                      "count": 1,
                      "hasInterestRate": false,
                      "interestRate": 0,
                      "value": 2999700,
                      "total": 2999700
                    }
                  ]
                }
              ]
            },
            {
              "paymentSystem": 127,
              "bin": null,
              "paymentName": "MercadoPagoPro",
              "paymentGroupName": "MercadoPagoProPaymentGroup",
              "value": 2999700,
              "installments": [
                {
                  "count": 1,
                  "hasInterestRate": false,
                  "interestRate": 0,
                  "value": 2999700,
                  "total": 2999700,
                  "sellerMerchantInstallments": [
                    {
                      "id": "LOJADOBRENO",
                      "count": 1,
                      "hasInterestRate": false,
                      "interestRate": 0,
                      "value": 2999700,
                      "total": 2999700
                    }
                  ]
                }
              ]
            },
            {
              "paymentSystem": 202,
              "bin": null,
              "paymentName": "Dinheiro",
              "paymentGroupName": "custom202PaymentGroupPaymentGroup",
              "value": 2999700,
              "installments": [
                {
                  "count": 1,
                  "hasInterestRate": false,
                  "interestRate": 0,
                  "value": 2999700,
                  "total": 2999700,
                  "sellerMerchantInstallments": [
                    {
                      "id": "LOJADOBRENO",
                      "count": 1,
                      "hasInterestRate": false,
                      "interestRate": 0,
                      "value": 2999700,
                      "total": 2999700
                    }
                  ]
                }
              ]
            }
          ],
          "paymentSystems": [
            {
              "id": 202,
              "name": "Dinheiro",
              "groupName": "custom202PaymentGroupPaymentGroup",
              "validator": {
                "regex": "^4[0-9]{15}$",
                "mask": "9999 9999 9999 9999",
                "cardCodeRegex": "^[0-9]{3}$",
                "cardCodeMask": "999",
                "weights": [
                  2,
                  1,
                  2,
                  1,
                  2
                ],
                "useCvv": true,
                "useExpirationDate": true,
                "useCardHolderName": true,
                "useBillingAddress": true
              },
              "stringId": "202",
              "template": "custom202PaymentGroupPaymentGroup-template",
              "requiresDocument": false,
              "displayDocument": false,
              "isCustom": true,
              "description": "Payment description",
              "requiresAuthentication": false,
              "dueDate": "2022-07-22T11:39:36.37197Z",
              "availablePayments": null
            },
            {
              "id": 6,
              "name": "Boleto Banc\u00e1rio",
              "groupName": "bankInvoicePaymentGroup",
              "validator": {
                "regex": "^4[0-9]{15}$",
                "mask": "9999 9999 9999 9999",
                "cardCodeRegex": "^[0-9]{3}$",
                "cardCodeMask": "999",
                "weights": [
                  2,
                  1,
                  2,
                  1,
                  2
                ],
                "useCvv": true,
                "useExpirationDate": true,
                "useCardHolderName": true,
                "useBillingAddress": true
              },
              "stringId": "6",
              "template": "bankInvoicePaymentGroup-template",
              "requiresDocument": false,
              "displayDocument": false,
              "isCustom": false,
              "description": "Payment description",
              "requiresAuthentication": false,
              "dueDate": "2022-07-19T11:39:36.37197Z",
              "availablePayments": null
            },
            {
              "id": 2,
              "name": "Visa",
              "groupName": "creditCardPaymentGroup",
              "validator": {
                "regex": "^4[0-9]{15}$",
                "mask": "9999 9999 9999 9999",
                "cardCodeRegex": "^[0-9]{3}$",
                "cardCodeMask": "999",
                "weights": [
                  2,
                  1,
                  2,
                  1,
                  2
                ],
                "useCvv": true,
                "useExpirationDate": true,
                "useCardHolderName": true,
                "useBillingAddress": true
              },
              "stringId": "2",
              "template": "creditCardPaymentGroup-template",
              "requiresDocument": false,
              "displayDocument": false,
              "isCustom": false,
              "description": "Payment description",
              "requiresAuthentication": false,
              "dueDate": "2022-07-19T11:39:36.37197Z",
              "availablePayments": null
            },
            {
              "id": 127,
              "name": "MercadoPagoPro",
              "groupName": "MercadoPagoProPaymentGroup",
              "validator": {
                "regex": "^4[0-9]{15}$",
                "mask": "9999 9999 9999 9999",
                "cardCodeRegex": "^[0-9]{3}$",
                "cardCodeMask": "999",
                "weights": [
                  2,
                  1,
                  2,
                  1,
                  2
                ],
                "useCvv": true,
                "useExpirationDate": true,
                "useCardHolderName": true,
                "useBillingAddress": true
              },
              "stringId": "127",
              "template": "MercadoPagoProPaymentGroup-template",
              "requiresDocument": false,
              "displayDocument": false,
              "isCustom": false,
              "description": "Payment description",
              "requiresAuthentication": false,
              "dueDate": "2022-07-19T11:39:36.37197Z",
              "availablePayments": null
            }
          ],
          "payments": [
            {
              "paymentSystem": 6,
              "bin": null,
              "accountId": "12",
              "tokenId": null,
              "value": 34390,
              "referenceValue": 34390,
              "giftCardRedemptionCode": null,
              "giftCardProvider": null,
              "giftCardId": null
            }
          ],
          "giftCards": [],
          "giftCardMessages": [],
          "availableAccounts": [],
          "availableTokens": [],
          "availableAssociations": {}
        },
        "selectableGifts": [],
        "marketingData": {
          "utmSource": "app",
          "utmMedium": "CPC",
          "utmCampaign": "Black friday",
          "utmipage": "true",
          "utmiPart": "true",
          "utmiCampaign": "true",
          "coupon": "blackfriday",
          "marketingTags": [
            "tag1",
            "tag2"
          ]
        },
        "country": "BRA",
        "postalCode": "12345-000",
        "geoCoordinates": [
          -47.924747467041016,
          -15.832582473754883
        ],
        "logisticsInfo": [
          {
            "itemIndex": 0,
            "addressId": "666c2e830bd9474ab6f6cc53fb6dd2d2",
            "selectedSla": "Normal",
            "selectedDeliveryChannel": "delivery",
            "quantity": 1,
            "shipsTo": [
              "BRA"
            ],
            "slas": [
              {
                "id": "Normal",
                "deliveryChannel": "delivery",
                "name": "Normal",
                "deliveryIds": [
                  {
                    "courierId": "1",
                    "warehouseId": "1_1",
                    "dockId": "1",
                    "courierName": "Transportadora",
                    "quantity": 1,
                    "kitItemDetails": []
                  }
                ],
                "shippingEstimate": "3bd",
                "shippingEstimateDate": null,
                "lockTTL": "10d",
                "availableDeliveryWindows": {
                  "startDateUtc": "2017-03-27T00:00:00+00:00",
                  "endDateUtc": "2017-03-27T00:00:00+00:00",
                  "price": 0,
                  "lisPrice": 0,
                  "tax": 0
                },
                "deliveryWindow": {
                  "startDateUtc": "2014-04-21T09:00:00+00:00",
                  "endDateUtc": "2014-04-21T12:00:00+00:00",
                  "price": 0,
                  "listprice": 1000,
                  "tax": 0
                },
                "price": 1500,
                "listPrice": 1500,
                "tax": 0,
                "pickupStoreInfo": {
                  "isPickupStore": false,
                  "friendlyName": null,
                  "address": null,
                  "additionalInfo": null,
                  "dockId": null
                },
                "pickupPointId": null,
                "pickupDistance": 0,
                "polygonName": null,
                "transitTime": "3bd"
              }
            ],
            "deliveryChannels": [
              {
                "id": "pickup-in-point"
              },
              {
                "id": "delivery"
              }
            ]
          }
        ],
        "messages": [],
        "purchaseConditions": {
          "itemPurchaseConditions": [
            {
              "id": "1",
              "seller": "1",
              "sellerChain": [
                "1"
              ],
              "slas": [
                {
                  "id": "Normal",
                  "deliveryChannel": "delivery",
                  "name": "Normal",
                  "deliveryIds": [
                    {
                      "courierId": "1",
                      "warehouseId": "1_1",
                      "dockId": "1",
                      "courierName": "Transportadora",
                      "quantity": 1,
                      "kitItemDetails": []
                    }
                  ],
                  "shippingEstimate": "3bd",
                  "shippingEstimateDate": null,
                  "lockTTL": "10d",
                  "availableDeliveryWindows": {
                    "startDateUtc": "2017-03-27T00:00:00+00:00",
                    "endDateUtc": "2017-03-27T00:00:00+00:00",
                    "price": 0,
                    "lisPrice": 0,
                    "tax": 0
                  },
                  "deliveryWindow": {
                    "startDateUtc": "2014-04-21T09:00:00+00:00",
                    "endDateUtc": "2014-04-21T12:00:00+00:00",
                    "price": 0,
                    "listprice": 1000,
                    "tax": 0
                  },
                  "price": 1500,
                  "listPrice": 1500,
                  "tax": 0,
                  "pickupStoreInfo": {
                    "isPickupStore": false,
                    "friendlyName": null,
                    "address": null,
                    "additionalInfo": null,
                    "dockId": null
                  },
                  "pickupPointId": null,
                  "pickupDistance": 0,
                  "polygonName": null,
                  "transitTime": "3bd"
                }
              ],
              "price": 9999,
              "listPrice": 9999
            }
          ]
        },
        "pickupPoints": [],
        "subscriptionData": null,
        "totals": [
          {
            "id": "Items",
            "name": "Total dos Itens",
            "value": 2999700
          }
        ],
        "itemMetadata": {
          "items": [
            {
              "id": "1",
              "seller": "1",
              "assemblyOptions": [
                {
                  "id": "T-Shirt Customization",
                  "name": "T-Shirt Customization",
                  "required": false,
                  "inputValues": {
                    "T-Shirt Name": {
                      "maximumNumberOfCharacters": 2,
                      "domain": [
                        "[]"
                      ]
                    }
                  },
                  "composition": null
                }
              ]
            }
          ]
        }
      }
    }
  ]
}