Skip to main content
GET
/
v1
/
coupons
/
{id}
Retrieve a coupon
curl --request GET \
  --url https://api.yorlet.com/v1/coupons/{id} \
  --header 'Authorization: <api-key>'
{
  "id": "<string>",
  "created": 123,
  "object": "coupon",
  "amount_off": 123,
  "applies_to": {
    "invoice_item_types": [
      "<string>"
    ]
  },
  "currency": "<string>",
  "duration": "<string>",
  "duration_in_months": 123,
  "max_redemptions": 123,
  "metadata": {},
  "name": "<string>",
  "percent_off": 123,
  "redeem_by": 123,
  "valid": true,
  "account": "<string>",
  "deleted": false,
  "times_redeemed": 0
}

Authorizations

Authorization
string
header
required

API Key authentication. Use "Bearer YOUR_API_KEY".

Path Parameters

id
string
required

The id identifier.

Response

200 - application/json

Retrieve a coupon

id
string
required

Unique identifier for the object.

created
number
required

Time at which the object was created. Measured in seconds since the Unix epoch.

object
enum<string>
required
Available options:
coupon
amount_off
number | null
required

The fixed amount that will be taken off the subtotal of any invoices for this customer.

applies_to
object
required

Details on what the coupon can be applied to.

currency
string
required

Three-letter ISO currency code, in lowercase. Must be a supported currency.

duration
string | null
required

Describes how long a customer who applies this coupon will get the discount.

duration_in_months
number | null
required

If duration is repeating, the number of months the coupon applies. Null if coupon does not have a duration in months.

max_redemptions
number | null
required

Maximum number of times this coupon can be redeemed, in total, before it is no longer valid.

metadata
object
required

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

name
string | null
required

Name of the coupon displayed to customers on, for instance, invoices or receipts.

percent_off
number | null
required

Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon.

redeem_by
number | null
required

Date after which the coupon can no longer be redeemed.

valid
boolean
required

Whether the coupon is currently valid and can still be redeemed.

account
string

The account that the object belongs to. Only returned if the request is made with a valid Yorlet-Context header.

deleted
boolean
default:false

Only returned if the object has been deleted.

times_redeemed
number
default:0

Number of times this coupon has been applied to a customer.