Get a Specific Promo Code
This endpoint retrieves a specific promo code by id or code.
info
This operation does not require authentication
HTTP Request
GET /api/v2/promo_code/{id/code}/
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
id/code | path | string | true | A unique integer value or the code identifying this promo code |
Example Request
- JavaScript
- Bash
const headers = {
'Accept':'application/json',
'Authorization': 'Bearer {access_token}'
};
fetch('/api/v2/promo_code/{id/code}/',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
# You can also use wget
curl -X GET /api/v2/promo_code/{id/code}/ \
-H 'Accept: application/json'
-H 'Authorization: Bearer {access_token}'
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Response status code | Promo Code |
Example responses
- 200
{
"id": "integer",
"code": "string",
"name": "string",
"is_valid_now": "boolean",
"valid_from": "string",
"valid_to": "string"
}