| Campo | Tipo | Obrigatório | Formato |
|---|---|---|---|
code | string | Não | |
salesman | integer | Não | |
applicationType | integer | Sim | |
applicationCode | integer | Não | |
description | string | Não | |
info | string | Não | |
value | float | Não | |
percent | float | Não | |
beginDate | string | Sim | Qualquer formato de data desta referência |
endDate | string | Sim | Qualquer formato de data desta referência |
usageLimit | integer | Sim | |
minimumPurchase | float | Não | |
perCustomerUsageLimit | integer | Sim | |
balance | boolean | Não | |
firstOrderOnly | boolean | Não | |
freeShipping | boolean | Não | |
ignoreShippingDiscount | boolean | Não | |
ignoreShippingRuleDiscount | boolean | Não | |
ignoreInstallmentDiscount | boolean | Não | |
ignorePaymentRuleDiscount | boolean | Não | |
ignoreOfferDiscount | boolean | Não | |
ignoreClassificationDiscount | boolean | Não | |
applyToWholeCart | boolean | Não | |
active | boolean | Não | |
batch | boolean | Não | |
batchSize | integer | Não | |
minimumPurchaseOfAssociations | boolean | Não | |
appliesToAllSelectedProducts | boolean | Não | |
priorizeCouponMinimumPurchase | boolean | Não | |
maximumProductsDiscountValue | float | Não | |
password | string | Não | |
externalUse | boolean | Não |
curl --location '/coupons' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"data": {
"code": null,
"applicationType": 1,
"applicationCode": null,
"description": "",
"info": "",
"value": 10.00,
"percent": null,
"beginDate": "2017-01-23",
"endDate": "2020-01-24",
"usageLimit": 1,
"perCustomerUsageLimit": 1,
"firstOrderOnly": false,
"applyToWholeCart": "daafs",
"active": true,
"ignoreOfferDiscount": true,
"isBalance": false
}
}'{
"data": {
"id": 200,
"idChildCoupon": null,
"salesman": null,
"code": "T9XG5G2KZZ",
"applicationType": 2,
"applicationCode": null,
"description": "",
"info": "",
"value": null,
"maximumProductsDiscountValue": null,
"percent": 50,
"beginDate": "2017-01-23T00:00:00+0000",
"endDate": "2017-01-24T00:00:00+0000",
"uses": 0,
"usageLimit": 0,
"minimumPurchase": 0,
"minimumPurchaseOfAssociations": false,
"perCustomerUsageLimit": 0,
"actualBalance": null,
"balance": false,
"password": "d41d8cd98f00b204e9800998ecf8007e",
"couponHistory": [],
"freeShipping": false,
"firstOrderOnly": false,
"ignoreShippingDiscount": true,
"ignoreShippingRuleDiscount": true,
"ignoreInstallmentDiscount": false,
"ignorePaymentRuleDiscount": false,
"ignoreOfferDiscount": false,
"ignoreClassificationDiscount": false,
"applyToWholeCart": false,
"active": true,
"externalUse": false,
"batch": false,
"appliesToAllSelectedProducts": false,
"priorizeCouponMinimumPurchase": false
}
}