curl --request POST \
--url https://api.unibee.top/merchant/discount/decrease_quantity \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"amount": 123,
"id": 123
}'
{
"code": 123,
"data": {
"discountCode": {
"advance": true,
"billingType": 123,
"code": "<string>",
"createTime": 123,
"currency": "<string>",
"cycleLimit": 123,
"discountAmount": 123,
"discountPercentage": 123,
"discountType": 123,
"endTime": 123,
"id": 123,
"isDeleted": 123,
"merchantId": 123,
"metadata": {},
"name": "<string>",
"planApplyType": 123,
"planIds": [
123
],
"quantity": 123,
"startTime": 123,
"status": 123,
"upgradeLongerOnly": true,
"upgradeOnly": true,
"userLimit": 123,
"userScope": 123
}
},
"message": "<string>",
"redirect": "<string>",
"requestId": "<string>"
}
Decrease discount code quantity, the quantity after decreased should greater than 0, the action may disable quantity control if quantity decrease to 0 or lower than quantityUsed after decreased
curl --request POST \
--url https://api.unibee.top/merchant/discount/decrease_quantity \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"amount": 123,
"id": 123
}'
{
"code": 123,
"data": {
"discountCode": {
"advance": true,
"billingType": 123,
"code": "<string>",
"createTime": 123,
"currency": "<string>",
"cycleLimit": 123,
"discountAmount": 123,
"discountPercentage": 123,
"discountType": 123,
"endTime": 123,
"id": 123,
"isDeleted": 123,
"merchantId": 123,
"metadata": {},
"name": "<string>",
"planApplyType": 123,
"planIds": [
123
],
"quantity": 123,
"startTime": 123,
"status": 123,
"upgradeLongerOnly": true,
"upgradeOnly": true,
"userLimit": 123,
"userScope": 123
}
},
"message": "<string>",
"redirect": "<string>",
"requestId": "<string>"
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Decrease discount code quantity, the quantity after decreased should greater than 0, the action may disable quantity control if quantity decrease to 0 or lower than quantityUsed after decreased
The response is of type object
.