Creates or updates (upserts) a coupon with a specified coupon ID.
Coupon resource.
Coupon updated.
required | object (Discount) | ||||||||||||||||
| |||||||||||||||||
issuedTime required | string <date-time> Date and time when the coupon is issued. This value may also be described as start time of the coupon. | ||||||||||||||||
id | string <= 50 characters ID of the coupon. This value is also known as the coupon redemption code. | ||||||||||||||||
Array of objects (CouponRestriction) Coupon restrictions. | |||||||||||||||||
redemptionsCount | integer >= 0 Total number of times that a coupon is redeemed. | ||||||||||||||||
status | string Specifies the current status of the coupon. | ||||||||||||||||
description | string Description of the coupon. Use this field to provide an invoice discount item description. If this field is empty, the invoice discount item description uses the related coupon ID, in the following format:
| ||||||||||||||||
expiredTime | string <date-time> Date and time when the coupon expires. | ||||||||||||||||
createdTime | string <date-time> (CreatedTime) Date and time which is set automatically when the resource is created. | ||||||||||||||||
updatedTime | string <date-time> (UpdatedTime) Date and time which updates automatically when the resource is updated. | ||||||||||||||||
Array of objects (SelfLink) Related links. | |||||||||||||||||
Coupon created.
Location | string <uri> Location of the related resource. Example: "https://api.rebilly.com/example" |
required | object (Discount) | ||||||||||||||||
| |||||||||||||||||
issuedTime required | string <date-time> Date and time when the coupon is issued. This value may also be described as start time of the coupon. | ||||||||||||||||
id | string <= 50 characters ID of the coupon. This value is also known as the coupon redemption code. | ||||||||||||||||
Array of objects (CouponRestriction) Coupon restrictions. | |||||||||||||||||
redemptionsCount | integer >= 0 Total number of times that a coupon is redeemed. | ||||||||||||||||
status | string Specifies the current status of the coupon. | ||||||||||||||||
description | string Description of the coupon. Use this field to provide an invoice discount item description. If this field is empty, the invoice discount item description uses the related coupon ID, in the following format:
| ||||||||||||||||
expiredTime | string <date-time> Date and time when the coupon expires. | ||||||||||||||||
createdTime | string <date-time> (CreatedTime) Date and time which is set automatically when the resource is created. | ||||||||||||||||
updatedTime | string <date-time> (UpdatedTime) Date and time which updates automatically when the resource is updated. | ||||||||||||||||
Array of objects (SelfLink) Related links. | |||||||||||||||||
Unauthorized access. Invalid credentials used.
Resource not found.
Conflict.
Invalid data 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": [
- {
- "href": "string",
- "rel": "self"
}
]
}