APIProduct category

Get product categories

GET
/public/v1/product-categories

List the product categories belonging to the authenticated company, oldest-first by creation time. Soft-deleted categories are excluded, and results are scoped to your company only. Each entry also carries its subcategories.

Results are paged: the response returns a fixed-size page plus a next_page URL, which is null on the last page.

Required permission: settings_permissions_product_categories.

Authorization

Bearer
headerAuthorizationBearer <token>

API token generated in Distru (Settings → Distru API). Send it on every request as Authorization: Bearer YOUR_API_TOKEN.

Query Parameters

ids[]?array<string>

Restrict the result to specific product categories by ID (the same ID returned as each category's id). Repeat the bracketed key once per ID. Unknown IDs simply match nothing; an empty list is treated as no filter. At most 200 IDs may be given.

inserted_datetime?string

Filter to product categories by their creation datetime, given as a comma-separated start,end pair of ISO8601 datetimes (inclusive). Either bound may be omitted for an open-ended range: 2022-07-10T00:00:00Z, matches on or after that instant, ,2022-07-10T00:00:00Z matches on or before it.

updated_datetime?string

Filter to product categories by their last-updated datetime, given as a comma-separated start,end pair of ISO8601 datetimes (inclusive). Either bound may be omitted for an open-ended range.

page?string

Page selector. Page size is fixed by the server; paginate by following the next_page URL in each response rather than building page selectors yourself — it is null on the last page. next_page uses page[after]=<cursor>, an opaque token marking where the next page resumes; pass it back exactly as given, and only to the endpoint that issued it. This is seek-based, so every page stays fast no matter how deep you page.

Response Body

A list of product categories

*/*
  1. response

A collection of product categories

data?array<>

Product Categories

next_page?string

URL for the next page of results; null when there is no next page

Example Request
curl -X GET 'https://app.distru.com/public/v1/product-categories'
Example Response
{  "data": [    {      "id": "00000000-0000-0000-0000-00000000007e",      "inserted_datetime": "2025-01-01T00:00:00.000000Z",      "name": "PC1",      "official_product_category_id": "OPC_3",      "subcategories": [        {          "id": "00000000-0000-0000-0000-000000000084",          "name": "SC1"        }      ],      "updated_datetime": "2026-10-08T09:10:09.120533Z"    },    {      "id": "00000000-0000-0000-0000-00000000007f",      "inserted_datetime": "2025-01-02T00:00:00.000000Z",      "name": "PC2",      "official_product_category_id": "OPC_3",      "subcategories": [],      "updated_datetime": "2026-10-08T09:10:09.121584Z"    },    {      "id": "00000000-0000-0000-0000-000000000080",      "inserted_datetime": "2025-01-03T00:00:00.000000Z",      "name": "PC3",      "official_product_category_id": "OPC_3",      "subcategories": [],      "updated_datetime": "2026-10-08T09:10:09.122384Z"    }  ],  "next_page": "https://www.example.com/public/v1/product-categories?page[after]=ZHwyMDI1LTAxLTAzVDAwOjAwOjAwLjAwMDAwMFp8aXwwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwODA"}