Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ItsJhonAlex/Ecommerce/llms.txt

Use this file to discover all available pages before exploring further.

The categories endpoint returns all categories as a flat list. Each category carries a parentId field that references another category’s id, enabling clients to reconstruct the full hierarchy tree on the front end. A null parentId indicates a root-level category with no parent. No authentication is required.

List all categories

Returns every category in the database, ordered alphabetically by name. The list is flat — hierarchy is expressed through parentId references, and tree construction is left to the client.
curl https://api.avanzarintimeshop.com/api/v1/categories

Response

categories
Category[]
required
Flat array of all categories, ordered by name ascending.
The list is intentionally flat. To render a category tree, group the results by parentId and recursively nest children under their parent. Root categories have parentId: null.
Example response — 200 OK
{
  "categories": [
    {
      "id": "cat-root-0000-0000-0000-000000000001",
      "slug": "accessories",
      "name": "Accessories",
      "parentId": null
    },
    {
      "id": "cat-root-0000-0000-0000-000000000002",
      "slug": "watches",
      "name": "Watches",
      "parentId": null
    },
    {
      "id": "cat-0001-0000-0000-0000-000000000001",
      "slug": "mens-watches",
      "name": "Men's Watches",
      "parentId": "cat-root-0000-0000-0000-000000000002"
    },
    {
      "id": "cat-0001-0000-0000-0000-000000000002",
      "slug": "womens-watches",
      "name": "Women's Watches",
      "parentId": "cat-root-0000-0000-0000-000000000002"
    },
    {
      "id": "cat-0002-0000-0000-0000-000000000001",
      "slug": "watch-straps",
      "name": "Watch Straps",
      "parentId": "cat-root-0000-0000-0000-000000000001"
    }
  ]
}
To filter the storefront catalog by category, fetch the products list and cross-reference with the categories array returned by GET /api/v1/products/:slug. The product-to-category mapping lives in the productCategories join table and is embedded in the single-product response.

Build docs developers (and LLMs) love