Promotioncodes Validate promotion code

Check if a promotion code is valid and available

GET
/billing/api/v1/promotion-codes/validate/{code}

Path Parameters

codestringrequired

Promotion code


Responses

200
OK

Response Fields:

  • duration_days (integer)

  • is_lifetime (boolean)

  • plan_id (string)

  • plan_name (string)

  • reason (string)

  • valid (boolean)

Example:

{
  "duration_days": 0,
  "is_lifetime": true,
  "plan_id": "string",
  "plan_name": "string",
  "reason": "string",
  "valid": true
}
400
Bad Request

Example:

{
  "key": "value"
}