curl --request GET \
--url https://api.withorb.com/v1/coupons \
--header 'Authorization: Bearer <token>'{
"data": [
{
"id": "<string>",
"redemption_code": "<string>",
"discount": {
"discount_type": "percentage",
"percentage_discount": 0.5,
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"reason": "<string>"
},
"times_redeemed": 123,
"duration_in_months": 12,
"max_redemptions": 123,
"archived_at": "2023-11-07T05:31:56Z"
}
],
"pagination_metadata": {
"has_more": true,
"next_cursor": "<string>"
}
}This endpoint returns a list of all coupons for an account in a list format.
The list of coupons is ordered starting from the most recently created coupon. The response also includes
pagination_metadata, which lets the caller retrieve the next page of results if they exist. More information
about pagination can be found in the Pagination-metadata schema.
curl --request GET \
--url https://api.withorb.com/v1/coupons \
--header 'Authorization: Bearer <token>'{
"data": [
{
"id": "<string>",
"redemption_code": "<string>",
"discount": {
"discount_type": "percentage",
"percentage_discount": 0.5,
"applies_to_price_ids": [
"h74gfhdjvn7ujokd",
"7hfgtgjnbvc3ujkl"
],
"filters": [
{
"field": "price_id",
"operator": "includes",
"values": [
"<string>"
]
}
],
"reason": "<string>"
},
"times_redeemed": 123,
"duration_in_months": 12,
"max_redemptions": 123,
"archived_at": "2023-11-07T05:31:56Z"
}
],
"pagination_metadata": {
"has_more": true,
"next_cursor": "<string>"
}
}API Keys can be issued in the Orb's web application.
The number of items to fetch. Defaults to 20.
1 <= x <= 100Cursor for pagination. This can be populated by the next_cursor value returned from the initial request.
Show archived coupons as well (by default, this endpoint only returns active coupons).
Filter to coupons matching this redemption code.
OK
Show child attributes
Also referred to as coupon_id in this documentation.
This string can be used to redeem this coupon for a given subscription.
Show child attributes
percentage Only available if discount_type is percentage. This is a number between 0 and 1.
0 <= x <= 1List of price_ids that this discount applies to. For plan/plan phase discounts, this can be a subset of prices.
["h74gfhdjvn7ujokd", "7hfgtgjnbvc3ujkl"]The filters that determine which prices to apply this discount to.
Show child attributes
The property of the price to filter on.
price_id, item_id, price_type, currency, pricing_unit_id Should prices that match the filter be included or excluded.
includes, excludes The IDs or values that match this filter.
The number of times this coupon has been redeemed.
This allows for a coupon's discount to apply for a limited time (determined in months); a null value here means "unlimited time".
12
The maximum number of redemptions allowed for this coupon before it is exhausted; null here means "unlimited".
An archived coupon can no longer be redeemed. Active coupons will have a value of null for archived_at; this field will be non-null for archived coupons.
Was this page helpful?