@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, Accept: str=application/json}
@endpoints 31
@hint download_for_search
@toc api(24), price-sheet(6), pub(1)

@group api
@endpoint POST /api/rnb/pvt/multiple-coupons
@returns(200)

@endpoint POST /api/rnb/pvt/coupon
@required {utmSource: str, couponCode: str, maxItemsPerClient: int, expirationIntervalPerUse: str}
@optional {utmCampaign: str, isArchived: bool, maxUsage: int}
@returns(200) {lastModifiedUtc: str, utmSource: str, utmCampaign: str, couponCode: str, isArchived: bool, maxItemsPerClient: int, expirationIntervalPerUse: str, maxUsage: int}
@returns(201) {lastModifiedUtc: str, utmSource: str, utmCampaign: str, couponCode: str, isArchived: bool, maxItemsPerClient: int, expirationIntervalPerUse: str, maxUsage: int}

@endpoint GET /api/rnb/pvt/coupon
@returns(200)

@endpoint GET /api/rnb/pvt/coupon/{couponCode}
@required {couponCode: str}
@returns(200) {lastModifiedUtc: str, utmSource: str, utmCampaign: str, couponCode: str, isArchived: bool, maxItemsPerClient: int, expirationIntervalPerUse: str, maxUsage: int, groupingKey: str}

@endpoint GET /api/rnb/pvt/archive/coupon/{couponCode}
@required {couponCode: str}
@returns(200) {lastModifiedUtc: str, utmSource: str, utmCampaign: str, couponCode: str, isArchived: bool, maxItemsPerClient: int, expirationIntervalPerUse: str, maxUsage: int, groupingKey: str}

@endpoint POST /api/rnb/pvt/archive/coupon/{couponCode}
@required {couponCode: str}
@returns(200)

@endpoint POST /api/rnb/pvt/coupons
@required {quantity: int, utmSource: str, utmCampaign: str, couponCode: str, maxItemsPerClient: int, expirationIntervalPerUse: str}
@returns(200)

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

@endpoint POST /api/rnb/pvt/unarchive/coupon/{couponCode}
@required {couponCode: str}
@returns(200)

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

@endpoint GET /api/rnb/pvt/benefits/calculatorconfiguration/search
@required {byName: str}
@returns(200)

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

@endpoint GET /api/rnb/pvt/calculatorconfiguration/{idCalculatorConfiguration}
@required {idCalculatorConfiguration: str}
@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]}}

@endpoint POST /api/rnb/pvt/calculatorconfiguration/{promotionId}/seller-opt
@required {promotionId: str, an: str, if-Match: str, sellerIds: [str], operation: str(OptIn/OptOut)}
@returns(200) {lastModified: str}
@errors {400, 401, 404, 412}

@endpoint POST /api/rnb/pvt/calculatorconfiguration
@required {beginDateUtc: str, isActive: bool, percentualShippingDiscountValue: num, origin: str, type: str}
@optional {idCalculatorConfiguration: str, name: str, description: str, endDateUtc: str, lastModified: str, daysAgoOfPurchases: int, 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, percentualTax: num, shippingPercentualTax: num, percentualDiscountValueList1: num, percentualDiscountValueList2: num, skusGift: map{quantitySelectable: int, gifts: [str]}, nominalRewardValue: num, percentualRewardValue: num, orderStatusRewardValue: str, maxNumberOfAffectedItems: int, maxNumberOfAffectedItemsGroupKey: str(perProductId/perCart/perSku), applyToAllShippings: bool, nominalTax: num, idSeller: str, idSellerIsInclusive: bool, idsSalesChannel: [str], areSalesChannelIdsExclusive: bool, marketingTags: [str], marketingTagsAreNotInclusive: bool, paymentsMethods: [map{id: str, name: str}], stores: [str], campaigns: [str], conditionsIds: [str], storesAreInclusive: bool, categories: [map{id: str, name: str}], categoriesAreInclusive: bool, brands: [map{id: str, name: str}], brandsAreInclusive: bool, products: [map{id: str, name: str}], productsAreInclusive: bool, skus: [map{id: str, name: str}], skusAreInclusive: bool, utmSource: str, utmCampaign: str, collections1BuyTogether: [map{id: str, name: str}], collections2BuyTogether: [map{id: str, name: str}], minimumQuantityBuyTogether: int, quantityToAffectBuyTogether: int, enableBuyTogetherPerSku: bool, listSku1BuyTogether: [map{id: str, name: str}], listSku2BuyTogether: [map{id: str, name: str}], coupon: [str], totalValueFloor: num, totalValueCeling: num, totalValueIncludeAllItems: bool, totalValueMode: str, collections: [map{id: str, name: str}], collectionsIsInclusive: bool, restrictionsBins: [str], cardIssuers: [str], totalValuePurchase: num, slasIds: [str], isSlaSelected: bool, isFirstBuy: bool, firstBuyIsProfileOptimistic: bool, compareListPriceAndPrice: bool, isDifferentListPriceAndPrice: bool, zipCodeRanges: [map{zipCodeFrom: str, zipCodeTo: str, inclusive: bool}], itemMaxPrice: num, itemMinPrice: num, installment: int, isMinMaxInstallments: bool, minInstallment: int, maxInstallment: int, merchants: [str], clusterExpressions: [str], paymentsRules: [str], giftListTypes: [str], productsSpecifications: [str], affiliates: [map{id: str, name: str}], maxUsage: int, maxUsagePerClient: int, shouldDistributeDiscountAmongMatchedItems: bool, multipleUsePerClient: bool, accumulateWithManualPrice: bool, useNewProgressiveAlgorithm: bool, percentualDiscountValueList: [num], optIn: map{sellers: [str]}}
@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]}}
@errors {400}

@endpoint POST /api/rnb/pvt/import/calculatorConfiguration
@required {X-VTEX-calculator-name: str, X-VTEX-start-date: str, X-VTEX-end-date: str, X-VTEX-accumulate-with-manual-prices: bool}
@optional {X-VTEX-cumulative: bool, X-VTEX-cluster-operator: str, X-VTEX-cluster-expression: str}
@returns(200)

@endpoint PUT /api/rnb/pvt/import/calculatorConfiguration/{promotionId}
@required {X-VTEX-calculator-name: str, X-VTEX-start-date: str, X-VTEX-end-date: str, X-VTEX-accumulate-with-manual-prices: bool, promotionId: str}
@optional {X-VTEX-cumulative: bool, X-VTEX-cluster-operator: str, X-VTEX-cluster-expression: str}
@returns(202)

@endpoint POST /api/rnb/pvt/archive/calculatorConfiguration/{idCalculatorConfiguration}
@required {idCalculatorConfiguration: str}
@returns(204)

@endpoint POST /api/rnb/pvt/unarchive/calculatorConfiguration/{idCalculatorConfiguration}
@required {idCalculatorConfiguration: str}
@returns(204)

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

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

@endgroup

@group price-sheet
@endpoint GET /price-sheet/{skuId}
@required {an: str, skuId: str}
@returns(200)

@endpoint DELETE /price-sheet/{skuId}
@required {an: str, skuId: str}
@returns(200)

@endpoint GET /price-sheet/all/{page}/{pageSize}
@required {an: str, page: str, pageSize: str}
@returns(200)

@endpoint POST /price-sheet/context
@required {an: str, id: int(int32), itemId: int(int32), salesChannel: int(int32), sellerId: str, validFrom: str, validTo: str}
@returns(200)

@endpoint GET /price-sheet/{skuId}/{tradePolicy}
@required {an: str, skuId: str, tradePolicy: str}
@returns(200)

@endpoint POST /price-sheet
@required {an: str}
@returns(200)

@endgroup

@group pub
@endpoint POST /pub/bundles
@required {isShoppingCart: bool, origin: str, salesChannel: str, profileId: str, 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]}]}
@returns(200)

@endgroup

@group api
@endpoint GET /api/rnb/pvt/campaignConfiguration/{campaignId}
@required {campaignId: str}
@returns(200) {beginDateUtc: str, endDateUtc: str, id: str, name: str, isActive: bool, isAndOperator: bool, isArchived: bool, lastModified: map{dateUtc: str, user: str}, targetConfigurations: [map]}

@endpoint GET /api/rnb/pvt/campaignConfiguration
@returns(200)

@endpoint POST /api/rnb/pvt/campaignConfiguration
@optional {beginDateUtc: str, endDateUtc: str, id: str, name: str, isActive: bool, isAndOperator: bool, isArchived: bool, lastModified: map{dateUtc: str, user: str}, 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}]}
@returns(200) {beginDateUtc: str, endDateUtc: str, id: str, name: str, isActive: bool, isAndOperator: bool, isArchived: bool, lastModified: map{dateUtc: str, user: str}, targetConfigurations: [map]}

@endgroup

@end
