# List all promotions

> Retrieves the division's promotions, newest first, ten to a page, each with the products and plans it targets.

Source: https://help.boltapp.com/api-reference/subscriptions/promotions-v1/listpromotions

`GET /v1/subscriptions/promotions`

## OpenAPI definition

This endpoint as it appears in the OpenAPI document, with every schema it references included.

```json
{
  "openapi": "3.2.0",
  "info": {
    "title": "Subscriptions API",
    "version": "v1",
    "description": "API for managing subscriptions and products."
  },
  "servers": [
    {
      "url": "https://api.boltapp.com",
      "description": "The Production URL (Live Data)."
    },
    {
      "url": "https://api-sandbox.boltapp.com",
      "description": "The Sandbox URL (Test Data)."
    },
    {
      "url": "https://api-staging.boltapp.com",
      "description": "The Staging URL (Staged Data)."
    }
  ],
  "security": [
    {
      "X-API-Key": []
    },
    {
      "X-Publishable-Key": []
    }
  ],
  "paths": {
    "/v1/subscriptions/promotions": {
      "get": {
        "operationId": "listPromotions",
        "summary": "List all promotions",
        "description": "Retrieves the division's promotions, newest first, ten to a page, each with the products and plans it targets.",
        "tags": [
          "Promotions v1"
        ],
        "security": [
          {
            "X-API-Key": []
          },
          {
            "X-Publishable-Key": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "name",
            "schema": {
              "type": "string"
            },
            "required": false,
            "description": "Filter by part of the promotion name, any case."
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string",
              "enum": [
                "draft",
                "active",
                "deactivated"
              ]
            },
            "required": false,
            "description": "Filter by lifecycle status."
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            },
            "required": false,
            "description": "The `next_cursor` of the page before."
          }
        ],
        "responses": {
          "200": {
            "description": "One page of the division's promotions.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/Promotion"
                          },
                          {
                            "type": "object",
                            "properties": {
                              "products": {
                                "type": "array",
                                "description": "The products and plans the promotion targets.",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "string"
                                    },
                                    "name": {
                                      "type": "string"
                                    },
                                    "plans": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "id": {
                                            "type": "string"
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        ]
                      }
                    },
                    "next_cursor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Cursor for the next page, or `null` on the last page."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid or missing API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Promotion": {
        "type": "object",
        "description": "A promotion of a subscription product. Its discount applies to new carts on the plans it is attached to.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier for the promotion.",
            "examples": [
              "bcp_V9y3q4Jw8kQe"
            ]
          },
          "name": {
            "type": "string",
            "description": "Name of the promotion.",
            "examples": [
              "Launch discount"
            ]
          },
          "status": {
            "type": "string",
            "description": "The promotion's lifecycle status.",
            "examples": [
              "active"
            ]
          },
          "target": {
            "type": "string",
            "enum": [
              "item",
              "cart"
            ],
            "description": "What the discount applies to."
          },
          "automatic": {
            "type": "boolean",
            "description": "Whether the promotion applies without a code."
          },
          "combinable": {
            "type": "boolean",
            "description": "Whether the promotion can combine with other promotions."
          },
          "priority": {
            "type": "integer",
            "format": "int64",
            "description": "Order in which promotions are considered; lower runs first."
          },
          "duration": {
            "type": "string",
            "enum": [
              "once",
              "repeating",
              "forever"
            ],
            "description": "How long the discount keeps applying across a subscription's renewals."
          },
          "percent_off": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Percentage discount in basis points, 1 to 10000 (250 = 2.5%). Exactly one of `percent_off` and `amount_off` is set."
          },
          "amount_off": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Fixed discount in cents. Exactly one of `percent_off` and `amount_off` is set."
          },
          "currency": {
            "type": [
              "string",
              "null"
            ],
            "description": "ISO4217 currency code for `amount_off`.",
            "examples": [
              "USD"
            ]
          },
          "minimum_amount": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Minimum cart amount in cents for the promotion to apply."
          },
          "allowed_cycle_counts": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "With `duration` `repeating`, how many billing cycles the discount applies for."
          },
          "max_redemptions": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Cap on total redemptions, or `null` for unlimited."
          },
          "times_redeemed": {
            "type": "integer",
            "format": "int64",
            "description": "How many times the promotion has been redeemed."
          },
          "allowed_customers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Customer IDs the promotion is restricted to. Empty for everyone."
          },
          "plan_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "IDs of the plans the promotion is attached to."
          },
          "codes": {
            "type": "array",
            "description": "The promotion's codes. Empty for an automatic promotion.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "code": {
                  "type": "string",
                  "examples": [
                    "LAUNCH20"
                  ]
                },
                "active": {
                  "type": "boolean"
                },
                "max_redemptions": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int64"
                },
                "times_redeemed": {
                  "type": "integer",
                  "format": "int64"
                },
                "expires_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "first_time_transaction": {
                  "type": "boolean",
                  "description": "Whether the code is limited to a shopper's first transaction."
                }
              }
            }
          },
          "redeem_by": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Last moment the promotion can be redeemed."
          },
          "activated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "deactivated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "ApiErrorResponse": {
        "type": "object",
        "description": "Standard error envelope returned by every non-2xx response.",
        "required": [
          "result",
          "errors"
        ],
        "properties": {
          "result": {
            "type": "object",
            "properties": {
              "success": {
                "type": "boolean",
                "description": "Always `false` on an error.",
                "examples": [
                  false
                ]
              }
            }
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiError"
            }
          }
        },
        "examples": [
          {
            "result": {
              "success": false
            },
            "errors": [
              {
                "code": 15,
                "message": "A valid value must be provided.",
                "field": "frequency"
              }
            ]
          }
        ]
      },
      "ApiError": {
        "type": "object",
        "description": "One error of a failed request.",
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "description": "Bolt error code.",
            "examples": [
              15
            ]
          },
          "message": {
            "type": "string",
            "description": "What went wrong.",
            "examples": [
              "A valid value must be provided."
            ]
          },
          "field": {
            "type": "string",
            "description": "Path of the request field the error is about, such as `product.taxable` or `plans[1].sku`. Absent when the error is not about one field.",
            "examples": [
              "frequency"
            ]
          }
        }
      }
    },
    "securitySchemes": {
      "X-API-Key": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "Admins and Developers can obtain their Bolt API key from the Bolt Merchant Dashboard. Send it together with `X-Publishable-Key`."
      },
      "X-Publishable-Key": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Publishable-Key",
        "description": "The publicly viewable identifier used to identify a merchant division. This key is found in the Developer > API section of the Bolt Merchant Dashboard. Required. Send it together with `X-API-Key`."
      }
    }
  }
}
```
