---
openapi: 3.0.3
info:
  title: Braze REST API – Export product IDs
  description: |
    Return a paginated list of product IDs that have been recorded by your app.

    For help with CSV and API exports, see
    [Export troubleshooting](https://www.braze.com/docs/user_guide/data/distribution/export_braze_data/export_troubleshooting/).
  version: 1.0.0
  contact:
    name: Braze Support
    url: https://www.braze.com/docs/braze_support/
  license:
    name: Braze Documentation
    url: https://www.braze.com/docs/api/home/
servers:
  - url: https://rest.iad-01.braze.com
    description: US-01
  - url: https://rest.iad-02.braze.com
    description: US-02
  - url: https://rest.iad-03.braze.com
    description: US-03
  - url: https://rest.iad-04.braze.com
    description: US-04
  - url: https://rest.iad-05.braze.com
    description: US-05
  - url: https://rest.iad-06.braze.com
    description: US-06
  - url: https://rest.iad-07.braze.com
    description: US-07
  - url: https://rest.iad-08.braze.com
    description: US-08
  - url: https://rest.us-10.braze.com
    description: US-10
  - url: https://rest.fra-01.braze.eu
    description: EU-01
  - url: https://rest.fra-02.braze.eu
    description: EU-02
  - url: https://rest.au-01.braze.com
    description: AU-01
  - url: https://rest.id-01.braze.com
    description: ID-01
  - url: https://rest.jp-01.braze.com
    description: JP-01
  - url: https://rest.kr-01.braze.com
    description: KR-01
tags:
  - name: Export
    description: Access and export purchase data.
security:
  - BearerAuth: []
paths:
  /purchases/product_list:
    get:
      summary: Export product IDs
      description: |
        Returns a paginated list of product IDs. Requires a REST API key with the
        `purchases.product_list` permission.

        **Rate limit:** 1,000 requests per hour, shared with `/events`,
        `/events/list`, and `/custom_attributes`.

        ## Prerequisites

        To use this endpoint, you'll need an [API key]({{site.baseurl}}/api/basics#rest-api-key-permissions) with the `purchases.product_list` permission.

        ## Rate limit

        We apply a shared rate limit of 1,000 requests per hour to this endpoint. This rate limit is shared with the `/custom_attributes`, `/events`, and `/events/list` endpoints, as documented in [API rate limits]({{site.baseurl}}/api/api_limits/).

        ## Request parameters

        | Parameter | Required | Data Type | Description |
        |---|---|---|---|
        | `page` | Optional | String | The page of your product list that you want to view. |

        ## Example request

        ```
        https://rest.iad-01.braze.com/purchases/product_list?page=1
        ```

        ## Response

        ```json
        {
          "products": [
            "product_name" (string), the name of the product
          ],
          "message": (string) returns 'success' when the request completes without errors
        }
        ```

        **Tip:**
        For help with CSV and API exports, visit [Export troubleshooting]({{site.baseurl}}/user_guide/data/distribution/export_braze_data/export_troubleshooting).

        ## Response status codes

        The following table lists the responses for this endpoint, the error message you may receive, and how to resolve it.

        | Status code | Meaning | Error message | How to resolve |
        | --- | --- | --- | --- |
        | `200 OK` | The request succeeded and the response body lists the product IDs. | `success` | No action needed. |
        | `401 Unauthorized` | The REST API key is missing, malformed, or sent to the wrong REST endpoint. | `Invalid API key` | Send the key as `Authorization: Bearer YOUR_REST_API_KEY` to the correct [REST endpoint]({{site.baseurl}}/api/basics/#endpoints). For more causes, see [Errors and responses]({{site.baseurl}}/api/errors/#fatal-errors). |
        | `403 Access Denied` | The REST API key doesn't have the required permission. | `Access Denied` | Use a REST API key that has the `purchases.product_list` permission. |
        | `429 Rate Limited` | You exceeded the rate limit for this endpoint. | `Over rate limit` | Slow your request rate and retry with exponential backoff. See [API rate limits]({{site.baseurl}}/api/api_limits/). |
        | `5XX Internal Server Error` | An unexpected error occurred on the Braze server. | `Internal Server Error` | Retry with exponential backoff. If the error persists, contact [Support]({{site.baseurl}}/braze_support/). |
      operationId: listProductIds
      tags:
        - Export
      parameters:
        - name: page
          in: query
          required: false
          description: The page of your product list to view.
          schema:
            type: integer
            minimum: 0
            default: 0
            example: 0
      responses:
        "200":
          description: A page of product IDs.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductListResponse'
              examples:
                first_page:
                  summary: First page of products
                  value:
                    products:
                      - product_a
                      - product_b
                      - product_c
                    message: success
                empty_page:
                  summary: Page beyond the last result
                  value:
                    products: []
                    message: success
        "401":
          description: Unauthorized – the API key is missing, invalid, or lacks the `purchases.product_list` permission.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                unauthorized:
                  value:
                    message: invalid_api_key
        "429":
          description: Rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                rate_limited:
                  value:
                    message: rate_limited
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: REST API key
      description: |
        REST API keys are created in the Braze dashboard at **Settings → APIs and
        Identifiers → API Keys**. The key must include the
        `purchases.product_list` permission. Pass the key as
        `Authorization: Bearer YOUR_REST_API_KEY`.
  schemas:
    ProductListResponse:
      type: object
      required: [products, message]
      properties:
        products:
          type: array
          description: List of product IDs on this page.
          items:
            type: string
          example:
            - product_a
            - product_b
            - product_c
        message:
          type: string
          example: success
    ErrorResponse:
      type: object
      properties:
        message:
          type: string
        errors:
          type: array
          items:
            type: string
