Skip to main content

List Categories

GET/categories
Returns a paginated list of categories for the authenticated store.

Authentication

Headers

HeaderValueRequired
AuthorizationBearer YOUR_API_TOKENYes
Acceptapplication/jsonRecommended

Query Parameters

ParameterTypeRequiredDescription
pageintegerNoPage number (default: 1)

Example Request

curl -X GET "https://merchant-api.rmz.gg/shawarma/categories?page=1" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Success Response

{
  "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

CodeDescription
401Unauthorized — invalid or missing token