Products

List product collections

Changed on

Retrieve the collections of your connected store, proxied live from the store's API: Shopify collections, or BigCommerce categories.

Use a collection's id in a purchase_history segment condition's collection filter. To find the collections one product belongs to, use /v1/products/{id}/collections; for the products in one collection, use /v1/product_collections/{id}/products.

Uses the same cursor pagination as /v1/products: pass the next_cursor from each response as ?cursor= to fetch the next page, keeping the same filters. total_count is null on Shopify stores with more collections than Shopify will count exactly.

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

Required scope: products_read

get/product_collections

Request

  • Base URL
    https://api.privy.com/v1
  • Auth
    HTTP bearer

Query parameters

per_pageinteger

Number of results per page, clamped to 1–50.

titlestring

Narrow to collections whose title matches, at most 255 characters. Matching differs by platform. On Shopify stores, each word of the value must start a word of the title: a word is a run of letters and digits, apostrophes inside it included (O'Neill), and at least one is required. On BigCommerce stores, the title must contain the value as typed, where % and _ may act as wildcards.

handlestring

Narrow to the collection with this exact handle (the slug in its storefront URL). Letters, digits, hyphens and underscores only. A Shopify-only filter: BigCommerce stores have no collection handle and return 422 validation_failed.

cursorstring

Opaque pagination cursor from a previous response's pagination.next_cursor.

Headers

Privy-Account-Idstring

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.

Response

A page of the store's collections.

Example response

{
  "data": [
    {
      "id": 421123456789,
      "handle": "summer-collection",
      "title": "Summer Collection"
    }
  ],
  "pagination": {
    "per_page": 40,
    "total_count": 128,
    "has_more": true,
    "next_cursor": "eyJsYXN0X2lkIjo3ODkwMTIzNDU2Nzg5fQ=="
  }
}

Changes

    • warning

      added the new forbidden enum value to the / response property for the response status

    • warning

      added the new forbidden enum value to the / response property for the response status

    • warning

      added the new forbidden enum value to the / response property for the response status

    • warning

      added the new forbidden enum value to the / response property for the response status

    • warning

      added the new forbidden enum value to the / response property for the response status

    • warning

      added the new forbidden enum value to the / response property for the response status

    • warning

      added the new segment_builder_required enum value to the / response property for the response status

    • warning

      added the new segment_builder_required enum value to the / response property for the response status

    • warning

      added the new segment_builder_required enum value to the / response property for the response status

    • warning

      added the new segment_builder_required enum value to the / response property for the response status

    • warning

      added the new segment_builder_required enum value to the / response property for the response status

    • warning

      added the new segment_builder_required enum value to the / response property for the response status

    • info

      endpoint added