Get Unique Code Details
Returns one unique code with its settings and the courses and organizations it applies to. This is the same endpoint as "Get Promo Code Details", called with the ID of a unique code.
GET
/promocode/{promo_code_id}Get Unique 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": 105,
"promo_code_type": "unique_code",
"promo_code_text": "CODE794607",
"discount": "10.00",
"max_discount_amount": "100.00",
"promo_code_description": "UNIQUE ONES",
"promo_code_creation_time": 1566290107,
"promo_code_start_time": "20 Aug 2019",
"promo_code_end_time": "08 Apr 2021",
"usd_discount": "10.00",
"max_usd_discount_amount": "0.00",
"mapping_details": [
{
"organization_ids": "212,213",
"package_id": 1369,
"promo_code_used": 1
},
{
"organization_ids": "212",
"package_id": 1370,
"promo_code_used": 0
},
{
"organization_ids": "216",
"package_id": 1383,
"promo_code_used": 0
},
{
"organization_ids": "216",
"package_id": 1385,
"promo_code_used": 0
},
{
"organization_ids": "214",
"package_id": 1396,
"promo_code_used": 0
},
{
"organization_ids": "214",
"package_id": 1397,
"promo_code_used": 0
},
{
"organization_ids": "215",
"package_id": 1399,
"promo_code_used": 0
}
]
}
}Access: Institute admins, plus custom roles that can view promo codes.
Path parameters
ID of the unique code, e.g.
promocode/105.Response
codeinteger
Example:
200messagestring
Example:
Successpromo_codeobject
Show child attributesHide child attributes
promo_code.promo_code_idinteger
Example:
105promo_code.discountstring
Example:
10.00Example:
100.00Example:
UNIQUE ONESExample:
1566290107Example:
20 Aug 2019Example:
08 Apr 2021promo_code.usd_discountstring
Example:
10.00Example:
0.00promo_code.mapping_detailsobject[]
One entry per course with
package_id, organization_ids and promo_code_used, which is 1 once the code has been used for that courseShow child attributesHide child attributes
Example:
212,213Example:
1369Example:
1Notes: Amounts come back as strings with two decimals. Rate limit: 30 requests per minute; going over locks you out for 30 minutes.