v50

latestOpenAPI 3.0.0raw.githubusercontent.com2025-09-22312710.8 KB
Promotions and taxes

Create or update promotion or tax

Creates or updates a specific Promotion by its Promotion ID or a specific tax by its tax ID.

⚠️ You should always include both the id and name when registering objects in the request body.

Permissions

Any user or API key must have at least one of the appropriate License Manager resources to be able to successfully run this request. Otherwise they will receive a status code 403 error. These are the applicable resources for this endpoint:

ProductCategoryResource
Rates and BenefitsManage benefits and ratesGerenciarPromocoesETarifas

There are no applicable predefined roles for this resource list. You must create a custom role and add at least one of the resources above in order to use this endpoint. To learn more about machine authentication at VTEX, see Authentication overview.

❗ To prevent integrations from having excessive permissions, consider the best practices for managing API keys when assigning License Manager roles to integrations.

post/api/rnb/pvt/calculatorconfiguration

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

idCalculatorConfigurationstring

Promotion ID or tax ID.

namestring

Promotion name or tax name.

descriptionstring

Internal description of the promotion or tax.

beginDateUtcstring required

Promotion or tax Begin Date (UTC).

endDateUtcstring

Promotion or tax End Date (UTC).

lastModifiedstring

Date when the promotion or tax was last modified.

daysAgoOfPurchasesinteger

Number of days that are considered to add the purchase history.

isActiveboolean required

If set as true the promotion or tax is activated. If set as false the promotion or tax is deactivated.

isArchivedboolean

If set as true the promotion or tax is archived. If set as false the promotion or tax is not archived.

isFeaturedboolean

Insert a flag with the promotion name used in the product's window display and page.

disableDealboolean

Indicates whether a deal is disabled (true) or not (false).

activeDaysOfWeekstring[]

Defines which days of the week the promotion or tax will applied.

offsetinteger

Time offset from UTC in seconds.

activateGiftsMultiplierboolean

If set as true, it activates gifts Multiplier.

newOffsetnumber

New time offset from UTC in seconds.

maxPricesPerItemsstring[]

List of max price per items.

cumulativeboolean

Defines if a promotion or tax can accumulate with another one. (true) or not (false).

discountTypestring

The type of discount that will apply to the promotion.

nominalShippingDiscountValuenumber

Exact discount to be applied for the shipping value.

absoluteShippingDiscountValuenumber

Maximum shipping value.

nominalDiscountValuenumber

Exact discount to be applied for the total purchase value.

nominalDiscountTypestring

Controls the behavior of the NominalDiscount effect. This field only accepts two string values:

-item: applies the intended nominal discount on every item present on the cart.

-cart: keeps the behavior as it currently is: the whole order/cart receives a nominal discount that is distributed among the items.

maximumUnitPriceDiscountnumber

The maximum price for each item of the purchase will be the price set up.

percentualDiscountValuenumber

Percentage discount to be applied for total purchase value.

rebatePercentualDiscountValuenumber

Percentual Shipping Discount Value.

percentualShippingDiscountValuenumber required

Percentage discount to be applied for shipping value.

percentualTaxnumber

Percentual tax over purchase total value.

shippingPercentualTaxnumber

Shipping Percentual tax over purchase total value.

percentualDiscountValueList1number

Valid discounts for the SKUs in listSku1BuyTogether, discount list used for Buy Together Promotions.

percentualDiscountValueList2number

Equivalent to percentualDiscountValueList1.

nominalRewardValuenumber

Nominal value for rewards program.

percentualRewardValuenumber

Percentage value for rewards program.

orderStatusRewardValuestring

Order status reward value.

maxNumberOfAffectedItemsinteger

The maximum number of affected items for a promotion.

maxNumberOfAffectedItemsGroupKey'perProductId' | 'perCart' | 'perSku'

Defines the maximum number of affected items by group key for a promotion. Possible values:

  • perProductId: Maximum items per product
  • perCart: Maximum items per cart
  • perSku: Maximum items per SKU
applyToAllShippingsboolean

Promotion or tax will be applied to all kind of shipping.

nominalTaxnumber

Nominal tax.

originstring required

Origin of the promotion or tax, marketplace or Fulfillment. Read Difference between orders with marketplace and fulfillment sources for more information.

idSellerstring

Seller Name.

idSellerIsInclusiveboolean

If set to true, this promotion or tax will be applied to any seller present on the idSeller field. If set to false, sellers present on that field will make this promotion or tax not to be applied.

idsSalesChannelstring[]

List of Trade Policies that activate this promotion or tax.

areSalesChannelIdsExclusiveboolean

If set to false, this promotion or tax will be applied to any trade policies present on the idsSalesChannel field. If set to true, trade policies present on that field will make this promotion or tax not to be applied.

marketingTagsstring[]

Promotion or tax Marketing tags.

marketingTagsAreNotInclusiveboolean

If set to false, this promotion or tax will be applied to any marketing tag present on the marketingTags field. If set to true, marketing tags present on that field will make this promotion or tax not to be applied.

storesstring[]

List of stores.

campaignsstring[]

Campaign Audiences that activate this promotion.

conditionsIdsstring[]

Array with conditions IDs.

storesAreInclusiveboolean

If set to true, this promotion will be applied to any store present on the stores field. If set to false, stores present on that field will make this promotion not to be applied.

categoriesAreInclusiveboolean

If set to true, this promotion or tax will be applied to any category present on the categories field. If set to false, categories present on that field will make this promotion or tax not to be applied.

brandsAreInclusiveboolean

If set to true, this promotion or tax will be applied to any brand present on the brands field. If set to false, brands present on that field will make this promotion or tax not to be applied.

productsAreInclusiveboolean

If set to true, this promotion or tax will be applied to any product present on the products field. If set to false, products present on that field will make this promotion or tax not to be applied.

skusAreInclusiveboolean

If set to true, this promotion or tax will be applied to any SKU present on the skus field. If set to false, SKUs present on that field will make this promotion or tax not to be applied.

utmSourcestring

Coupon utmSource code.

utmCampaignstring

Coupon utmCampaign code.

minimumQuantityBuyTogetherinteger

Minimum quantity for Buy Together promotion.

quantityToAffectBuyTogetherinteger

Quantity to affect Buy Together promotion.

enableBuyTogetherPerSkuboolean

Enable Buy Together per SKU.

couponstring[]

List of coupons.

totalValueFloornumber

Minimum chart value to activate the promotion or tax.

totalValueCelingnumber

Maximum chart value to activate the promotion or tax.

totalValueIncludeAllItemsboolean

Total vale including all items.

totalValueModestring

Defines if products that already are receiving a promotion will be considered on the chart total value. There are three options available: IncludeMatchedItems, ExcludeMatchedItems, AllItems.

collectionsIsInclusiveboolean

If set to true, this promotion or tax will be applied to any collection present on the collections field. If set to false, collections present on that field will make this promotion or tax not to be applied.

restrictionsBinsstring[]

The discount will be granted if the card's BIN is given.

cardIssuersstring[]

List of card issuers.

totalValuePurchasenumber

Total value a client must have in past orders to activate the promotion or tax.

slasIdsstring[]

The discount will be granted if the shipping method is the same as the one given.

isSlaSelectedboolean

Applies selected discount only when one of the defined shipping method is selected by the customer.

isFirstBuyboolean

Applies the discount only if it's a first buy.

firstBuyIsProfileOptimisticboolean

Applies the discount even if the user is not logged.

compareListPriceAndPriceboolean

If the List Price and Price are the same.

isDifferentListPriceAndPriceboolean

Applies the promotion or tax only if the list price and price is different.

itemMaxPricenumber

Maximum price of the item.

itemMinPricenumber

Minimum price of the item.

installmentinteger

Installment.

isMinMaxInstallmentsboolean

Set if the promotion or tax will be applied considering a minimum and maximum values for installments.

minInstallmentinteger

Minimum value for installment.

maxInstallmentinteger

Maximum value for installment.

merchantsstring[]

List of merchants.

clusterExpressionsstring[]

Criteria to select a customer cluster. Each item in this array should follow the format of an equality function ({propertyname}={value}) or the format of a contains function ({propertyname} contains {value}). In both options, {propertyname} must be replaced with the name of the field in the data entity, and {value} must be replaced with the value determined in Master Data. Find more information about these criteria in Filling in the Customer cluster field.

paymentsRulesstring[]

List of payment rules.

giftListTypesstring[]

Gifts List Type.

productsSpecificationsstring[]

List of product specifications.

maxUsageinteger

Defines how many times the promotion or tax can be used.

maxUsagePerClientinteger

Defines if the promotion can be used multiple times per client.

shouldDistributeDiscountAmongMatchedItemsboolean

Should distribute discount among matched items.

multipleUsePerClientboolean

Defines if the promotion can be used multiple times per client.

accumulateWithManualPriceboolean

Allows the promotion to apply to products whose prices have been manually added by a call-center operator.

typestring required

Defines what is the type of the promotion or indicates if it is a tax. Possible values: regular (Regular Promotion), combo (Buy Together), forThePriceOf (More for Less), progressive (Progressive Discount), buyAndWin (Buy One Get One), maxPricePerItem (Deprecated), campaign (Campaign Promotion), tax (Tax), multipleEffects (Multiple Effects).

useNewProgressiveAlgorithmboolean

Use new progressive algorithm.

percentualDiscountValueListnumber[]

Percentual discount value list.

Example request

{
  "idCalculatorConfiguration": "ba087fa9-8587-44b3-8ef1-ade8d053e9e9",
  "name": "Promoção Social Seller",
  "description": "Description of the promotion.",
  "beginDateUtc": "2020-05-01T18:47:15.89Z",
  "endDateUtc": "2020-05-01T18:47:15.89Z",
  "lastModified": "2021-02-23T20:58:38.7963862Z",
  "isActive": true,
  "isFeatured": true,
  "activeDaysOfWeek": [
    "Monday"
  ],
  "offset": -3,
  "newOffset": -3,
  "maxPricesPerItems": [
    "100"
  ],
  "discountType": "percentual",
  "nominalDiscountValue": 10,
  "nominalDiscountType": "item",
  "percentualDiscountValue": 10,
  "skusGift": {
    "gifts": [
      "123"
    ]
  },
  "orderStatusRewardValue": "invoiced",
  "maxNumberOfAffectedItemsGroupKey": "perCart",
  "origin": "marketplace",
  "idSeller": "1",
  "idsSalesChannel": [
    "Principal"
  ],
  "marketingTags": [
    "MKT1"
  ],
  "paymentsMethods": [
    {
      "id": "2",
      "name": "Visa (2)"
    }
  ],
  "stores": [
    "store"
  ],
  "campaigns": [
    "campaign"
  ],
  "conditionsIds": [
    "1"
  ],
  "categories": [
    {
      "id": "1",
      "name": "Vinhos Tintos (1)"
    }
  ],
  "categoriesAreInclusive": true,
  "brands": [
    {
      "id": "1",
      "name": "Brand (1)"
    }
  ],
  "brandsAreInclusive": true,
  "products": [
    {
      "id": "1",
      "name": "Vinho (1)"
    }
  ],
  "productsAreInclusive": true,
  "skus": [
    {
      "id": "1",
      "name": "Vinho tinto (1)"
    }
  ],
  "skusAreInclusive": true,
  "utmSource": "testSource",
  "utmCampaign": "testSource",
  "collections1BuyTogether": [
    {
      "id": "157",
      "name": "Inverno (157)"
    }
  ],
  "collections2BuyTogether": [
    {
      "id": "157",
      "name": "Inverno (157)"
    }
  ],
  "listSku1BuyTogether": [
    {
      "id": "1",
      "name": "White Shirt"
    }
  ],
  "listSku2BuyTogether": [
    {
      "id": "1",
      "name": "White Shirt"
    }
  ],
  "coupon": [
    "12345"
  ],
  "totalValueMode": "IncludeMatchedItems",
  "collections": [
    {
      "id": "1",
      "name": "Collection (1)"
    }
  ],
  "restrictionsBins": [
    "1234"
  ],
  "cardIssuers": [
    "issuer"
  ],
  "slasIds": [
    "Express"
  ],
  "zipCodeRanges": [
    {
      "zipCodeFrom": "20000-000",
      "zipCodeTo": "20000-100",
      "inclusive": true
    }
  ],
  "installment": 1,
  "merchants": [
    "merchant"
  ],
  "clusterExpressions": [
    "email contains user@mail.com"
  ],
  "paymentsRules": [
    "rules"
  ],
  "giftListTypes": [
    "Gift SKU"
  ],
  "productsSpecifications": [
    "spec"
  ],
  "affiliates": [
    {
      "id": "1",
      "name": "Amazon"
    }
  ],
  "type": "regular",
  "percentualDiscountValueList": [
    10
  ],
  "optIn": {
    "sellers": [
      "seller-id-1"
    ]
  }
}

Response

OK

idCalculatorConfigurationstring

Promotion ID.

namestring

Promotion Name.

descriptionstring

Promotion internal description.

beginDateUtcstring

Promotion Begin Date (UTC).

endDateUtcstring

Promotion End Date (UTC).

lastModifiedstring

When the Promotion was last modified.

daysAgoOfPurchasesinteger

Number of days that are considered to add the purchase history.

isActiveboolean

If set as true the Promotion is activated. If set as false the Promotion is deactivated.

isArchivedboolean

If set as true the Promotion is archived. If set as false the Promotion is not archived.

isFeaturedboolean

Insert a flag with the promotion name used in the product's window display and page.

disableDealboolean

Indicates whether a deal is disabled (true) or not (false).

activeDaysOfWeekstring[]

Defines which days of the week the promotion will applied.

offsetinteger

Time offset from UTC in seconds.

activateGiftsMultiplierboolean

If set as true, it activates gifts Multiplier.

newOffsetnumber

New time offset from UTC in seconds.

maxPricesPerItemsstring[]

List of max price per items.

cumulativeboolean

Defines if a promotion can accumulate with another one. (true) or not (false).

discountTypestring

The type of discount that will apply to the promotion.

nominalShippingDiscountValuenumber

Exact discount to be applied for the shipping value.

absoluteShippingDiscountValuenumber

Maximum shipping value.

nominalDiscountValuenumber

Exact discount to be applied for the total purchase value.

maximumUnitPriceDiscountnumber

The maximum price for each item of the purchase will be the price set up.

percentualDiscountValuenumber

Percentage discount to be applied for total purchase value.

rebatePercentualDiscountValuenumber

Percentual Shipping Discount Value.

percentualShippingDiscountValuenumber

Percentage discount to be applied for shipping value.

percentualTaxnumber

Percentual tax over purchase total value.

shippingPercentualTaxnumber

Shipping Percentual tax over purchase total value.

percentualDiscountValueList1number

Valid discounts for the SKUs in listSku1BuyTogether, discount list used for Buy Together Promotions.

percentualDiscountValueList2number

Equivalent to percentualDiscountValueList1.

nominalRewardValuenumber

Nominal value for rewards program.

percentualRewardValuenumber

Percentage value for rewards program.

orderStatusRewardValuestring

Order status reward value.

maxNumberOfAffectedItemsinteger

The maximum number of affected items for a promotion.

maxNumberOfAffectedItemsGroupKey'perProductId' | 'perCart' | 'perSku'

Defines the maximum number of affected items by group key for a promotion. Possible values:

  • perProductId: Maximum items per product
  • perCart: Maximum items per cart
  • perSku: Maximum items per SKU
applyToAllShippingsboolean

Promotion will be applied to all kind of shipping.

nominalTaxnumber

Nominal tax.

originstring

Origin of the promotion, marketplace or Fulfillment. Read Difference between orders with marketplace and fulfillment sources for more information.

idSellerstring

Seller Name.

idSellerIsInclusiveboolean

If set to true, this promotion will be applied to any seller present on the idSeller field. If set to false, sellers present on that field will make this promotion not to be applied.

idsSalesChannelstring[]

List of Trade Policies that activate this promotion.

areSalesChannelIdsExclusiveboolean

If set to false, this promotion will be applied to any trade policies present on the idsSalesChannel field. If set to true, trade policies present on that field will make this promotion not to be applied.

marketingTagsstring[]

Promotion Marketing tags.

marketingTagsAreNotInclusiveboolean

If set to false, this promotion will be applied to any marketing tag present on the marketingTags field. If set to true, marketing tags present on that field will make this promotion not to be applied.

storesstring[]

List of stores.

campaignsstring[]

Campaign Audiences that activate this promotion.

conditionsIdsstring[]

Array with conditions IDs.

storesAreInclusiveboolean

If set to true, this promotion will be applied to any store present on the stores field. If set to false, stores present on that field will make this promotion not to be applied.

categoriesAreInclusiveboolean

If set to true, this promotion will be applied to any category present on the categories field. If set to false, categories present on that field will make this promotion not to be applied.

brandsAreInclusiveboolean

If set to true, this promotion will be applied to any brand present on the brands field. If set to false, brands present on that field will make this promotion not to be applied.

productsAreInclusiveboolean

If set to true, this promotion will be applied to any product present on the products field. If set to false, products present on that field will make this promotion not to be applied.

skusAreInclusiveboolean

If set to true, this promotion will be applied to any SKU present on the skus field. If set to false, SKUs present on that field will make this promotion not to be applied.

utmSourcestring

Coupon utmSource code.

utmCampaignstring

Coupon utmCampaign code.

minimumQuantityBuyTogetherinteger

Minimum quantity for Buy Together promotion.

quantityToAffectBuyTogetherinteger

Quantity to affect Buy Together promotion.

enableBuyTogetherPerSkuboolean

Enable Buy Together per SKU.

couponstring[]

List of coupons.

totalValueFloornumber

Minimum chart value to activate the promotion.

totalValueCelingnumber

Maximum chart value to activate the promotion.

totalValueIncludeAllItemsboolean

Total value including all items.

totalValueModestring

Defines if products that already are receiving a promotion will be considered on the chart total value. There are three options available: IncludeMatchedItems, ExcludeMatchedItems, AllItems.

collectionsIsInclusiveboolean

If set to true, this promotion will be applied to any collection present on the collections field. If set to false, collections present on that field will make this promotion not to be applied.

restrictionsBinsstring[]

The discount will be granted if the card's BIN is given.

cardIssuersstring[]

List of card issuers.

totalValuePurchasenumber

Total value a client must have in past orders to active the promotion.

slasIdsstring[]

The discount will be granted if the shipping method is the same as the one given.

isSlaSelectedboolean

Applies selected discount only when one of the defined shipping method is selected by the customer.

isFirstBuyboolean

Applies the discount only if it's a first buy.

firstBuyIsProfileOptimisticboolean

Applies the discount even if the user is not logged.

compareListPriceAndPriceboolean

If the List Price and Price are the same.

isDifferentListPriceAndPriceboolean

Applies the promotion only if the list price and price is different.

itemMaxPricenumber

Maximum price of the item.

itemMinPricenumber

Minimum price of the item.

installmentinteger

Installment.

isMinMaxInstallmentsboolean

Set if the promotion will be applied considering a minimum and maximum values for installments.

minInstallmentinteger

Minimum value for installment.

maxInstallmentinteger

Maximum value for installment.

merchantsstring[]

List of merchants.

clusterExpressionsstring[]

Criteria to select a customer cluster. Each item in this array should follow the format of an equality function ({propertyname}={value}) or the format of a contains function ({propertyname} contains {value}). In both options, {propertyname} must be replaced with the name of the field in the data entity, and {value} must be replaced with the value determined in Master Data. Find more information about these criteria in Filling in the Customer cluster field.

paymentsRulesstring[]

List of payment rules.

giftListTypesstring[]

Gifts List Type.

productsSpecificationsstring[]

List of product specifications.

maxUsageinteger

Defines how many times the promotion can be used.

maxUsagePerClientinteger

Defines if the promotion can be used multiple times per client.

shouldDistributeDiscountAmongMatchedItemsboolean

Should distribute discount among matched items.

multipleUsePerClientboolean

Defines if the promotion can be used multiple times per client.

accumulateWithManualPriceboolean

Allows the promotion to apply to products whose prices have been manually added by a call-center operator.

typestring

Defines what is the type of the promotion or indicates if it is a tax. Possible values: regular (Regular Promotion), combo (Buy Together), forThePriceOf (More for Less), progressive (Progressive Discount), buyAndWin (Buy One Get One), maxPricePerItem (Deprecated), campaign (Campaign Promotion), tax (Tax), multipleEffects (Multiple Effects).

useNewProgressiveAlgorithmboolean

Use new progressive algorithm.

percentualDiscountValueListnumber[]

Percentual discount value list.