The coupon object
A comprehensive list of the coupon resource's attributes and relationships
A coupon object is returned as part of the response body of each successful list, retrieve, create or update API call to the /api/coupons
endpoint.
Fields
Field | Type | Description |
---|---|---|
type |
|
|
id |
| The coupon unique identifier |
links.self |
| The coupon endpoint URL |
attributes.code |
| The coupon code, that uniquely identifies the coupon within the promotion rule. |
attributes.customer_single_use |
| Indicates if the coupon can be used just once per customer. |
attributes.usage_limit |
| The total number of times this coupon can be used. |
attributes.usage_count |
| The number of times this coupon has been used. |
attributes.recipient_email |
| The email address of the associated recipient. When creating or updating a coupon, this is a shortcut to find or create the associated recipient by email. |
attributes.expires_at |
| Time at which the coupon will expire. |
attributes.created_at |
| Time at which the resource was created. |
attributes.updated_at |
| Time at which the resource was last updated. |
attributes.reference |
| A string that you can use to add any external identifier to the resource. This can be useful for integrating the resource to an external system, like an ERP, a marketing tool, a CRM, or whatever. |
attributes.reference_origin |
| Any identifier of the third party system that defines the reference code. |
attributes.metadata |
| Set of key-value pairs that you can attach to the resource. This can be useful for storing additional information about the resource in a structured format. |
relationships.promotion_rule |
| The associated promotion rule. |
relationships.coupon_recipient |
| The associated coupon recipient (optional). |
relationships.events |
| The associated events. |
relationships.tags |
| The associated tags. Cannot be passed by sales channels. |
relationships.versions |
| The associated changes. |
meta.mode |
| The resource environment (can be one of |
Last updated