Docs home

Get Promo Code Details

Returns one promo code with its settings and the courses, organizations and membership plans it applies to. Use it before editing a code with "Update Promo Code".

GET/promocode/{promo_code_id}
Get Promo Code Details
curl --request GET \
  --url 'https://<your-api-host>/nuSource/api/v1/promocode/{promo_code_id}' \
  --header 'APIKEY: <your-api-key>' \
  --header 'ORGID: <your-org-id>'
{
  "code": 200,
  "message": "Success",
  "promo_code": {
    "promo_code_id": 19378,
    "promo_code_type": "promo_code_discount",
    "promo_code_text": "aSAsdadddddddddddddasdasdddddddd",
    "discount": "12.00",
    "max_discount_amount": "12.00",
    "promo_code_description": "adasdas",
    "promo_code_creation_time": 1637065196,
    "promo_code_start_time": "16 Nov 2021",
    "promo_code_end_time": "30 Nov 2021",
    "usd_discount": "12.00",
    "max_usd_discount_amount": "0.00",
    "mapping_details": [
      {
        "organization_ids": "212",
        "package_id": 1371,
        "promo_code_used": 0
      }
    ]
  }
}

Access: Institute admins, plus custom roles that can view promo codes.

Path parameters
promo_code_idintegerrequired
ID of the promo code, e.g. promocode/19378.
Response200application/json
codeinteger
Example: 200
messagestring
Example: Success
Show child attributesHide child attributes
Example: 19378
promo_code_discount, promo_code_cashback or unique_code
Example: promo_code_discount
Example: aSAsdadddddddddddddasdasdddddddd
Percent
Example: 12.00
Example: 12.00
Example: adasdas
Unix timestamp
Example: 1637065196
Example: 16 Nov 2021
Dates like 16 Nov 2021
Example: 30 Nov 2021
Example: 12.00
One entry per course
Show child attributesHide child attributes
Comma-separated string
Example: 212

Notes: Amounts come back as strings with two decimals ("12.00"). Rate limit: 30 requests per minute; going over locks you out for 30 minutes.

Updated yesterday

Ask AI