---
updatedAt: 2026-04-23T13:29:19.000Z
agentTools:
  projectIndex: https://developer.xentral.com/llms.txt
---

# List product categories

Lists all available products categories.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Xentral API",
    "version": "v0.1",
    "description": "Xentral is an ERP platform.",
    "contact": {
      "name": "Xentral",
      "url": "https://xentral.com",
      "email": "api@xentral.com"
    }
  },
  "tags": [
    {
      "name": "Product Category",
      "description": "Product Category represents the Product Category Tree that can be used to categorise products."
    }
  ],
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Bearer token obtained in POST /tokens endpoint or pregenerated in the system."
      }
    }
  },
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "servers": [
    {
      "url": "https://{xentralId}.xentral.biz",
      "description": "Your Xentral Instance",
      "variables": {
        "xentralId": {
          "default": "xentral"
        }
      }
    },
    {
      "url": "https://{domain}",
      "description": "Xentral at a custom domain",
      "variables": {
        "domain": {
          "default": "xentral.com"
        }
      }
    }
  ],
  "x-readme": {
    "samples-languages": []
  },
  "paths": {
    "/api/v1/productsCategories": {
      "get": {
        "tags": [
          "Product Category"
        ],
        "operationId": "productCategory.list",
        "summary": "List product categories",
        "description": "Lists all available products categories.",
        "responses": {
          "200": {
            "description": "Operation completed successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "\\d+",
                            "example": "17",
                            "description": "Resource identifier."
                          },
                          "name": {
                            "type": "string",
                            "description": "Name of the product category",
                            "example": "Clothing"
                          },
                          "parent": {
                            "description": "An optional object with id and name",
                            "type": "object",
                            "additionalProperties": false,
                            "required": [
                              "id",
                              "name"
                            ],
                            "nullable": true,
                            "properties": {
                              "id": {
                                "type": "string",
                                "pattern": "\\d+",
                                "example": "17",
                                "description": "Resource identifier."
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "example": {
                              "id": "1337",
                              "name": "Diamond"
                            }
                          }
                        }
                      }
                    }
                  }
                },
                "examples": {
                  "Lists all product categories": {
                    "value": {
                      "data": [
                        {
                          "id": "5",
                          "name": "Candy",
                          "parent": {
                            "id": "3",
                            "name": "Food"
                          }
                        },
                        {
                          "id": "3",
                          "name": "Food",
                          "parent": null
                        },
                        {
                          "id": "4",
                          "name": "Gardening",
                          "parent": null
                        },
                        {
                          "id": "6",
                          "name": "Plants",
                          "parent": {
                            "id": "4",
                            "name": "Gardening"
                          }
                        },
                        {
                          "id": "8",
                          "name": "Repair",
                          "parent": {
                            "id": "2",
                            "name": "Services"
                          }
                        },
                        {
                          "id": "2",
                          "name": "Services",
                          "parent": null
                        },
                        {
                          "id": "7",
                          "name": "Tools",
                          "parent": {
                            "id": "4",
                            "name": "Gardening"
                          }
                        }
                      ]
                    }
                  }
                }
              },
              "application/vnd.xentral.hierarchy+json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "\\d+",
                            "example": "17",
                            "description": "Resource identifier."
                          },
                          "name": {
                            "type": "string",
                            "description": "Name of the product category",
                            "example": "Clothing"
                          },
                          "parent": {
                            "description": "An optional object with id and name",
                            "type": "object",
                            "additionalProperties": false,
                            "required": [
                              "id",
                              "name"
                            ],
                            "nullable": true,
                            "properties": {
                              "id": {
                                "type": "string",
                                "pattern": "\\d+",
                                "example": "17",
                                "description": "Resource identifier."
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "example": {
                              "id": "1337",
                              "name": "Diamond"
                            }
                          },
                          "children": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "additionalProperties": false,
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "pattern": "\\d+",
                                  "example": "17",
                                  "description": "Resource identifier."
                                },
                                "name": {
                                  "type": "string"
                                },
                                "parent": {
                                  "description": "An optional object with id and name",
                                  "type": "object",
                                  "additionalProperties": false,
                                  "required": [
                                    "id",
                                    "name"
                                  ],
                                  "nullable": true,
                                  "properties": {
                                    "id": {
                                      "type": "string",
                                      "pattern": "\\d+",
                                      "example": "17",
                                      "description": "Resource identifier."
                                    },
                                    "name": {
                                      "type": "string"
                                    }
                                  },
                                  "example": {
                                    "id": "1337",
                                    "name": "Diamond"
                                  }
                                },
                                "children": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "pattern": "\\d+",
                                        "example": "17",
                                        "description": "Resource identifier."
                                      },
                                      "name": {
                                        "type": "string"
                                      },
                                      "parent": {
                                        "description": "An optional object with id and name",
                                        "type": "object",
                                        "additionalProperties": false,
                                        "required": [
                                          "id",
                                          "name"
                                        ],
                                        "nullable": true,
                                        "properties": {
                                          "id": {
                                            "type": "string",
                                            "pattern": "\\d+",
                                            "example": "17",
                                            "description": "Resource identifier."
                                          },
                                          "name": {
                                            "type": "string"
                                          }
                                        },
                                        "example": {
                                          "id": "1337",
                                          "name": "Diamond"
                                        }
                                      },
                                      "children": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "additionalProperties": false,
                                          "properties": {
                                            "id": {
                                              "type": "string",
                                              "pattern": "\\d+",
                                              "example": "17",
                                              "description": "Resource identifier."
                                            },
                                            "name": {
                                              "type": "string"
                                            },
                                            "parent": {
                                              "description": "An optional object with id and name",
                                              "type": "object",
                                              "additionalProperties": false,
                                              "required": [
                                                "id",
                                                "name"
                                              ],
                                              "nullable": true,
                                              "properties": {
                                                "id": {
                                                  "type": "string",
                                                  "pattern": "\\d+",
                                                  "example": "17",
                                                  "description": "Resource identifier."
                                                },
                                                "name": {
                                                  "type": "string"
                                                }
                                              },
                                              "example": {
                                                "id": "1337",
                                                "name": "Diamond"
                                              }
                                            },
                                            "children": {
                                              "type": "array",
                                              "items": {
                                                "type": "object",
                                                "description": "Categories nested indefinitely."
                                              }
                                            }
                                          }
                                        }
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        }
                      },
                      "description": "Nested categories."
                    }
                  }
                },
                "examples": {
                  "Lists all product categories in hierarchical order": {
                    "value": {
                      "data": [
                        {
                          "id": "3",
                          "name": "Food",
                          "parent": null,
                          "children": [
                            {
                              "id": "5",
                              "name": "Candy",
                              "parent": {
                                "id": "3",
                                "name": "Food"
                              },
                              "children": []
                            }
                          ]
                        },
                        {
                          "id": "4",
                          "name": "Gardening",
                          "parent": null,
                          "children": [
                            {
                              "id": "6",
                              "name": "Plants",
                              "parent": {
                                "id": "4",
                                "name": "Gardening"
                              },
                              "children": []
                            },
                            {
                              "id": "7",
                              "name": "Tools",
                              "parent": {
                                "id": "4",
                                "name": "Gardening"
                              },
                              "children": []
                            }
                          ]
                        },
                        {
                          "id": "2",
                          "name": "Services",
                          "parent": null,
                          "children": [
                            {
                              "id": "8",
                              "name": "Repair",
                              "parent": {
                                "id": "2",
                                "name": "Services"
                              },
                              "children": []
                            }
                          ]
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unable to authenticate the client",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string",
                      "description": "Error message explaining why the request failed.",
                      "example": "Missing required scopes: customer:create."
                    }
                  }
                },
                "example": {
                  "message": "Missing required scopes: customer:create."
                }
              },
              "text/html": {
                "schema": {
                  "type": "string",
                  "example": "Unauthorized"
                }
              }
            }
          },
          "403": {
            "description": "Unable to authorize the client"
          },
          "406": {
            "description": "Requested resource representation does not exist."
          },
          "429": {
            "description": "Too many API calls made."
          }
        }
      }
    }
  }
}
```