> This page is for Entria API Reference.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.navipartner.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.navipartner.com/_mcp/server.

# List store categories

GET https://api.entria.app/api/catalog/categories

Returns the store's category tree, including each category's handle. This is usually the first call when building navigation: pass a category's handle as the `category` filter on the products endpoint to fetch its products.

Reference: https://docs.navipartner.com/entria-api/entria-api-reference/catalog/get-get-categories

## Request

### Query parameters

- `locale` (string, optional) — BCP 47 locale code (e.g. da-DK, en-US). Defaults to DEFAULT_LOCALE env binding.

### Headers

- `x-entria` (string, required) — Identifies which store this request is for. Required on every store-scoped route. It is not authentication and not a secret — it grants no privileges and is safe to send from a browser. You receive the value once your Entria backend has been created and configured. Missing header returns 400; an unknown store returns 404.

## Response

### 200

The category tree for the store.

- `list of Category`

## Errors

### 400 Bad Request Error

Invalid request

- `error` (string, required)
- `code` (string, optional)
- `details` (list of ErrorResponseDetailsItems, optional) — Per-field validation failures; present when code is VALIDATION_ERROR.
- `success` (boolean, optional, deprecated) — Deprecated. Use code === VALIDATION_ERROR.
- `errors` (list of any, optional, deprecated) — Deprecated. Raw zod issues; use details instead.

## Types

### Category

- `id` (string, required)
- `name` (string, required)
- `description` (string, required)
- `handle` (string, required)
- `parent_id` (string, required, nullable)
- `children` (list of CategoryChildrenItems, required)

### ErrorResponseDetailsItems

- `path` (string, required)
- `message` (string, required)

### CategoryChildrenItems

- `id` (string, required)
- `name` (string, required)
- `description` (string, required)
- `handle` (string, required)

## Examples

**Response**

```json
[
  {
    "id": "string",
    "name": "string",
    "description": "string",
    "handle": "string",
    "parent_id": "string",
    "children": [
      {
        "id": "string",
        "name": "string",
        "description": "string",
        "handle": "string"
      }
    ]
  }
]
```

**SDK Code**

```python
import requests

url = "https://api.entria.app/api/catalog/categories"

headers = {"x-entria": "x-entria"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.entria.app/api/catalog/categories';
const options = {method: 'GET', headers: {'x-entria': 'x-entria'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.entria.app/api/catalog/categories"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-entria", "x-entria")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.entria.app/api/catalog/categories")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-entria"] = 'x-entria'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.entria.app/api/catalog/categories")
  .header("x-entria", "x-entria")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.entria.app/api/catalog/categories', [
  'headers' => [
    'x-entria' => 'x-entria',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.entria.app/api/catalog/categories");
var request = new RestRequest(Method.GET);
request.AddHeader("x-entria", "x-entria");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["x-entria": "x-entria"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.entria.app/api/catalog/categories")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```