cURL
curl --request POST \ --url https://api.selltrust.com.br/api/v1/coupon \ --header 'Authorization: <authorization>' \ --header 'Content-Type: application/json' \ --data ' { "code": "<string>", "discount_type": "<string>", "discount_value": 123, "min_order_value": 123, "max_uses": 123, "expires_at": "<string>", "active": true, "product_ids": [ {} ] } '
{ "id": "uuid-do-cupom", "store_id": "uuid-da-loja", "code": "PROMO10", "discount_type": "PERCENTAGE", "discount_value": 10, "min_order_value": null, "max_uses": null, "used_count": 0, "expires_at": null, "active": true, "product_ids": [], "created_at": "2024-01-01T00:00:00.000Z", "updated_at": "2024-01-01T00:00:00.000Z" }
FIXED
PERCENTAGE
Bearer <seu_token>