---
updatedAt: 2026-04-21T09:18:29.000Z
agentTools:
  projectIndex: https://docs.esputnik.com/llms.txt
---

# Get promotional codes

The method returns a list of all available promotional codes as JSON string.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "esputnik.com",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://esputnik.com"
    }
  ],
  "security": [
    {
      "basicAuth": []
    }
  ],
  "tags": [
    {
      "name": "Messages"
    }
  ],
  "paths": {
    "/api/v1/promocodes": {
      "get": {
        "tags": [
          "Messages"
        ],
        "summary": "Get promotional codes",
        "description": "The method returns a list of all available promotional codes as JSON string.",
        "operationId": "getPromocodes",
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "description": "Promo code type",
            "schema": {
              "type": "string"
            },
            "example": "Free Gift with Purchase"
          },
          {
            "name": "inUse",
            "in": "query",
            "description": "When 'true', the promo code has been used, when 'false', the promo code has not been used",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "activeDueDays",
            "in": "query",
            "description": "The days left for promo codes to remain active<br/>(activeDueDays=7 means: the promo code remains active for the following 7 days, starting from tomorrow)",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "example": 14
          },
          {
            "name": "discount",
            "in": "query",
            "description": "Discount received with the promo code",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "example": 15
          }
        ],
        "responses": {
          "200": {
            "description": "Promocodes list as json string",
            "content": {
              "application/json; charset=UTF-8": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  }
}
```