Xsolla-logo

Get unique coupon code limits

get/v2/project/{project_id}/admin/code/limit/coupon/external_id/{external_id}

Gets the remaining number of times codes can be used. For filtering the codes, use the codes query parameter.

For configuring the code limit itself, go to the Admin section:

SecuritybasicAuth
Request
path Parameters
project_id
required
integer

Project ID. You can find this parameter in your Publisher Account next to the name of the project.

Example: 44056
external_id
required
integer

Promotion external ID. Unique promotion identifier within the project.

Example: coupon_44056_1
query Parameters
codes[]
Array of strings

Unique case-sensitive codes. Contain only letters and numbers.

limit
integer

Limit for the number of elements on the page.

Example: limit=50
offset
integer

Number of the element from which the list is generated (the count starts from 0).

Example: offset=0
Responses
200

Successfully received coupon limits for a code.

401

Basic authentication not passed or wrong. Make sure you used basic authentication or correct credentials.

404
422
Request samples
Response samples
application/json
{
  • "promotion_id": 1,
  • "items": [
    ],
  • "total_items_count": 2,
  • "has_more": false
}