Create a coupon.
Coupon resource.
Coupon was created.
Location | string <uri> The location of the related resource. Example: "https://api.rebilly.com/example" |
required | object (Discount) | ||||||||||||||||
| |||||||||||||||||
issuedTime required | string <date-time> Coupon's issued time (start time). | ||||||||||||||||
id | string <= 50 characters Coupon's ID a.k.a redemption code. | ||||||||||||||||
Array of objects (CouponRestriction) Coupon restrictions. | |||||||||||||||||
redemptionsCount | integer >= 0 Coupon's redemptions count. | ||||||||||||||||
status | string If coupon enabled. | ||||||||||||||||
description | string Your coupon description. When it is not empty this is used for invoice discount item description, otherwise the item's description uses coupon's ID like 'Coupon "COUPON-ID"'. | ||||||||||||||||
expiredTime | string <date-time> Coupon's expire time (end time). | ||||||||||||||||
createdTime | string <date-time> Coupon created time. | ||||||||||||||||
updatedTime | string <date-time> Read-only timestamp updates when the resource is updated. | ||||||||||||||||
Array of objects (Self) non-empty The links related to resource. | |||||||||||||||||
Unauthorized access, invalid credentials were used.
Access forbidden.
Invalid data was sent.
{- "discount": {
- "type": "fixed",
- "context": "items"
}, - "restrictions": [
- {
- "type": "discounts-per-redemption"
}
], - "description": "string",
- "issuedTime": "2019-08-24T14:15:22Z",
- "expiredTime": "2019-08-24T14:15:22Z"
}
{- "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
- "discount": {
- "type": "fixed",
- "context": "items"
}, - "restrictions": [
- {
- "type": "discounts-per-redemption"
}
], - "redemptionsCount": 0,
- "status": "draft",
- "description": "string",
- "issuedTime": "2019-08-24T14:15:22Z",
- "expiredTime": "2019-08-24T14:15:22Z",
- "createdTime": "2019-08-24T14:15:22Z",
- "updatedTime": "2019-08-24T14:15:22Z",
- "_links": [
- {
- "rel": "self",
- "href": "string"
}
]
}