Skip to main content
Get discount coupon by code
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
}

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

Unique coupon code used to redeem this discount

name
string
required

Display name for the coupon

description
string
required

Description of what this coupon provides

expires_at
string<date-time> | null
required

When this coupon expires (null means no expiration)

discount_type
string
required

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

discount_rate
string<decimal> | null
required

Percentage discount rate applied for the duration period

duration_months
integer | null
required

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

active
boolean
required

Whether this coupon is currently active and can be used

is_expired
boolean
required

Whether this coupon has expired