Skip to main content
GET
/
discount-coupons
/
{code}
Retrieve a discount coupon
curl --request GET \
  --url https://api.salesbricks.com/api/v2/discount-coupons/{code} \
  --header 'X-SALESBRICKS-KEY: <api-key>'
{
  "code": "<string>",
  "name": "<string>",
  "description": "<string>",
  "expires_at": "2023-11-07T05:31:56Z",
  "discount_type": "<string>",
  "discount_rate": "<string>",
  "duration_months": 123,
  "active": true,
  "is_expired": true
}

Documentation Index

Fetch the complete documentation index at: https://docs.salesbricks.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

X-SALESBRICKS-KEY
string
header
required

API key for authentication

Path Parameters

code
string
required

The coupon code to retrieve (case-insensitive)

Response

Serializer for discount coupon information.

code
string
required
read-only

Unique coupon code used to redeem this discount

name
string
required
read-only

Display name for the coupon

description
string
required
read-only

Description of what this coupon provides

expires_at
string<date-time> | null
required
read-only

When this coupon expires (null means no expiration)

discount_type
string
required
read-only

The type of discount this coupon provides. Only duration discount is supported for now.

discount_rate
string<decimal> | null
required
read-only

Percentage discount rate applied for the duration period

Pattern: ^-?\d{0,14}(?:\.\d{0,6})?$
duration_months
integer | null
required
read-only

Number of months the duration discount applies (999 means forever)

active
boolean
required
read-only

Whether this coupon is currently active and can be used

is_expired
boolean
required
read-only

Whether this coupon has expired