{"_id":"58e52cb5eb29471b00493547","__v":1,"version":{"_id":"58112e71ded0340f0085d02a","project":"551e85be610f400d00837db7","__v":4,"createdAt":"2016-10-26T22:30:09.862Z","releaseDate":"2016-10-26T22:30:09.862Z","categories":["58112e72ded0340f0085d02b","58112e72ded0340f0085d02c","58112e72ded0340f0085d02d","58112e72ded0340f0085d02e","58112e72ded0340f0085d02f","58112e72ded0340f0085d030","58112e72ded0340f0085d031","58112e72ded0340f0085d032","58112e72ded0340f0085d033","58112e72ded0340f0085d034","581137cc604d3c230048b7e4","58dc367221742d0f00a73f98","590768e54669da0f00db5c0b"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"new designer","version_clean":"2.0.0","version":"2.0"},"parentDoc":null,"user":"58a36246b2c9e91b00e551cb","category":{"_id":"58112e72ded0340f0085d034","project":"551e85be610f400d00837db7","version":"58112e71ded0340f0085d02a","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-09-18T15:57:19.874Z","from_sync":false,"order":9,"slug":"api-subresources","title":"Merchant API Subresources"},"project":"551e85be610f400d00837db7","updates":["5981088ba696f10014bc9b04"],"next":{"pages":[],"description":""},"createdAt":"2017-04-05T17:43:17.509Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":10,"body":"Here, we're referring to [subscription coupon endpoints.](http://docs.cratejoy.com/docs/subscription-methods#listing-adding-and-removing-subscription-coupons) \n[block:api-header]\n{\n  \"title\": \"About subscription coupons\"\n}\n[/block]\nSubscription coupons are coupons that apply on a subscription's next renewal, or a cancelled or expired subscription's reactivation. They can be added or even removed from a subscription, because *they haven't yet been applied to an order.* \n\nNote: This means they're unlike standard coupons because standard coupons *have already been applied to an order* (e.g. a coupon a subscriber adds to their cart while checking out), so they cannot be added or removed after the fact.\n\nCoupons have a 1-to-many mapping to subscription coupons. Coupon ID maps to a particular coupon within a Cratejoy store, while subscription coupon IDs map to a particular coupon plus subscription. Example: a coupon code \"10OFF\" has a unique ID. If that code \"10OFF\" is applied to 3 different subscriptions, then there will be three distinct `subscription_coupon` IDs.\n\nFor more on how coupons generally work in Cratejoy, please refer to [this help center article](https://help.cratejoy.com/hc/en-us/articles/202717755-Create-a-Coupon). For more on applying coupons to subscriptions, please refer to this help center article, [Add a Coupon to an Existing Subscription](https://help.cratejoy.com/hc/en-us/articles/205019235-Add-a-Coupon-to-an-Existing-Subscription).\n\n\n[block:api-header]\n{\n  \"title\": \"Subscription coupon data\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"**Field** \",\n    \"0-1\": \"**Type**\",\n    \"0-2\": \"**Description**\",\n    \"1-0\": \"`code_used`\",\n    \"1-1\": \"`STRING`\",\n    \"2-0\": \"`coupon_id`\",\n    \"2-1\": \"`INT`\",\n    \"3-0\": \"`enabled`\",\n    \"3-1\": \"`BOOLEAN`\",\n    \"1-2\": \"The coupon code. Note that for subscription coupons, you can only apply the coupon's primary code (not additional codes, found underneath \\\"manage additional codes\\\" in the Cratejoy interface).\",\n    \"2-2\": \"Unique identifier for the coupon. You can find this in the Cratejoy interface for existing coupons in the coupon's URL: my.cratejoy.com/coupon/<CouponId>\",\n    \"3-2\": \"Whether the coupon has been enabled or not.\",\n    \"4-0\": \"`id`\",\n    \"4-1\": \"`INT`\",\n    \"4-2\": \"Unique identifier for the `subscription_coupon`\",\n    \"5-0\": \"`num_renewals`\",\n    \"5-1\": \"`INT`\",\n    \"5-2\": \"The number of renewals that have occurred with this coupon applied.\",\n    \"6-0\": \"`type`\",\n    \"6-1\": \"`STRING`\",\n    \"6-2\": \"Always `subscription_coupon`\",\n    \"7-0\": \"\"\n  },\n  \"cols\": 3,\n  \"rows\": 7\n}\n[/block]","excerpt":"Details on listing, applying, and removing subscription coupons","slug":"subscription-coupons","type":"basic","title":"Subscription Coupons"}

Subscription Coupons

Details on listing, applying, and removing subscription coupons

Here, we're referring to [subscription coupon endpoints.](http://docs.cratejoy.com/docs/subscription-methods#listing-adding-and-removing-subscription-coupons) [block:api-header] { "title": "About subscription coupons" } [/block] Subscription coupons are coupons that apply on a subscription's next renewal, or a cancelled or expired subscription's reactivation. They can be added or even removed from a subscription, because *they haven't yet been applied to an order.* Note: This means they're unlike standard coupons because standard coupons *have already been applied to an order* (e.g. a coupon a subscriber adds to their cart while checking out), so they cannot be added or removed after the fact. Coupons have a 1-to-many mapping to subscription coupons. Coupon ID maps to a particular coupon within a Cratejoy store, while subscription coupon IDs map to a particular coupon plus subscription. Example: a coupon code "10OFF" has a unique ID. If that code "10OFF" is applied to 3 different subscriptions, then there will be three distinct `subscription_coupon` IDs. For more on how coupons generally work in Cratejoy, please refer to [this help center article](https://help.cratejoy.com/hc/en-us/articles/202717755-Create-a-Coupon). For more on applying coupons to subscriptions, please refer to this help center article, [Add a Coupon to an Existing Subscription](https://help.cratejoy.com/hc/en-us/articles/205019235-Add-a-Coupon-to-an-Existing-Subscription). [block:api-header] { "title": "Subscription coupon data" } [/block] [block:parameters] { "data": { "0-0": "**Field** ", "0-1": "**Type**", "0-2": "**Description**", "1-0": "`code_used`", "1-1": "`STRING`", "2-0": "`coupon_id`", "2-1": "`INT`", "3-0": "`enabled`", "3-1": "`BOOLEAN`", "1-2": "The coupon code. Note that for subscription coupons, you can only apply the coupon's primary code (not additional codes, found underneath \"manage additional codes\" in the Cratejoy interface).", "2-2": "Unique identifier for the coupon. You can find this in the Cratejoy interface for existing coupons in the coupon's URL: my.cratejoy.com/coupon/<CouponId>", "3-2": "Whether the coupon has been enabled or not.", "4-0": "`id`", "4-1": "`INT`", "4-2": "Unique identifier for the `subscription_coupon`", "5-0": "`num_renewals`", "5-1": "`INT`", "5-2": "The number of renewals that have occurred with this coupon applied.", "6-0": "`type`", "6-1": "`STRING`", "6-2": "Always `subscription_coupon`", "7-0": "" }, "cols": 3, "rows": 7 } [/block]