cURL
curl --request PATCH \ --url https://api.centralcart.com.br/v1/app/discount/{discount-id} \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "coupon": "<string>", "applies_to": [ 123 ], "type": "<string>", "value": 123, "max_uses": 123, "expires_in": "<string>" }'
{ "id": 3361, "store_id": 1, "coupon": "50OFF", "type": "PERCENTAGE", "value": 5, "applies_to": [10,11], "uses": 0, "max_uses": null, "expires_in": "2024-10-16T00:00:00.000-03:00", "created_at": "2023-05-10T21:47:17.000-03:00", "updated_at": "2023-09-14T12:04:46.000-03:00" }
Atualiza um cupom de desconto.
PRICE
PERCENTAGE