{
  "opencollection": "1.0.0",
  "info": {
    "name": "Addresses Introduction Account Addresses Promotion Codes API",
    "version": "25.1126.6886238"
  },
  "request": {
    "auth": {
      "type": "bearer",
      "token": "{{bearerToken}}"
    }
  },
  "items": [
    {
      "info": {
        "name": "Promotion Codes",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Get Promotion Codes",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://useast.api.elasticpath.com/v2/promotions/:promotionID/codes",
            "headers": [
              {
                "name": "Authorization",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "promotionID",
                "value": "",
                "type": "path",
                "description": "The unique identifier of the promotion."
              },
              {
                "name": "filter",
                "value": "",
                "type": "query",
                "description": "This parameter accepts a filtering expression that uses specific operators and attributes. Promotion codes are case-insensitive.\n\nThe following operators and attributes are available when filtering on this endpoint. See [Supported Filtering Characters](/guides/Getting-Started/filtering#supported-characters).\n\n| Attribute | Type     | Operator    | Example        |\n|:--------- |:---------|:------------|:---------------|\n| `code`    | `string`, `number` |  `eq`, `gt`       |  `eq(code,summer2024)`, `gt(code,2024)` |\n"
              }
            ]
          },
          "docs": "You can use this endpoint to retrieve promotion codes. \n\n:::note\n- The `codes.max_uses` attribute represents the maximum usage of the codes. \n- The `codes.uses` attribute represents the remaining number of times the codes can be used for the promotion.\n- Codes created before April 27, 2023 will only have `codes.uses` attribute in the response body.\n:::\n"
        },
        {
          "info": {
            "name": "Create Promotion Codes",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://useast.api.elasticpath.com/v2/promotions/:promotionID/codes",
            "headers": [
              {
                "name": "Authorization",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "promotionID",
                "value": "",
                "type": "path",
                "description": "The unique identifier of the promotion."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Use this endpoint to create promotion codes for a specific promotion.\n\n:::note\n\nWhen a promotion expires, the promotion codes attached to the promotion automatically become invalid. However, when you re-enable the expired promotion, the promotion codes attached to the promotion are deleted.\n\n:::\n"
        },
        {
          "info": {
            "name": "Delete Multiple Promotion Codes",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://useast.api.elasticpath.com/v2/promotions/:promotionID/codes",
            "headers": [
              {
                "name": "Authorization",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "promotionID",
                "value": "",
                "type": "path",
                "description": "The ID of the promotion associated with the codes."
              }
            ]
          },
          "docs": "Use this endpoint to delete multiple promotion codes within a specific promotion."
        },
        {
          "info": {
            "name": "Delete a Promotion Code",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://useast.api.elasticpath.com/v2/promotions/:promotionID/codes/:code",
            "headers": [
              {
                "name": "Authorization",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "promotionID",
                "value": "",
                "type": "path",
                "description": "Specifies the unique identifier of the promotion associated with the codes."
              },
              {
                "name": "code",
                "value": "",
                "type": "path",
                "description": "Specifies the code that you want to delete."
              }
            ]
          },
          "docs": "Use this endpoint to delete a single promotion code."
        }
      ]
    }
  ],
  "bundled": true
}