---
title: "List product categories"
method: GET
path: "/api/product-categories"
tags: ["Product Categories"]
---

# List product categories

`GET /api/product-categories`

## Request

- Base URL: `https://api.retraced.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.retraced.com/api/product-categories`
- Auth: none declared

Every matching product category in one list, by name unless `sort` says otherwise. `filter` takes `parentId` (exact, `null` for the roots), `hierarchyLevel` (exact) and `name` / `quantityUnits` / `weightUnits` (case-insensitive substring). With `isPrimary`, only the categories the company's facility processes are linked to (`true`: primary links, `false`: secondary), each with an `isPrimary` flag; `companyId` is that company, the caller's own by default, and 404 `not_found` when it isn't found. Answers `{ data, metadata }` (legacy sent `{ data, meta }`).

## Query parameters

- `isPrimary` union
  - boolean
  - string
- `companyId` string
- `sort` string
- `filter` string

## Response `200`

Default Response

- object
  - `metadata` object, required
    - `success` boolean, required: True when the request succeeded.
  - `data` object[], required
    - `id` string, required
    - `parentId` string, nullable, required
    - `name` string, nullable, required
    - `hierarchyLevel` number, nullable, required
    - `isWeightAvailable` number, nullable, required
    - `quantityUnits` string[], nullable, required
    - `weightUnits` string[], nullable, required
    - `assetId` string, nullable, required
    - `assetType` string, nullable, required
    - `isPrimary` boolean

## Other responses

- `400`: Default Response
- `401`: Default Response
- `403`: Default Response
- `404`: Default Response

## Changes

> 108 revisions in range; 2 not diffed.

- **2026-10-18** `4a6f524fc97b`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/retraced/apis/api-reference/changes/api/product-categories/get.md)

---

[API](https://skmtc.dev/retraced/apis/api-reference.md) - [All operations](https://skmtc.dev/retraced/apis/api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/retraced/apis/api-reference/revisions/83309c4abd20?raw)
