> ## Documentation Index
> Fetch the complete documentation index at: https://help.privy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a product collection

> Retrieve one collection (Shopify) or category (BigCommerce) of your connected store
by its store id, the `id` a `purchase_history` segment condition's `collection` filter holds.

Requires a connected Shopify or BigCommerce store — without one, this endpoint returns
`404 no_connected_store`.

**Required scope:** `products_read`




## OpenAPI

````yaml openapi/privy-api.yaml GET /product_collections/{id}
openapi: 3.1.0
info:
  title: Privy API
  version: '1.0'
  description: >
    The Privy API lets you programmatically manage your contact list and read
    what you have set up in Privy.

    Create, update, unsubscribe, and remove contacts; report orders;

    and read your campaigns, flows, segments, orders, store products, coupon
    pools,

    performance reports, and account setup.
servers:
  - url: https://api.privy.com/v1
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Account
    description: Retrieve information about the authenticated Privy account.
  - name: Contacts
    description: Manage your contact list.
  - name: Imports
    description: >-
      Read your contact import history — CSV uploads, connected-provider syncs,
      and SMS consent imports.
  - name: Campaigns
    description: >-
      Read your message campaigns — email and SMS newsletters, plus the messages
      your flows send.
  - name: Displays
    description: >-
      Read your on-site displays (popups, flyouts, banners, embedded forms,
      landing pages).
  - name: Coupons
    description: Read your coupon pools, their code inventory, and individual codes.
  - name: Reports
    description: >-
      Read performance reporting — signups, views, conversion rates, and
      attributed revenue — for your business, displays, and flows.
  - name: Flows
    description: Read your automation flows and their configuration.
  - name: Segments
    description: Read your customer segments and their membership.
  - name: Orders
    description: Report orders placed in your store and read your order history.
  - name: Products
    description: Read the product catalog and collections of your connected store.
  - name: Events
    description: Ingest custom events to trigger Flows and other automations.
paths:
  /product_collections/{id}:
    get:
      tags:
        - Products
      summary: Get a product collection
      description: >
        Retrieve one collection (Shopify) or category (BigCommerce) of your
        connected store

        by its store id, the `id` a `purchase_history` segment condition's
        `collection` filter holds.


        Requires a connected Shopify or BigCommerce store — without one, this
        endpoint returns

        `404 no_connected_store`.


        **Required scope:** `products_read`
      operationId: getProductCollection
      parameters:
        - $ref: '#/components/parameters/AccountIdParam'
        - name: id
          in: path
          required: true
          description: >-
            The store's collection id (returned as `id` in collection
            responses).
          schema:
            type: integer
            format: int64
          example: 421123456789
      responses:
        '200':
          description: The collection.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/ProductCollection'
              example:
                data:
                  id: 421123456789
                  handle: summer-collection
                  title: Summer Collection
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/InsufficientScope'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/ProductsRateLimited'
        '502':
          $ref: '#/components/responses/StoreUnavailable'
      security:
        - bearerAuth: []
components:
  parameters:
    AccountIdParam:
      name: Privy-Account-Id
      in: header
      required: false
      description: >
        Target a subaccount instead of the main connected account.

        Pass a subaccount `id` from get_account's `subaccounts` list. Only
        direct subaccounts

        of the connected account are reachable — omit this for the main account
        itself.
      schema:
        type: string
      example: S1U2B3A4C5C6T7
  schemas:
    ProductCollection:
      type: object
      description: >-
        A collection of the connected store's products — a Shopify collection or
        a BigCommerce category.
      properties:
        id:
          type: integer
          format: int64
          description: >-
            The store's collection id. Use this value in a `purchase_history`
            segment condition's `collection` filter.
          example: 421123456789
        handle:
          type:
            - string
            - 'null'
          description: >-
            The collection's URL slug. On BigCommerce, which has no handles, it
            is the last segment of the category's storefront path, and `null`
            when the category has none.
          example: summer-collection
        title:
          type: string
          example: Summer Collection
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              enum:
                - invalid_client
                - invalid_scope
                - unauthorized
                - insufficient_scope
                - paid_plan_required
                - api_access_required
                - not_found
                - no_connected_store
                - conflict
                - contacts_not_ready
                - validation_failed
                - rate_limited
                - store_unavailable
              example: validation_failed
            message:
              type: string
              example: One or more fields are invalid
            details:
              type: array
              items:
                type: object
                properties:
                  field:
                    type: string
                    example: email
                  message:
                    type: string
                    example: is required
  responses:
    Unauthorized:
      description: Missing or invalid bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: unauthorized
              message: Bearer token is missing or invalid
    InsufficientScope:
      description: Token lacks the required scope for this endpoint.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: insufficient_scope
              message: Token does not have the required scope
    NotFound:
      description: >-
        The requested resource does not exist or does not belong to your
        account.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: not_found
              message: Not found
    ProductsRateLimited:
      description: >-
        Rate limit exceeded — either Privy's API rate limit (code
        `rate_limited`, with the `X-RateLimit-*` headers) or the connected
        store's own quota passed through (code `store_rate_limited`).
        `Retry-After` carries the wait when it is known — BigCommerce's reset
        window, or a wait derived from Shopify's throttle cost payload.
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
          example: 15
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: store_rate_limited
              message: >-
                The connected store is rate limiting requests. Try again
                shortly.
    StoreUnavailable:
      description: >-
        The connected store's API could not be reached or returned an error.
        Retry shortly.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: store_unavailable
              message: The connected store could not be reached. Try again shortly.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API token or OAuth access token
      description: >
        Send either an API token or an OAuth access token as

        `Authorization: Bearer <token>`. See the Authentication page for
        details.

````