Affiliate coupon
Read, create, change, disable, or re-enable the coupon tied to one affiliate.
Each affiliate can have one coupon of their own, the code they share with customers. GET shows it with a status of not_configured, enabled, or disabled.
PATCH creates the coupon when there is none (send code, type, discount, and store_wide) and otherwise changes only the fields you send. Any PATCH, even {}, re-enables a disabled coupon. A store-wide coupon has products: [], and you can send a coupon you read back unchanged. maximum_discount_amount caps a percentage coupon in the store currency's major unit; null removes the cap.
DELETE disables the coupon: customers can no longer use it, but it stays tied to the affiliate and keeps its code, so a later PATCH brings it back. When the affiliate's membership is active, SellApp emails them each time their coupon is disabled or re-enabled.
Changing the coupon needs the affiliate, affiliate:write, and coupon API-key abilities, and the staff member who owns the key needs the affiliate, coupon, and store permissions.
AuthorizationBearer <API Key>Provide your SellApp API key as a bearer token.
affiliate*integerThe affiliate ID in your store.
X-STORE?stringStore slug. Required for OAuth access tokens. API keys may omit it to use their current store, or the first accessible store when no current store is selected.
Successful response.
application/json- response
data*curl -X GET 'https://sell.app/api/v2/affiliates/88/coupon' \ -H 'X-STORE: launch-lab'{ "data": { "affiliate_id": 88, "status": "enabled", "coupon": { "id": 315, "code": "ALEX15", "type": "PERCENTAGE", "discount": "15", "limit": null, "store_wide": true, "minimum_amount": null, "expires_at": null, "created_at": "2026-07-03T09:12:00.000000Z", "updated_at": "2026-07-03T09:12:00.000000Z", "store_id": 1, "deleted_at": null, "products": [], "product_variants": [], "maximum_discount_amount": "20", "applies_to": "one_time", "subscription_payments": null } }}AuthorizationBearer <API Key>Provide your SellApp API key as a bearer token.
affiliate*integerThe affiliate ID in your store.
X-STORE?stringStore slug. Required for OAuth access tokens. API keys may omit it to use their current store, or the first accessible store when no current store is selected.
application/json- body
code?stringlength <= 255type?string"PERCENTAGE""AMOUNT"discount?|A decimal discount value of at least 1. Percentage discounts cannot exceed 100; amount discounts use the store currency's major unit. A subscriptions coupon cannot take 100% off: that returns 422 on discount, so offer a free trial instead.
1 <= valuelength <= 255store_wide?booleanproducts?array<integer>Product IDs the coupon applies to. Required with at least one ID when store_wide is false; send [] (or leave it out) for a store-wide coupon.
product_variants?array<integer>Optional variant restrictions. Every variant must belong to a selected product. Products without listed variants remain eligible on all variants. Each variant you add must be of the coupon's kind, a subscription plan or a one-time variant; another returns 422 on product_variants.
limit?|1 <= valueexpires_at?|A future date and time, or null for no expiry.
date-timeminimum_amount?||A decimal minimum amount in the store currency's major unit that the order lines of the coupon's kind must reach, or null for no minimum.
1 <= valuelength <= 255applies_to?stringWhat the coupon discounts: one_time for one-time purchases, or subscriptions for the first payments of a subscription plan. A new coupon defaults to one_time, and an update that leaves this out keeps the current kind. The coupon only discounts order lines of its kind.
"one_time""subscriptions"subscription_payments?|How many payments a subscriptions coupon discounts, counting the signup payment as the first, so 3 discounts the signup and the next two renewals. A subscriptions coupon needs one, and an update that leaves it out keeps the stored number. Missing on a subscriptions coupon, or outside 1 to 36, it returns 422 on subscription_payments with The number of discounted payments must be between 1 and 36. A one_time coupon always stores null here.
1 <= value <= 36maximum_discount_amount?|Optional cap on the discount of a percentage coupon, as a decimal string of at least "1" in the store currency's major unit, such as "20". null removes the cap. Sending it for an AMOUNT coupon returns 422, and changing a coupon to AMOUNT removes its cap.
Successful response.
application/json- response
data*curl -X PATCH 'https://sell.app/api/v2/affiliates/88/coupon' \ -H 'X-STORE: launch-lab' \ -H 'Content-Type: application/json' \ -d '{ "code": "ALEX15", "type": "PERCENTAGE", "discount": "15", "store_wide": true, "maximum_discount_amount": "20"}'{ "data": { "affiliate_id": 88, "status": "enabled", "coupon": { "id": 315, "code": "ALEX15", "type": "PERCENTAGE", "discount": "15", "limit": null, "store_wide": true, "minimum_amount": null, "expires_at": null, "created_at": "2026-07-03T09:12:00.000000Z", "updated_at": "2026-07-03T09:12:00.000000Z", "store_id": 1, "deleted_at": null, "products": [], "product_variants": [], "maximum_discount_amount": "20", "applies_to": "one_time", "subscription_payments": null } }}AuthorizationBearer <API Key>Provide your SellApp API key as a bearer token.
affiliate*integerThe affiliate ID in your store.
X-STORE?stringStore slug. Required for OAuth access tokens. API keys may omit it to use their current store, or the first accessible store when no current store is selected.
Successful response.
application/json- response
data*curl -X DELETE 'https://sell.app/api/v2/affiliates/88/coupon' \ -H 'X-STORE: launch-lab'{ "data": { "affiliate_id": 88, "status": "disabled", "coupon": { "id": 315, "code": "ALEX15", "type": "PERCENTAGE", "discount": "15", "limit": null, "store_wide": true, "minimum_amount": null, "expires_at": null, "created_at": "2026-07-03T09:12:00.000000Z", "updated_at": "2026-07-03T09:12:00.000000Z", "store_id": 1, "deleted_at": "2026-07-03T09:12:00.000000Z", "products": [], "product_variants": [], "maximum_discount_amount": "20", "applies_to": "one_time", "subscription_payments": null } }}