curl --request POST \
--url https://api.yorlet.com/v1/coupons/{id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>"
}
'{
"id": "<string>",
"created": 123,
"object": "coupon",
"amount_off": 123,
"applies_to": {
"invoice_item_types": [
"<string>"
]
},
"currency": "<string>",
"duration": "<string>",
"duration_in_months": 123,
"max_redemptions": 123,
"metadata": {},
"name": "<string>",
"percent_off": 123,
"redeem_by": 123,
"valid": true,
"account": "<string>",
"deleted": false,
"times_redeemed": 0
}Update a coupon
curl --request POST \
--url https://api.yorlet.com/v1/coupons/{id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>"
}
'{
"id": "<string>",
"created": 123,
"object": "coupon",
"amount_off": 123,
"applies_to": {
"invoice_item_types": [
"<string>"
]
},
"currency": "<string>",
"duration": "<string>",
"duration_in_months": 123,
"max_redemptions": 123,
"metadata": {},
"name": "<string>",
"percent_off": 123,
"redeem_by": 123,
"valid": true,
"account": "<string>",
"deleted": false,
"times_redeemed": 0
}API Key authentication. Use "Bearer YOUR_API_KEY".
The id identifier.
Update a coupon
Unique identifier for the object.
Time at which the object was created. Measured in seconds since the Unix epoch.
coupon Show child attributes
Show child attributes
The account that the object belongs to. Only returned if the request is made with a valid Yorlet-Context header.
Only returned if the object has been deleted.
Was this page helpful?