Coupons
Get coupons
- Documentation
- API Reference
- Integrations
- Changelog
- Blog
- GETGet analytics
- GETGet companies
- GETGet custom properties
- POSTCreate custom property
- PUTUpdate custom property
- DELDelete custom property
- GETGet customers
- POSTCreate customer
- GETGet customer
- PUTUpdate customer
- DELDelete customer
- GETGet customer portal
- PUTArchive customer
- POSTBulk update providers/customers mapping
- GETList credit products
- POSTCreate credit product
- GETGet credit product
- GETList credit transactions
- POSTPurchase credits
- POSTTopup credits
- POSTCreate credits usage
- POSTCreate component token
- GETGet invoices
- POSTCreate one-off invoice
- POSTSends a draft invoice for payment
- GETGet invoice
- GETDownload invoice
- POSTCreate transaction
- GETGet invoicing entities
- POSTCreate invoicing entity
- GETGet invoicing entity
- PUTUpdate invoicing entity
- DELDelete invoicing entity
- POSTCreate payment
- POSTUpdate prices
- POSTRefresh subscriptions
- POSTCreate subscription update
- POSTCancel subscription
- POSTPause subscription
- POSTReactivate subscription
- GETGet subscriptions
- POSTCreate subscription
- GETGet subscription
- POSTRefresh seat products
Analytics
Companies
Custom properties
Customers
Customers > Credits
Integrations
Invoices
Invoicing entities
Payments
Price configurations
Subscriptions
Coupons
Get coupons
Retrieve all existing coupons.
GET
/
v1
/
coupons
Authorization
string
*
Bearer
Authorization
Required
string
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
take
number
take
number
skip
number
skip
number
curl --request GET \
--url https://api.hyperline.co/v1/coupons \
--header 'Authorization: Bearer <token>'
{
"meta": {
"total": 1,
"taken": 1,
"skipped": 123
},
"data": [
{
"id": "cou_DKL4Xcb5VSa8CQ",
"name": "Partner discount",
"description": "<string>",
"expiration_date": "2023-11-07T05:31:56Z",
"redemption_limit": 123,
"created_at": "2023-01-20T16:04:11Z",
"type": "amount",
"discount_amount": 2000,
"currency": "EUR"
}
]
}
Authorizations
Authorization
string
headerrequiredBearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Query Parameters
take
number | null
default: 50skip
number | null
default: 0Response
200 - application/json
meta
object
requiredmeta.total
number
requiredTotal of existing items.
meta.taken
number
requiredNumber of items returned.
meta.skipped
number
requiredNumber of items skipped.
data
object[]
requiredList of Coupon.
data.id
string
requiredCoupon ID.
data.name
string
requiredCoupon name.
data.description
string | null
requiredCoupon description.
data.expiration_date
string | null
requiredDate corresponding to the expiration of the coupon.
data.redemption_limit
number | null
requiredNumber of times the coupon can be used when applied on a subscription.
data.created_at
string
requiredUTC date time string in the ISO 8601 format.
data.type
enum<string>
requiredAvailable options:
amount
data.discount_amount
number
requiredAmount to apply as a discount on the total amount (excluding taxes) of a subscription. Expressed in the currency's smallest unit.
data.currency
string
requiredCurrency code. See ISO 4217.
curl --request GET \
--url https://api.hyperline.co/v1/coupons \
--header 'Authorization: Bearer <token>'
{
"meta": {
"total": 1,
"taken": 1,
"skipped": 123
},
"data": [
{
"id": "cou_DKL4Xcb5VSa8CQ",
"name": "Partner discount",
"description": "<string>",
"expiration_date": "2023-11-07T05:31:56Z",
"redemption_limit": 123,
"created_at": "2023-01-20T16:04:11Z",
"type": "amount",
"discount_amount": 2000,
"currency": "EUR"
}
]
}