v1

latestOpenAPI 3.0.02026-07-26258182277.4 KB
Credit

Validate the coupon code for a service

post/credit/validate-coupon

Headers

X-Fieldsstring mask

An optional fields mask

Request body

codestring required

Coupon code

Response

Success

clientIdinteger

The unique client account ID.

couponCodestring required

The coupon code to validate.

errorstring

Error message if coupon is invalid.

isValidboolean

Whether the coupon is valid.

Example response

{
  "coupon": {
    "clientIds": [],
    "customerEligibility": "all",
    "customerEligibilityRules": [],
    "excludedProductIds": [],
    "expireType": "first_billing_period",
    "extraData": {
      "retentionDurationUnit": "months"
    },
    "hasEndDate": true,
    "maxUseSameCartUseType": "first_item",
    "productIds": [],
    "serviceEligibility": "none",
    "type": "%",
    "usageTypeLimit": []
  }
}