Get Coupons
GET/coupon/{type?}
Returns Coupons of the requested Company. When the Company has no Coupons an empty array will be returned.
Request
Path Parameters
- "normal"
- Returns all the Coupons, except those which are soft deleted.
- "trashed"
- Returns all the Coupons, including those which are soft deleted.
- "justtrashed"
- Returns only the Coupons which are soft deleted.
Possible values: [trashed
, justtrashed
, normal
]
Default value: normal
How to handle soft deleted ("archived") Coupons.
Responses
- 200
- 403
- 404
Coupons found.
- application/json
- Schema
- Example (from schema)
Schema
Array [
- cheque:
- The Coupon starts at the defined amount and each time it is used the amount will decrease, by the amount it is used.
- fixed-discount:
- The Coupon will apply a fixed discount in terms of money.
- percentage-discount:
- The Coupon will apply a discount percentagewise.
- new-price:
- The Coupon will put the price to the defined amount.
- cheque:
- The total value of the CouponCode in cents. Can be used depending on usage count and applies to count.
- fixed-discount:
- The amount of discount that will be applied in cents.
- percentage-discount:
- The amount of discount that will be applied in percentages (ranges from 0.0 to 100.0).
- new-price:
- The amount to which the new price of the Order or Product Type will be set in cents.
]
Possible values: <= 255 characters
The name of the Coupon.
Possible values: <= 65535 characters
The description for the Coupon.
A note field for extra comments.
Possible values: [cheque
, fixed-discount
, percentage-discount
, new-price
]
The type of the Coupon.
The start date of this Coupon. The start of the date range where it can be used (inclusive).
The end date of this Coupon. The end of the date range where it can be used (exclusive).
Possible values: [enabled
, disabled
]
Whether the Coupon is enabled. When the Coupon is enabled its CouponCodes can be used.
[
{
"name": "string",
"description": "string",
"note": "string",
"type": "cheque",
"start_date": "2023-08-01T14:40:24+00:00",
"end_date": "2023-08-01T14:40:24+00:00",
"status": "enabled",
"amount": 0
}
]
Unauthorized. You do not have permission to retrieve the Coupons of the Company.
- application/json
- Schema
- Example (from schema)
Schema
The general error code.
The exact reason of failure.
{
"error_code": "string",
"error_description": "string"
}
Company not found.
- application/json
- Schema
- Example (from schema)
Schema
The general error code.
The exact reason of failure.
{
"error_code": "string",
"error_description": "string"
}