List Categories
GET
Returns a paginated list of categories for the authenticated store.
/categoriesAuthentication
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) |
Example Request
curl -X GET "https://merchant-api.rmz.gg/shawarma/categories?page=1" \
-H "Authorization: Bearer YOUR_API_TOKEN"
const response = await fetch("https://merchant-api.rmz.gg/shawarma/categories?page=1", {
headers: { "Authorization": "Bearer YOUR_API_TOKEN" }
});
const categories = await response.json();
import requests
response = requests.get(
"https://merchant-api.rmz.gg/shawarma/categories",
headers={"Authorization": "Bearer YOUR_API_TOKEN"},
params={"page": 1}
)
categories = response.json()
$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);
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
| Code | Description |
|---|---|
401 | Unauthorized — invalid or missing token |

