> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rmz.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# Categories

> Retrieve a paginated list of store categories.

# List Categories

<div className="flex items-center gap-2 mb-4">
  <span className="px-2 py-1 bg-green-100 text-green-800 rounded text-sm font-mono font-bold">GET</span>
  <code>/categories</code>
</div>

Returns a paginated list of categories for the authenticated store.

<Snippet file="rmz-plus-required.mdx" />

## Authentication

<Snippet file="auth-bearer-header.mdx" />

## Headers

| Header          | Value                   | Required    |
| --------------- | ----------------------- | ----------- |
| `Authorization` | `Bearer YOUR_API_TOKEN` | Yes         |
| `Accept`        | `application/json`      | Recommended |

## Query Parameters

| Parameter | Type    | Required | Description              |
| --------- | ------- | -------- | ------------------------ |
| `page`    | integer | No       | Page number (default: 1) |

<Snippet file="pagination-note.mdx" />

## Example Request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://merchant-api.rmz.gg/shawarma/categories?page=1" \
    -H "Authorization: Bearer YOUR_API_TOKEN"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://merchant-api.rmz.gg/shawarma/categories?page=1", {
    headers: { "Authorization": "Bearer YOUR_API_TOKEN" }
  });
  const categories = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://merchant-api.rmz.gg/shawarma/categories",
      headers={"Authorization": "Bearer YOUR_API_TOKEN"},
      params={"page": 1}
  )
  categories = response.json()
  ```

  ```php PHP theme={null}
  $ch = curl_init("https://merchant-api.rmz.gg/shawarma/categories?page=1");
  curl_setopt($ch, CURLOPT_HTTPHEADER, [
      "Authorization: Bearer YOUR_API_TOKEN"
  ]);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  $response = json_decode(curl_exec($ch), true);
  ```
</CodeGroup>

## Success Response

```json theme={null}
{
  "message": null,
  "data": {
    "current_page": 1,
    "data": [
      {
        "id": 1,
        "slug": "software",
        "title": "Software",
        "description": "Digital software products",
        "metadata": null,
        "is_active": true,
        "parent_id": null,
        "store_id": 1,
        "deleted_at": null,
        "created_at": "2024-01-01T00:00:00.000000Z",
        "updated_at": "2024-01-01T00:00:00.000000Z",
        "sort_index": 1
      },
      {
        "id": 2,
        "slug": "game-keys",
        "title": "Game Keys",
        "description": "Video game activation keys",
        "metadata": null,
        "is_active": true,
        "parent_id": null,
        "store_id": 1,
        "deleted_at": null,
        "created_at": "2024-01-02T00:00:00.000000Z",
        "updated_at": "2024-01-02T00:00:00.000000Z",
        "sort_index": 2
      }
    ],
    "first_page_url": "https://merchant-api.rmz.gg/shawarma/categories?page=1",
    "from": 1,
    "next_page_url": null,
    "path": "https://merchant-api.rmz.gg/shawarma/categories",
    "per_page": 15,
    "prev_page_url": null,
    "to": 2
  },
  "api": "rmz.shawarma",
  "timestamp": 1699999999
}
```

## Error Responses

| Code  | Description                             |
| ----- | --------------------------------------- |
| `401` | Unauthorized — invalid or missing token |
