| Variable | Type | Description |
|---|---|---|
| list_id | int|string | The ID of the list to which the coupon belongs |
| coupon_id | string | The ID of the coupon for which to fetch the data |
| Parameter | Description |
|---|---|
| array | Array containing the data of a coupon from the list |
{ "list_id": 456, "name": "TESTCPNAPI40", "api": { "api_url": "the_codes_url", "currency": "RON", "discount_percent": 20, "discount_type": "percent", "prefix": "CPNAPI40", "regen_batch_size": 250, "regen_codes_count": 500, "regen_min_count_below": 100 }, "expire_type": "never", "status": 1, "type": "api", "history": [ { "stamp": 1714126634, "type": "finish_generate" }, { "stamp": 1714126596, "type": "start_generate" } ], "available_codes": 500, "codes_total": 500, "id": "662b7ee9f174109c8142d63e" }
| Code | Message | Description |
|---|---|---|
| 407 | Missing required param list_id | list_id param is required |
| 407 | Missing required param coupon_id | coupon_id param is required |
| 1808 | No such coupon with ID: %s. | Invalid access to coupon |
{ "err": true, "message": "Missing required param list_id", "code": 407 }
{ "err": true, "message": "Missing required param coupon_id", "code": 407 }
{ "err": true, "message": "No such coupon with ID: %s", "code": 1808 }