# Get codes of promo code promotion

Gets codes of a promo code promotion.

The response includes the total number of codes in the promotion (total_count) and the codes for the current page (codes). To fetch the next page, increase the offset by the value of limit (e.g., “offset”: 100, then “offset”: 200) until you have retrieved all codes.

In most cases, “limit”: 100 or “limit”: 1000 is sufficient. Reserve larger values such as “limit”: 10000 for one-time bulk exports, and avoid using “limit”: 50000 unless necessary.

Endpoint: GET /v2/project/{project_id}/admin/promocode/{external_id}/code
Version: 2.0.0
Security: basicAuth

## Path parameters:

  - `project_id` (integer, required)
    Project ID. You can find this parameter in your Publisher Account next to the project name and in the browser address bar when working with a project. The URL has the following format: https://publisher.xsolla.com//projects/.
    Example: 44056

  - `external_id` (integer, required)
    Promotion external ID. Unique promotion identifier within the project.
    Example: "coupon_44056_1"

## Query parameters:

  - `limit` (integer)
    Limit for the number of elements on the page.
    Example: 50

  - `offset` (integer)
    Number of the element from which the list is generated (the count starts from 0).

## Response 200 fields (application/json):

  - `codes` (array)

  - `codes.code` (string)
    Unique case sensitive code. Contains letters and numbers.

  - `total_count` (number)
    Total number of codes for a promo code.

## Response 401 fields (application/json):

  - `statusCode` (integer)
    Example: 401

  - `errorCode` (integer)
    Example: 1020

  - `errorMessage` (string)
    Example: "[0401-1020]: Error in Authentication method occurred"

## Response 404 fields (application/json):

  - `statusCode` (integer)
    Example: 404

  - `errorCode` (integer)
    Example: 4001

  - `errorMessage` (string)
    Example: "[0401-9802]: Promocode not found"

  - `transactionId` (string)
    Example: "x-x-x-x-transactionId-mock-x-x-x"


