PUT /coupons/{id}
Creates or updates (upserts) a coupon with a specified coupon ID.
Servers
- https://api-sandbox.rebilly.com/organizations/{organizationId}
- https://api.rebilly.com/organizations/{organizationId}
Request headers
| Name | Type | Required | Description |
|---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Request body fields
| Name | Type | Required | Description |
|---|---|---|---|
id |
String | No |
ID of the coupon. This value is also known as the coupon redemption code. |
_links[] |
Array | No |
Related links. |
_links[].href |
String | No |
Link URL. |
_links[].rel |
String | No |
Type of link. Valid values:
|
restrictions[] |
Array | No |
Coupon restrictions.
All |
issuedTime |
String | Yes |
Date and time when the coupon is issued. This value may also be described as start time of the coupon. |
description |
String | No |
Description of the coupon. Use this field to provide a description for the invoice discount item. If this field is empty,
the invoice discount item description uses the related coupon ID,
in the following format: |
revision |
Integer | No |
Number of times the coupon data has been modified. Use the revision number when analyzing webhook data to determine if a change should take precedence over the current representation. |
updatedTime |
String | No |
Date and time when the resource is updated. This value is set automatically when the resource is updated. |
createdTime |
String | No |
Date and time when the resource is created. This value is set automatically when the resource is created. |
redemptionsCount |
Integer | No |
Total number of times that a coupon is redeemed. |
status |
String | No |
Specifies the current status of the coupon. Valid values:
|
expiredTime |
String | No |
Date and time when the coupon expires. |
discount |
Object | Yes |
Coupon discount. |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.