Skip to content
Cipay
Esc
navigateopen⌘Jpreview

Get Discount Detail

GET/v2/discounts/{id}
Authorization
AuthorizationBearer token · headerrequired
Merchant API key scoped to one merchant and environment. Read operations require api:read, normal write operations require api:write, and broadcast mutations also require explicit broadcasts:write.
Path parameters
idstring<uuid>required
Header parameters
x-request-idstring
Optional caller-provided request correlation ID.
min length 1
Responses
200OK
discountobjectrequired
Show properties
idstring<uuid>required
merchantIdstring<uuid>required
environmentstringrequired
Allowed:sandboxproduction
namestringrequired
codestringrequired
statusstringrequired
Allowed:activedisabledarchived
originstringrequired
Allowed:merchantembedded_coupon_backfill
duplicatedFromDiscountIdstring<uuid> | anyrequired
Show properties
Any of:
string<uuid>
string<uuid>
any
any
revisionintegerrequired
min -9007199254740991 · max 9007199254740991
discountTypestringrequired
Allowed:percentfixed_amount
percentOffBpsinteger | anyrequired
Show properties
Any of:
integer
integer
any
any
amountOffHalalasinteger | anyrequired
Show properties
Any of:
integer
integer
any
any
currencyanyrequired
durationstringrequired
Allowed:onceforeverrepeating
repeatingBillingCyclesinteger | anyrequired
Show properties
Any of:
integer
integer
any
any
activeFromstring<date-time>required
activeUntilstring<date-time> | anyrequired
Show properties
Any of:
string<date-time>
string<date-time>
any
any
totalRedemptionLimitinteger | anyrequired
Show properties
Any of:
integer
integer
any
any
perCustomerRedemptionLimitinteger | anyrequired
Show properties
Any of:
integer
integer
any
any
activeReservationCountintegerrequired
min 0 · max 9007199254740991
redeemedCountintegerrequired
min 0 · max 9007199254740991
eligibilityobject[]required
Show properties
Array of object
Any of:
object
scopeTypeanyrequired
productIdstring<uuid>required
planIdany
offerIdany
object
scopeTypeanyrequired
planIdstring<uuid>required
productIdany
offerIdany
object
scopeTypeanyrequired
offerIdstring<uuid>required
productIdany
planIdany
archivedAtstring<date-time> | anyrequired
Show properties
Any of:
string<date-time>
string<date-time>
any
any
createdByUserIdstring<uuid> | anyrequired
Show properties
Any of:
string<uuid>
string<uuid>
any
any
createdAtstring<date-time>required
updatedAtstring<date-time>required
401Standard Cipay error response.
errorobjectrequired
Show properties
codestringrequired
min length 1
messagestringrequired
min length 1
requestIdstringrequired
min length 1
detailsobject
403Standard Cipay error response.
errorobjectrequired
Show properties
codestringrequired
min length 1
messagestringrequired
min length 1
requestIdstringrequired
min length 1
detailsobject
404Standard Cipay error response.
errorobjectrequired
Show properties
codestringrequired
min length 1
messagestringrequired
min length 1
requestIdstringrequired
min length 1
detailsobject
409Standard Cipay error response.
errorobjectrequired
Show properties
codestringrequired
min length 1
messagestringrequired
min length 1
requestIdstringrequired
min length 1
detailsobject
422Standard Cipay error response.
errorobjectrequired
Show properties
codestringrequired
min length 1
messagestringrequired
min length 1
requestIdstringrequired
min length 1
detailsobject
429Standard Cipay error response.
errorobjectrequired
Show properties
codestringrequired
min length 1
messagestringrequired
min length 1
requestIdstringrequired
min length 1
detailsobject
500Standard Cipay error response.
errorobjectrequired
Show properties
codestringrequired
min length 1
messagestringrequired
min length 1
requestIdstringrequired
min length 1
detailsobject
Request
curl -X GET "https://api.cipay.net/v2/discounts/%3Cuuid%3E" \
  -H "Authorization: Bearer YOUR_TOKEN"
Response
{
  "discount": {
    "id": "<uuid>",
    "merchantId": "<uuid>",
    "environment": "sandbox",
    "name": "string",
    "code": "string",
    "status": "active",
    "origin": "merchant",
    "duplicatedFromDiscountId": "<uuid>",
    "revision": 0,
    "discountType": "percent",
    "percentOffBps": 0,
    "amountOffHalalas": 0,
    "currency": "SAR",
    "duration": "once",
    "repeatingBillingCycles": 0,
    "activeFrom": "2024-01-01T00:00:00Z",
    "activeUntil": "2024-01-01T00:00:00Z",
    "totalRedemptionLimit": 0,
    "perCustomerRedemptionLimit": 0,
    "activeReservationCount": 0,
    "redeemedCount": 0,
    "eligibility": [
      {
        "scopeType": "product",
        "productId": "<uuid>",
        "planId": "string",
        "offerId": "string"
      }
    ],
    "archivedAt": "2024-01-01T00:00:00Z",
    "createdByUserId": "<uuid>",
    "createdAt": "2024-01-01T00:00:00Z",
    "updatedAt": "2024-01-01T00:00:00Z"
  }
}