@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api Promotions & Taxes API
@base https://apiexamples.vtexcommercestable.com.br
@version 1.0
@auth ApiKey X-VTEX-API-AppKey in header | ApiKey X-VTEX-API-AppToken in header | ApiKey VtexIdclientAutCookie in header
@common_fields {Content-Type: str=application/json # Type of the content being sent., Accept: str=application/json # HTTP Client Negotiation Accept Header. Indicates the types of responses the client can understand.}
@endpoints 31
@hint download_for_search
@toc api(24), price-sheet(6), pub(1)

@group api
@endpoint POST /api/rnb/pvt/multiple-coupons
@desc Create multiple coupons
@returns(200) OK
@example_request [{"quantity":1,"couponConfiguration":{"utmSource":"fb","utmCampaign":"bf","couponCode":"promobf4","isArchived":false,"maxItemsPerClient":10,"expirationIntervalPerUse":"00:00:00","maxUsage":1}}]

@endpoint POST /api/rnb/pvt/coupon
@desc Create or update coupon
@required {utmSource: str # UTM source code., couponCode: str # Coupon code., maxItemsPerClient: int # Maximum items per client that the coupon can be applied., expirationIntervalPerUse: str # Coupon expiration interval per use.}
@optional {utmCampaign: str # UTM campaign code., isArchived: bool # Defines if the coupon is archived (`true`) or not (`false`)., maxUsage: int # Amount of times the coupon can be used.}
@returns(200) {lastModifiedUtc: str, utmSource: str, utmCampaign: str, couponCode: str, isArchived: bool, maxItemsPerClient: int, expirationIntervalPerUse: str, maxUsage: int} # OK
@returns(201) {lastModifiedUtc: str, utmSource: str, utmCampaign: str, couponCode: str, isArchived: bool, maxItemsPerClient: int, expirationIntervalPerUse: str, maxUsage: int} # Created

@endpoint GET /api/rnb/pvt/coupon
@desc Get all coupons
@returns(200) OK

@endpoint GET /api/rnb/pvt/coupon/{couponCode}
@desc Get coupon by coupon code
@required {couponCode: str # Coupon Code}
@returns(200) {lastModifiedUtc: str, utmSource: str, utmCampaign: str, couponCode: str, isArchived: bool, maxItemsPerClient: int, expirationIntervalPerUse: str, maxUsage: int, groupingKey: str} # OK

@endpoint GET /api/rnb/pvt/archive/coupon/{couponCode}
@desc Get archived coupon by coupon code
@required {couponCode: str # Coupon Code}
@returns(200) {lastModifiedUtc: str, utmSource: str, utmCampaign: str, couponCode: str, isArchived: bool, maxItemsPerClient: int, expirationIntervalPerUse: str, maxUsage: int, groupingKey: str} # OK

@endpoint POST /api/rnb/pvt/archive/coupon/{couponCode}
@desc Archive coupon by coupon code
@required {couponCode: str # Coupon Code}
@returns(200) OK

@endpoint POST /api/rnb/pvt/coupons
@desc Generate coupons in bulk
@required {quantity: int # Number of coupons to create, which can be from `1` to `1000`. For a single coupon (`1`), the code will be the `couponCode` value. For multiple coupons (more than `1`), codes will be the `couponCode` value with a random suffix., utmSource: str # UTM source code., utmCampaign: str # UTM campaign code., couponCode: str # Coupon code., maxItemsPerClient: int # Maximum number of items a coupon can be applied to per client., expirationIntervalPerUse: str # Coupon expiration interval per use.}
@returns(200) OK

@endpoint GET /api/rnb/pvt/coupon/usage/{couponCode}
@desc Get coupon usage
@required {couponCode: str # Coupon Code}
@returns(200) {hostName: str, couponCode: str, profileUsages: map{profileId: map{orderUsage: [map]}}} # OK

@endpoint POST /api/rnb/pvt/unarchive/coupon/{couponCode}
@desc Unarchive coupon by coupon code
@required {couponCode: str # Coupon Code}
@returns(200) OK

@endpoint GET /api/rnb/pvt/benefits/calculatorconfiguration
@desc Get all promotions
@returns(200) {limitConfigurationMaxPrice: map{activesCount: int, limit: int}, limitConfiguration: map{activesCount: int, limit: int}, items: [map], disabledItems: [str], archivedItems: [str], nominalDiscountType: str} # OK

@endpoint GET /api/rnb/pvt/benefits/calculatorconfiguration/search
@desc Search promotion by name
@required {byName: str # Search term used to find a promotion by name.}
@returns(200) OK

@endpoint GET /api/rnb/pvt/taxes/calculatorconfiguration
@desc Get all taxes
@returns(200) {limitConfiguration: map{activesCount: int, limit: int}, items: [map], disabledItems: [str], archivedItems: [str]} # OK

@endpoint GET /api/rnb/pvt/calculatorconfiguration/{idCalculatorConfiguration}
@desc Get promotion or tax by ID
@required {idCalculatorConfiguration: str # Promotion ID or tax ID.}
@returns(200) {idCalculatorConfiguration: str, name: str, description: str, beginDateUtc: str, endDateUtc: str, lastModified: str, daysAgoOfPurchases: int, isActive: bool, isArchived: bool, isFeatured: bool, disableDeal: bool, activeDaysOfWeek: [str], offset: int, activateGiftsMultiplier: bool, newOffset: num, maxPricesPerItems: [str], cumulative: bool, discountType: str, nominalShippingDiscountValue: num, absoluteShippingDiscountValue: num, nominalDiscountValue: num, nominalDiscountType: str, maximumUnitPriceDiscount: num, percentualDiscountValue: num, rebatePercentualDiscountValue: num, percentualShippingDiscountValue: num, percentualTax: num, shippingPercentualTax: num, percentualDiscountValueList1: num, percentualDiscountValueList2: num, skusGift: map{quantitySelectable: int, gifts: int}, nominalRewardValue: num, percentualRewardValue: num, orderStatusRewardValue: str, maxNumberOfAffectedItems: int, maxNumberOfAffectedItemsGroupKey: str, applyToAllShippings: bool, nominalTax: num, origin: str, idSeller: str, idSellerIsInclusive: bool, idsSalesChannel: [str], areSalesChannelIdsExclusive: bool, marketingTags: [str], marketingTagsAreNotInclusive: bool, paymentsMethods: [map], stores: [str], campaigns: [str], conditionsIds: [str], storesAreInclusive: bool, categories: [map], categoriesAreInclusive: bool, brands: [map], brandsAreInclusive: bool, products: [map], productsAreInclusive: bool, skus: [map], skusAreInclusive: bool, utmSource: str, utmCampaign: str, collections1BuyTogether: [map], collections2BuyTogether: [map], minimumQuantityBuyTogether: int, quantityToAffectBuyTogether: int, enableBuyTogetherPerSku: bool, listSku1BuyTogether: [map], listSku2BuyTogether: [map], coupon: [str], totalValueFloor: num, totalValueCeling: num, totalValueIncludeAllItems: bool, totalValueMode: str, collections: [map], collectionsIsInclusive: bool, restrictionsBins: [str], cardIssuers: [str], totalValuePurchase: num, slasIds: [str], isSlaSelected: bool, isFirstBuy: bool, firstBuyIsProfileOptimistic: bool, compareListPriceAndPrice: bool, isDifferentListPriceAndPrice: bool, zipCodeRanges: [map], countries: [str], itemMaxPrice: num, itemMinPrice: num, installment: int, isMinMaxInstallments: bool, minInstallment: int, maxInstallment: int, merchants: [str], clusterExpressions: [str], multipleSkusCause: map, paymentsRules: [str], giftListTypes: [str], productsSpecifications: [str], affiliates: [map], maxUsage: int, maxUsagePerClient: int, shouldDistributeDiscountAmongMatchedItems: bool, multipleUsePerClient: bool, accumulateWithManualPrice: bool, type: str, useNewProgressiveAlgorithm: bool, percentualDiscountValueList: [num], optIn: map?{sellers: [str]}} # OK

@endpoint POST /api/rnb/pvt/calculatorconfiguration/{promotionId}/seller-opt
@desc Seller opt-in or opt-out
@required {promotionId: str # The ID of the promotion., an: str # The VTEX account name that owns the promotion., if-Match: str # Must match the current `lastModified` value of the promotion., sellerIds: [str] # List of seller IDs that opted in or out to the promotion., operation: str(OptIn/OptOut) # Operation to perform: `OptIn` or `OptOut`.}
@returns(200) {lastModified: str} # Opt-in or opt-out executed successfully.
@errors {400: Bad Request, 401: Unauthorized, 404: Not Found, 412: Precondition Failed}
@example_request {"sellerIds":["seller-id-1","seller-id-2"],"operation":"OptIn"}

@endpoint POST /api/rnb/pvt/calculatorconfiguration
@desc Create or update promotion or tax
@required {beginDateUtc: str # Promotion or tax Begin Date (UTC)., isActive: bool # If set as `true` the promotion or tax is activated. If set as `false` the promotion or tax is deactivated., percentualShippingDiscountValue: num # Percentage discount to be applied for shipping value., origin: str # Origin of the promotion or tax, `marketplace` or `Fulfillment`.  Read [Difference between orders with marketplace and fulfillment sources](https://help.vtex.com/en/tutorial/what-are-orders-with-marketplace-source-and-orders-with-fulfillment-source--6eVYrmUAwMOeKICU2KuG06) for more information., type: str # Defines what is the type of the promotion or indicates if it is a tax. Possible values: `regular` ([Regular Promotion](https://help.vtex.com/tutorial/regular-promotion--tutorials_327)), `combo` ([Buy Together](https://help.vtex.com/en/tutorial/buy-together--tutorials_323)), `forThePriceOf` ([More for Less](https://help.vtex.com/en/tutorial/creating-a-more-for-less-promotion--tutorials_325)), `progressive` ([Progressive Discount](https://help.vtex.com/en/tutorial/progressive-discount--tutorials_324)), `buyAndWin` ([Buy One Get One](https://help.vtex.com/en/tutorial/buy-one-get-one--tutorials_322)), `maxPricePerItem` (Deprecated), `campaign` ([Campaign Promotion](https://help.vtex.com/en/tutorial/campaign-promotion--1ChYXhK2AQGuS6wAqS8Ume)), `tax` (Tax), `multipleEffects` (Multiple Effects).}
@optional {idCalculatorConfiguration: str # Promotion ID or tax ID., name: str # Promotion name or tax name., description: str # Internal description of the promotion or tax., endDateUtc: str # Promotion or tax End Date (UTC)., lastModified: str # Date when the promotion or tax was last modified., daysAgoOfPurchases: int # Number of days that are considered to add the purchase history., isArchived: bool # If set as `true` the promotion or tax is archived. If set as `false` the promotion or tax is not archived., isFeatured: bool # Insert a flag with the promotion name used in the product's window display and page., disableDeal: bool # Indicates whether a deal is disabled (`true`) or not (`false`)., activeDaysOfWeek: [str] # Defines which days of the week the promotion or tax will applied., offset: int # Time offset from UTC in seconds., activateGiftsMultiplier: bool # If set as `true`, it activates gifts Multiplier., newOffset: num # New time offset from UTC in seconds., maxPricesPerItems: [str] # List of max price per items., cumulative: bool # Defines if a promotion or tax can accumulate with another one. (`true`) or not (`false`)., discountType: str # The type of discount that will apply to the promotion., nominalShippingDiscountValue: num # Exact discount to be applied for the shipping value., absoluteShippingDiscountValue: num # Maximum shipping value., nominalDiscountValue: num # Exact discount to be applied for the total purchase value., nominalDiscountType: str # 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., maximumUnitPriceDiscount: num # The maximum price for each item of the purchase will be the price set up., percentualDiscountValue: num # Percentage discount to be applied for total purchase value., rebatePercentualDiscountValue: num # Percentual Shipping Discount Value., percentualTax: num # Percentual tax over purchase total value., shippingPercentualTax: num # Shipping Percentual tax over purchase total value., percentualDiscountValueList1: num # Valid discounts for the SKUs in `listSku1BuyTogether`, discount list used for Buy Together Promotions., percentualDiscountValueList2: num # Equivalent to `percentualDiscountValueList1`., skusGift: map{quantitySelectable: int, gifts: [str]} # SKU Gift Object. Total discount on the product value set as a gift., nominalRewardValue: num # Nominal value for rewards program., percentualRewardValue: num # Percentage value for rewards program., orderStatusRewardValue: str # Order status reward value., maxNumberOfAffectedItems: int # The maximum number of affected items for a promotion., maxNumberOfAffectedItemsGroupKey: str(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, applyToAllShippings: bool # Promotion or tax will be applied to all kind of shipping., nominalTax: num # Nominal tax., idSeller: str # Seller Name., idSellerIsInclusive: bool # 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., idsSalesChannel: [str] # List of Trade Policies that activate this promotion or tax., areSalesChannelIdsExclusive: bool # 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., marketingTags: [str] # Promotion or tax Marketing tags., marketingTagsAreNotInclusive: bool # 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., paymentsMethods: [map{id: str, name: str}] # Array composed by all the Payments Methods that activate this promotion or tax., stores: [str] # List of stores., campaigns: [str] # Campaign Audiences that activate this promotion., conditionsIds: [str] # Array with conditions IDs., storesAreInclusive: bool # 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., categories: [map{id: str, name: str}] # Object composed by the categories that will activate or deactivate the promotion or tax., categoriesAreInclusive: bool # 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., brands: [map{id: str, name: str}] # Object composed by the brands that will activate or deactivate the promotion or tax., brandsAreInclusive: bool # 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., products: [map{id: str, name: str}] # Object composed by the products that will activate or deactivate the promotion or tax., productsAreInclusive: bool # 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., skus: [map{id: str, name: str}] # Object composed by the SKUs that will activate or deactivate the promotion or tax., skusAreInclusive: bool # 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., utmSource: str # Coupon utmSource code., utmCampaign: str # Coupon utmCampaign code., collections1BuyTogether: [map{id: str, name: str}] # Collections that will generate the promotion, type **Buy Together**, **More for less**, **Progressive Discount** or **Buy One Get One**., collections2BuyTogether: [map{id: str, name: str}] # Collections that will generate the promotion, type **Buy Together**, **More for less**, **Progressive Discount**, **Buy One Get One**., minimumQuantityBuyTogether: int # Minimum quantity for **Buy Together** promotion., quantityToAffectBuyTogether: int # Quantity to affect **Buy Together** promotion., enableBuyTogetherPerSku: bool # Enable **Buy Together** per SKU., listSku1BuyTogether: [map{id: str, name: str}] # Array of objects, each containing ID and Name of an SKU to be added in the first list of the **Buy Together** promotion. Learn more about this type of promotion in the [Creating a Buy Together promotion](https://help.vtex.com/en/tutorial/buy-together--tutorials_323) documentation., listSku2BuyTogether: [map{id: str, name: str}] # Array of objects, each containing ID and Name of an SKU to be added to the second list of the **Buy Together** promotion. Learn more about this type of promotion in the [Creating a Buy Together promotion](https://help.vtex.com/en/tutorial/buy-together--tutorials_323) documentation., coupon: [str] # List of coupons., totalValueFloor: num # Minimum chart value to activate the promotion or tax., totalValueCeling: num # Maximum chart value to activate the promotion or tax., totalValueIncludeAllItems: bool # Total vale including all items., totalValueMode: str # 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`., collections: [map{id: str, name: str}] # Object composed by the collections that will activate or deactivate the promotion or tax., collectionsIsInclusive: bool # 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., restrictionsBins: [str] # The discount will be granted if the card's BIN is given., cardIssuers: [str] # List of card issuers., totalValuePurchase: num # Total value a client must have in past orders to activate the promotion or tax., slasIds: [str] # The discount will be granted if the shipping method is the same as the one given., isSlaSelected: bool # Applies selected discount only when one of the defined shipping method is selected by the customer., isFirstBuy: bool # Applies the discount only if it's a first buy., firstBuyIsProfileOptimistic: bool # Applies the discount even if the user is not logged., compareListPriceAndPrice: bool # If the **List Price** and **Price** are the same., isDifferentListPriceAndPrice: bool # Applies the promotion or tax only if the list price and price is different., zipCodeRanges: [map{zipCodeFrom: str, zipCodeTo: str, inclusive: bool}] # Range of the zip code that applies the promotion., itemMaxPrice: num # Maximum price of the item., itemMinPrice: num # Minimum price of the item., installment: int # Installment., isMinMaxInstallments: bool # Set if the promotion or tax will be applied considering a minimum and maximum values for installments., minInstallment: int # Minimum value for installment., maxInstallment: int # Maximum value for installment., merchants: [str] # List of merchants., clusterExpressions: [str] # 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](https://help.vtex.com/tutorial/creating-promotion-for-a-customer-cluster--tutorials_342#filling-in-the-customer-cluster-field)., paymentsRules: [str] # List of payment rules., giftListTypes: [str] # Gifts List Type., productsSpecifications: [str] # List of product specifications., affiliates: [map{id: str, name: str}] # Marketplace order identifier. The discount will apply to selected affiliates., maxUsage: int # Defines how many times the promotion or tax can be used., maxUsagePerClient: int # Defines if the promotion can be used multiple times per client., shouldDistributeDiscountAmongMatchedItems: bool # Should distribute discount among matched items., multipleUsePerClient: bool # Defines if the promotion can be used multiple times per client., accumulateWithManualPrice: bool # Allows the promotion to apply to products whose prices have been manually added by a call-center operator., useNewProgressiveAlgorithm: bool # Use new progressive algorithm., percentualDiscountValueList: [num] # Percentual discount value list., optIn: map{sellers: [str]} # Object defining the sellers that opted in to participate in the promotion. If null, the promotion is not restricted by seller opt-in.}
@returns(200) {idCalculatorConfiguration: str, name: str, description: str, beginDateUtc: str, endDateUtc: str, lastModified: str, daysAgoOfPurchases: int, isActive: bool, isArchived: bool, isFeatured: bool, disableDeal: bool, activeDaysOfWeek: [str], offset: int, activateGiftsMultiplier: bool, newOffset: num, maxPricesPerItems: [str], cumulative: bool, discountType: str, nominalShippingDiscountValue: num, absoluteShippingDiscountValue: num, nominalDiscountValue: num, maximumUnitPriceDiscount: num, percentualDiscountValue: num, rebatePercentualDiscountValue: num, percentualShippingDiscountValue: num, percentualTax: num, shippingPercentualTax: num, percentualDiscountValueList1: num, percentualDiscountValueList2: num, skusGift: map{quantitySelectable: int, gifts: int}, nominalRewardValue: num, percentualRewardValue: num, orderStatusRewardValue: str, maxNumberOfAffectedItems: int, maxNumberOfAffectedItemsGroupKey: str, applyToAllShippings: bool, nominalTax: num, origin: str, idSeller: str, idSellerIsInclusive: bool, idsSalesChannel: [str], areSalesChannelIdsExclusive: bool, marketingTags: [str], marketingTagsAreNotInclusive: bool, paymentsMethods: [map], stores: [str], campaigns: [str], conditionsIds: [str], storesAreInclusive: bool, categories: [map], categoriesAreInclusive: bool, brands: [map], brandsAreInclusive: bool, products: [map], productsAreInclusive: bool, skus: [map], skusAreInclusive: bool, utmSource: str, utmCampaign: str, collections1BuyTogether: [map], collections2BuyTogether: [map], minimumQuantityBuyTogether: int, quantityToAffectBuyTogether: int, enableBuyTogetherPerSku: bool, listSku1BuyTogether: [map], listSku2BuyTogether: [map], coupon: [str], totalValueFloor: num, totalValueCeling: num, totalValueIncludeAllItems: bool, totalValueMode: str, collections: [map], collectionsIsInclusive: bool, restrictionsBins: [str], cardIssuers: [str], totalValuePurchase: num, slasIds: [str], isSlaSelected: bool, isFirstBuy: bool, firstBuyIsProfileOptimistic: bool, compareListPriceAndPrice: bool, isDifferentListPriceAndPrice: bool, zipCodeRanges: [map], itemMaxPrice: num, itemMinPrice: num, installment: int, isMinMaxInstallments: bool, minInstallment: int, maxInstallment: int, merchants: [str], clusterExpressions: [str], paymentsRules: [str], giftListTypes: [str], productsSpecifications: [str], affiliates: [map], maxUsage: int, maxUsagePerClient: int, shouldDistributeDiscountAmongMatchedItems: bool, multipleUsePerClient: bool, accumulateWithManualPrice: bool, type: str, useNewProgressiveAlgorithm: bool, percentualDiscountValueList: [num], optIn: map?{sellers: [str]}} # OK
@errors {400: Bad request.}
@example_request {"idCalculatorConfiguration":"d8a1cd2e-b667-4054-b3ae-b79124c7218e","name":"Promotion Social Seller","description":"Promotion for Social Seller","beginDateUtc":"2020-05-01T18:47:15.89Z","lastModified":"2021-09-17T18:13:16.2896414Z","daysAgoOfPurchases":0,"isActive":true,"isArchived":false,"isFeatured":false,"disableDeal":false,"activeDaysOfWeek":[],"offset":-3,"activateGiftsMultiplier":false,"newOffset":-3,"maxPricesPerItems":[],"cumulative":false,"discountType":"percentual","nominalShippingDiscountValue":0,"absoluteShippingDiscountValue":0,"nominalDiscountValue":10,"nominalDiscountType":"item","maximumUnitPriceDiscount":0,"percentualDiscountValue":10,"rebatePercentualDiscountValue":0,"percentualShippingDiscountValue":0,"percentualTax":0,"shippingPercentualTax":0,"percentualDiscountValueList1":0,"percentualDiscountValueList2":0,"skusGift":{"quantitySelectable":0},"nominalRewardValue":0,"percentualRewardValue":0,"orderStatusRewardValue":"invoiced","maxNumberOfAffectedItems":0,"maxNumberOfAffectedItemsGroupKey":"perCart","applyToAllShippings":false,"nominalTax":0,"origin":"marketplace","idSellerIsInclusive":false,"idsSalesChannel":[],"areSalesChannelIdsExclusive":false,"marketingTags":[],"marketingTagsAreNotInclusive":false,"paymentsMethods":[],"stores":[],"campaigns":[],"conditionsIds":["372e1868-2c0e-4437-be45-1ef8c9cab735"],"storesAreInclusive":false,"categories":[],"categoriesAreInclusive":false,"brands":[],"brandsAreInclusive":false,"products":[],"productsAreInclusive":false,"skus":[],"skusAreInclusive":true,"utmSource":"georgeSource","utmCampaign":"georgeTest","collections1BuyTogether":[],"collections2BuyTogether":[],"minimumQuantityBuyTogether":0,"quantityToAffectBuyTogether":0,"enableBuyTogetherPerSku":false,"listSku1BuyTogether":[],"listSku2BuyTogether":[],"coupon":[],"totalValueFloor":0,"totalValueCeling":0,"totalValueIncludeAllItems":false,"totalValueMode":"IncludeMatchedItems","collections":[],"collectionsIsInclusive":false,"restrictionsBins":[],"cardIssuers":[],"totalValuePurchase":0,"slasIds":[],"isSlaSelected":false,"isFirstBuy":false,"firstBuyIsProfileOptimistic":false,"compareListPriceAndPrice":false,"isDifferentListPriceAndPrice":false,"zipCodeRanges":[{"zipCodeFrom":"20000-000","zipCodeTo":"20000-100","inclusive":true}],"itemMaxPrice":0,"itemMinPrice":0,"installment":0,"isMinMaxInstallments":false,"minInstallment":0,"maxInstallment":0,"merchants":[],"clusterExpressions":[],"paymentsRules":[],"giftListTypes":[],"productsSpecifications":[],"affiliates":[],"maxUsage":0,"maxUsagePerClient":0,"shouldDistributeDiscountAmongMatchedItems":false,"multipleUsePerClient":false,"accumulateWithManualPrice":false,"type":"regular","useNewProgressiveAlgorithm":false,"percentualDiscountValueList":[],"optIn":{"sellers":["seller-id-1","seller-id-2"]}}

@endpoint POST /api/rnb/pvt/import/calculatorConfiguration
@desc Create multiple SKU promotion
@required {X-VTEX-calculator-name: str # Promotion Name., X-VTEX-start-date: str # Promotion start date., X-VTEX-end-date: str # Promotion end date., X-VTEX-accumulate-with-manual-prices: bool # Condition that will accumulate the Promotion with manual prices or not.}
@optional {X-VTEX-cumulative: bool # Defines if the Promotion is cumulative with other promotions., X-VTEX-cluster-operator: str # This header allows implementing the Promotion in multiples client clusters. You can set the value as `all` - the Promotion will be valid to all the clusters - or `any` - the Promotion will be valid to any of the clusters., X-VTEX-cluster-expression: str # Cluster that will be included in the Promotion. To add multiple clusters, create a header for each one of them.}
@returns(200) OK

@endpoint PUT /api/rnb/pvt/import/calculatorConfiguration/{promotionId}
@desc Update multiple SKU promotion
@required {X-VTEX-calculator-name: str # Promotion Name., X-VTEX-start-date: str # Promotion start date., X-VTEX-end-date: str # Promotion end date., X-VTEX-accumulate-with-manual-prices: bool # Condition that will accumulate the Promotion with manual prices or not., promotionId: str # Promotion unique identifier.}
@optional {X-VTEX-cumulative: bool # Defines if the Promotion is cumulative with other promotions., X-VTEX-cluster-operator: str # This header allows implementing the Promotion in multiples client clusters. You can set the value as `all` - the Promotion will be valid to all the clusters - or `any` - the Promotion will be valid to any of the clusters., X-VTEX-cluster-expression: str # Cluster that will be included in the Promotion. To add multiple clusters, create a header for each one of them.}
@returns(202) Accepted

@endpoint POST /api/rnb/pvt/archive/calculatorConfiguration/{idCalculatorConfiguration}
@desc Archive promotion or tax
@required {idCalculatorConfiguration: str # Promotion ID or tax ID.}
@returns(204) No Content

@endpoint POST /api/rnb/pvt/unarchive/calculatorConfiguration/{idCalculatorConfiguration}
@desc Unarchive promotion or tax
@required {idCalculatorConfiguration: str # Promotion ID or tax ID.}
@returns(204) No Content

@endpoint GET /api/rnb/pvt/archive/benefits/calculatorConfiguration
@desc List archived promotions
@returns(200) {items: [map], nominalDiscountType: str} # OK

@endpoint GET /api/rnb/pvt/archive/taxes/calculatorConfiguration
@desc List archived taxes
@returns(200) {items: [map]} # OK

@endgroup

@group price-sheet
@endpoint GET /price-sheet/{skuId}
@desc Get price by SKU ID
@required {an: str # VTEX account name., skuId: str # SKU ID.}
@returns(200) OK

@endpoint DELETE /price-sheet/{skuId}
@desc Delete price by SKU ID
@required {an: str # VTEX account name., skuId: str # SKU ID.}
@returns(200) OK

@endpoint GET /price-sheet/all/{page}/{pageSize}
@desc Get all paged prices
@required {an: str # VTEX account name., page: str # Page number for pagination., pageSize: str # Size of each page for pagination.}
@returns(200) OK

@endpoint POST /price-sheet/context
@desc Get price by context
@required {an: str # VTEX account name., id: int(int32) # Price ID., itemId: int(int32) # Item ID., salesChannel: int(int32) # Sales channel., sellerId: str # Seller ID., validFrom: str # Valid from., validTo: str # Valid to.}
@returns(200) OK
@example_request {"id":6324,"itemId":2390148,"salesChannel":1,"sellerId":"1","validFrom":"2000-01-01T00:00:00","validTo":"2000-02-01T00:00:00"}

@endpoint GET /price-sheet/{skuId}/{tradePolicy}
@desc Get price by SKU ID and trade policy
@required {an: str # Account name., skuId: str # SKU ID., tradePolicy: str # Trade policy name.}
@returns(200) OK

@endpoint POST /price-sheet
@desc Save price
@required {an: str # VTEX account name.}
@returns(200) OK
@example_request [{"itemId":2390148,"salesChannel":1,"sellerId":1,"price":1,"listPrice":1,"validFrom":"2016-01-01T02:00:00Z","validTo":"2017-01-01T02:00:00Z"}]

@endgroup

@group pub
@endpoint POST /pub/bundles
@desc Calculate discounts and taxes bundles
@required {isShoppingCart: bool # Indicates whether the item is a shopping cart., origin: str # Origin., salesChannel: str # Sales channel., profileId: str # Profile ID., items: [map{index!: int(int32), id!: str, quantity!: int(int32), isGift!: bool, measurementUnit!: str, unitMultiplier!: int(int32), priceTags!: [str], params!: [map], priceSheet!: [str], logisticsInfos!: [str], sellerId!: str, productSpecifications!: [str]}] # List of items.}
@returns(200) OK
@example_request {"isShoppingCart":true,"origin":"Marketplace","salesChannel":"1","profileId":"aa","items":[{"index":0,"id":"160","quantity":3,"isGift":false,"measurementUnit":"un","unitMultiplier":1,"priceTags":[],"params":[{"name":"Seller@CatalogSystem","value":"1"},{"name":"product@CatalogSystem","value":"94"}],"priceSheet":[],"logisticsInfos":[],"sellerId":"1","productSpecifications":[]}],"params":[{"name":"product@CatalogSystem","value":"2662"},{"name":"couponCode@Marketing","value":"coupon"}]}

@endgroup

@group api
@endpoint GET /api/rnb/pvt/campaignConfiguration/{campaignId}
@desc Get campaign audience configuration
@required {campaignId: str # Campaign audience unique identifier.}
@returns(200) {beginDateUtc: str, endDateUtc: str, id: str, name: str, isActive: bool, isAndOperator: bool, isArchived: bool, lastModified: map{dateUtc: str, user: str}, targetConfigurations: [map]} # OK

@endpoint GET /api/rnb/pvt/campaignConfiguration
@desc Get all campaign audiences
@returns(200) OK

@endpoint POST /api/rnb/pvt/campaignConfiguration
@desc Create campaign audience
@optional {beginDateUtc: str # Start date of the campaign audience in UTC format., endDateUtc: str # End date of the campaign audience in UTC format., id: str # Campaign audience ID., name: str # Campaign audience name., isActive: bool # Defines if the campaign audience is active (`true`) or not (`false`)., isAndOperator: bool # When `true`, determines that all the `targetConfigurations` need to be valid for the campaign audience to be active. When `false`, determines that if at least one of the `targetConfigurations` is valid, the campaign audience will be active., isArchived: bool # Defines if the campaign audience is archived (`true`) or not (`false`)., lastModified: map{dateUtc: str, user: str} # Object with information about the last update of the campaign audience., targetConfigurations: [map{featured: bool, id: str, name: str, daysAgoOfPurchases: int, origin: str, idSellerIsInclusive: bool, idsSalesChannel: [str], areSalesChannelIdsExclusive: bool, marketingTags: [str], marketingTagsAreNotInclusive: bool, paymentsMethods: [map], stores: [str], campaigns: [str], storesAreInclusive: bool, categories: [map], categoriesAreInclusive: bool, brands: [map], brandsAreInclusive: bool, products: [map], productsAreInclusive: bool, skus: [map], skusAreInclusive: bool, collections1BuyTogether: [map], collections2BuyTogether: [map], minimumQuantityBuyTogether: int, quantityToAffectBuyTogether: int, enableBuyTogetherPerSku: bool, listSku1BuyTogether: [map], listSku2BuyTogether: [map], listBrand1BuyTogether: [map], listCategory1BuyTogether: [map], coupon: [str], totalValueFloor: num, totalValueCeling: num, totalValueIncludeAllItems: bool, totalValueMode: str, collections: [map], collectionsIsInclusive: bool, restrictionsBins: [str], cardIssuers: [str], totalValuePurchase: num, slasIds: [str], isSlaSelected: bool, isFirstBuy: bool, firstBuyIsProfileOptimistic: bool, compareListPriceAndPrice: bool, isDifferentListPriceAndPrice: bool, zipCodeRanges: [map], itemMaxPrice: num, itemMinPrice: num, installment: int, isMinMaxInstallments: bool, minInstallment: int, maxInstallment: int, merchants: [str], clusterExpressions: [str], clusterOperator: str, paymentsRules: [str], giftListTypes: [str], productsSpecifications: [str], affiliates: [map], maxUsage: int, maxUsagePerClient: int, shouldDistributeDiscountAmongMatchedItems: bool, multipleUsePerClient: bool, useNewProgressiveAlgorithm: bool, percentualDiscountValueList: [num], type: str, idTypeDiscountBuyTogether: int}] # Array that contains all target audience that the campaign audience will be valid.}
@returns(200) {beginDateUtc: str, endDateUtc: str, id: str, name: str, isActive: bool, isAndOperator: bool, isArchived: bool, lastModified: map{dateUtc: str, user: str}, targetConfigurations: [map]} # OK

@endgroup

@end
