Skip to content
Esc
↑↓navigate↵open⌘Jpreview

v1Categories

Query categories with search and pagination

QUERYv1Categories
Arguments
parentUrlString

Parent category URI; when set, returns direct children of that category

searchString

Full-text search over category name

localeString!required

Locale for translated category fields (e.g. en, sv). Required

pageInt

Page number (1-based, default 1)

perPageInt

Page size (default 25, max 50)

maxLevelInt

Maximum tree depth to return. Use 0 for root categories only

Returns

Categories with pagination information

Try it
Server
Bodyapplication/json
Request
curl -X POST 'https://graphql.enad.io/{app_id}/graphql' \
  -H 'Content-Type: application/json' \
  -d '{
  "query": "query V1Categories($parentUrl: String, $search: String, $locale: String!, $page: Int, $perPage: Int, $maxLevel: Int) {\n  v1Categories(parentUrl: $parentUrl, search: $search, locale: $locale, page: $page, perPage: $perPage, maxLevel: $maxLevel) {\n    categories {\n      id\n      slug\n      name\n      description\n      seoTitle\n      seoDescription\n      parentId\n      sortOrder\n      status\n      coverUrl\n      fullName\n      fullUri\n      createdAt\n      updatedAt\n      level\n    }\n    pageInfo {\n      totalPages\n      currentPage\n      hasNextPage\n      hasPreviousPage\n    }\n  }\n}",
  "variables": {
    "parentUrl": "string",
    "search": "string",
    "locale": "string",
    "page": 0,
    "perPage": 0,
    "maxLevel": 0
  }
}'
Response
{
  "data": {
    "v1Categories": {
      "categories": [
        {
          "id": "string",
          "slug": "string",
          "name": "string",
          "description": "string",
          "seoTitle": "string",
          "seoDescription": "string",
          "parentId": "string",
          "sortOrder": 0,
          "status": "string",
          "coverUrl": "string",
          "fullName": [
            "string"
          ],
          "fullUri": "string",
          "createdAt": null,
          "updatedAt": null,
          "level": 0
        }
      ],
      "pageInfo": {
        "totalPages": 0,
        "currentPage": 0,
        "hasNextPage": true,
        "hasPreviousPage": true
      }
    }
  }
}