Bom dia pessoal! tudo bem?
Estamos tentando gerar cupom em uma loja, mas sem sucesso. Geramos o cupom e quando vamos usar aparece a mensagem “Cupom expirou”, sendo que adicionamos a expiração para 2 anos depois.
Error: Screenshot by Lightshot
Request para emissão do cupom:
curl --location --request POST '...vtexcommercestable.com.br/api/rnb/pvt/coupon/' \
--header 'Content-Type: application/json' \
--header 'x-vtex-api-apptoken: ??' \
--header 'X-VTEX-API-AppKey: ??' \
--header 'Cookie: janus_sid=11e9c9d7-c232-4fa0-8fd6-8cd07c80d191' \
--data-raw '{
"utmSource": "bufunfaextraaff",
"utmCampaign": null,
"couponCode": "bufunfaextraaff01",
"isArchived": false,
"maxItemsPerClient": 0,
"expirationIntervalPerUse": "00:00:00"
}'
Request para cadastrar a campanha:
curl --request POST \
--url ...vtexcommercestable.com.br/api/rnb/pvt/calculatorconfiguration \
--header 'Content-Type: application/json' \
--header 'X-VTEX-API-AppKey: ??' \
--header 'X-VTEX-API-AppToken: ???' \
--data '
{
"skusGift": {
"gifts": [
{}
],
"quantitySelectable": 1
},
"beginDateUtc": "2021-05-25T12:00:00Z",
"name": "Teste Brinde",
"endDateUtc": "2023-05-25T12:00:00Z",
"lastModified": "2021-05-25T12:00:00Z",
"daysAgoOfPurchases": 0,
"isActive": true,
"isFeatured": false,
"offset": -3,
"newOffset": -3,
"cumulative": false,
"origin": " ",
"idSellerIsInclusive": false,
"maxUsage": 1,
"maxUsagePerClient": 1,
"multipleUsePerClient": false,
"type": "regular",
"nominalShippingDiscountValue": 0,
"absoluteShippingDiscountValue": 0,
"nominalDiscountValue": 0,
"maximumUnitPriceDiscount": 0,
"percentualDiscountValue": 0,
"percentualShippingDiscountValue": 0,
"percentualTax": 0,
"shippingPercentualTax": 0,
"percentualDiscountValueList1": 0,
"percentualDiscountValueList2": 0,
"nominalRewardValue": 0,
"percentualRewardValue": 0,
"maxNumberOfAffectedItems": 0,
"utmSource": "bufunfaextraaff",
"totalValueFloor": 5,
"totalValueCeling": 5,
"totalValueMode": "IncludeMatchedItems"
}
'
Se alguém puder me ajudar agradeço.