Retrieves the discount with the given ID.
curl "https://api.lemonsqueezy.com/v1/discounts/1" \ -H 'Accept: application/vnd.api+json' \ -H 'Content-Type: application/vnd.api+json' \ -H 'Authorization: Bearer {api_key}'
Returns a Discount object.
{ "jsonapi": { "version": "1.0" }, "links": { "self": "https://api.lemonsqueezy.com/v1/discounts/1" }, "data": { "type": "discounts", "id": "1", "attributes": { "store_id": 1, "name": "10%", "code": "10PERC", "amount": 10, "amount_type": "percent", "is_limited_to_products": false, "is_limited_redemptions": false, "max_redemptions": 0, "starts_at": null, "expires_at": null, "duration": "once", "duration_in_months": 1, "status": "published", "status_formatted": "Published", "created_at": "2021-05-24T14:15:06.000000Z", "updated_at": "2021-05-24T14:15:06.000000Z", "test_mode": false }, "relationships": { "store": { "links": { "related": "https://api.lemonsqueezy.com/v1/discounts/1/store", "self": "https://api.lemonsqueezy.com/v1/discounts/1/relationships/store" } }, "variants": { "links": { "related": "https://api.lemonsqueezy.com/v1/discounts/1/variants", "self": "https://api.lemonsqueezy.com/v1/discounts/1/relationships/variants" } }, "discount-redemptions": { "links": { "related": "https://api.lemonsqueezy.com/v1/discounts/1/discount-redemptions", "self": "https://api.lemonsqueezy.com/v1/discounts/1/relationships/discount-redemptions" } } }, "links": { "self": "https://api.lemonsqueezy.com/v1/discounts/1" } } }
Previous
Next