cURL
curl --request POST \ --url https://api.atlas.co/functions/v1/coupons \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "duration": "once", "id": "<string>", "name": "<string>", "percent_off": 50, "amount_off": 123, "currency": "<string>", "duration_in_months": 123, "max_redemptions": 123, "redeem_by": 123, "applies_to": { "products": [ "<string>" ] }, "metadata": {} } '
{ "id": "<string>", "object": "coupon", "name": "<string>", "percent_off": 123, "amount_off": 123, "currency": "<string>", "duration": "<string>", "duration_in_months": 123, "max_redemptions": 123, "times_redeemed": 123, "redeem_by": 123, "applies_to": { "products": [ "<string>" ] }, "valid": true, "metadata": {}, "created": 123 }
API key (sk_test_* or sk_live_*)
once
repeating
forever
Custom coupon code
0 <= x <= 100
Show child attributes
Coupon created
coupon