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

# Get a category

> **Scope:** [`read_products`](/scopes)

Reads one category.

`join` adds its subcategories as `children`, up to three levels deep:
`children`, `children.children` or `children.children.children`.
Subcategories come highest `position` first. One read joins at most
100 subcategories over all levels; more answers `422 join_too_large`:
list them with `filter=parent_id||$eq||<id>` instead.




## OpenAPI

````yaml /openapi.json get /categories/{id}
openapi: 3.1.0
info:
  title: EasyOrders Admin API
  version: v1
  summary: Read and write a merchant's store data from your app.
  description: |
    The EasyOrders Admin API lets an installed app work with one merchant's
    store: its orders, shipping settings and shipping areas, within the
    scopes the merchant approved.

    - Every request needs an access token (`Authorization: Bearer eo_at_...`)
      from the OAuth flow. A token works on one store only.
    - Request and response bodies are JSON. Unknown fields and query
      parameters are refused.
    - Errors share one shape: `{"error": {"code", "message", "details"}}`.
    - `v1` is stable: new fields and endpoints are added to it; a breaking
      change ships as a new version.
  contact:
    name: EasyOrders developers
    url: https://easyorders.eg
servers:
  - url: https://api.easy-orders.net/api/partners-apps/v1
    description: Production
security:
  - accessToken: []
tags:
  - name: Article categories
    description: >-
      The categories of the store's blog, which articles name in their
      `category_ids`.
  - name: Articles
    description: The articles of the store's blog, with HTML content, tags and categories.
  - name: Billing
    description: >-
      Your app's plan subscription and usage wallet on the store, and debiting
      the wallet by usage.
  - name: Categories
    description: The store's product categories and subcategories.
  - name: Checkout fields
    description: >-
      The fields of the store's checkout form, their labels, order, and whether
      they show and are required.
  - name: Coupons
    description: >-
      The store's coupons, by code or automatic, and the products, variants and
      categories they apply to.
  - name: Labels
    description: >-
      Your app's short colored words on orders and products, shown in the
      merchant's orders and products tables.
  - name: Missed orders
    description: >-
      Checkouts the shopper started and did not finish, to follow up and
      recover.
  - name: Orders
    description: The store's orders, their status, payment status and notes.
  - name: Pages
    description: >-
      The store's pages, such as About us or the return policy, with HTML
      content.
  - name: Products
    description: The store's products, their options, variants and stock.
  - name: Reviews
    description: >-
      The reviews of the store's products, and which of them the product page
      shows.
  - name: Shipping
    description: The store's shipping settings and shipping areas (governorates).
  - name: Store
    description: >-
      The store the access token belongs to, its addresses, currency, language
      and plan.
paths:
  /categories/{id}:
    parameters:
      - $ref: '#/components/parameters/CategoryID'
    get:
      tags:
        - Categories
      summary: Get a category
      description: |
        **Scope:** [`read_products`](/scopes)

        Reads one category.

        `join` adds its subcategories as `children`, up to three levels deep:
        `children`, `children.children` or `children.children.children`.
        Subcategories come highest `position` first. One read joins at most
        100 subcategories over all levels; more answers `422 join_too_large`:
        list them with `filter=parent_id||$eq||<id>` instead.
      operationId: getCategory
      parameters:
        - name: join
          in: query
          description: How many levels of subcategories to add.
          schema:
            type: string
            enum:
              - children
              - children.children
              - children.children.children
      responses:
        '200':
          description: The category.
          content:
            application/json:
              schema:
                type: object
                required:
                  - category
                properties:
                  category:
                    $ref: '#/components/schemas/Category'
              example:
                category:
                  id: 3b4c5d6e-7f80-4a1b-9c2d-3e4f5a6b7c8d
                  name: Men
                  slug: men
                  thumb: https://cdn.example.com/categories/men.jpg
                  parent_id: null
                  position: 10
                  hidden: false
                  show_in_header: true
                  created_at: '2026-11-20T08:00:00Z'
                  updated_at: '2026-11-20T08:00:00Z'
                  children:
                    - id: 5c1d2e3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f
                      name: T-Shirts
                      slug: t-shirts
                      thumb: https://cdn.example.com/categories/t-shirts.jpg
                      parent_id: 3b4c5d6e-7f80-4a1b-9c2d-3e4f5a6b7c8d
                      position: 0
                      hidden: false
                      show_in_header: true
                      created_at: '2026-12-04T09:00:00Z'
                      updated_at: '2026-12-04T09:00:00Z'
                      children: []
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/InsufficientScope'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          description: >-
            `validation_failed`, or `join_too_large` when the category has more
            than 100 subcategories to join.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: join_too_large
                  message: >-
                    More than 100 subcategories to join: list them with
                    filter=parent_id||$eq||<id> instead
        '429':
          $ref: '#/components/responses/RateLimited'
      x-codeSamples:
        - lang: bash
          label: cURL
          source: >-
            curl -G
            "https://api.easy-orders.net/api/partners-apps/v1/categories/5c1d2e3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f"
            \
              --data-urlencode "join=children" \
              -H "Authorization: Bearer $EASYORDERS_ACCESS_TOKEN"
        - lang: typescript
          label: TypeScript
          source: >-
            const params = new URLSearchParams([
              ['join', 'children'],
            ])

            const url =
            'https://api.easy-orders.net/api/partners-apps/v1/categories/5c1d2e3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f?'
            + params


            const response = await fetch(url, {
              method: 'GET',
              headers: {
                Authorization: `Bearer ${process.env.EASYORDERS_ACCESS_TOKEN}`,
              },
            })


            const json = await response.json()

            if (!response.ok) {
              throw new Error(`${json.error.code}: ${json.error.message}`)
            }

            const { category } = json
        - lang: go
          label: Go
          source: "package main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"os\"\n)\n\nfunc main() {\n\tquery := url.Values{}\n\tquery.Add(\"join\", \"children\")\n\n\treq, err := http.NewRequest(\"GET\", \"https://api.easy-orders.net/api/partners-apps/v1/categories/5c1d2e3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f?\"+query.Encode(), nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Authorization\", \"Bearer \"+os.Getenv(\"EASYORDERS_ACCESS_TOKEN\"))\n\n\tres, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer res.Body.Close()\n\n\tvar answer map[string]any\n\tif err := json.NewDecoder(res.Body).Decode(&answer); err != nil {\n\t\tpanic(err)\n\t}\n\tif res.StatusCode >= 300 {\n\t\tpanic(fmt.Sprint(res.Status, answer[\"error\"]))\n\t}\n\tfmt.Println(answer[\"category\"])\n}"
        - lang: php
          label: PHP
          source: >-
            <?php


            $query = http_build_query([
                'join' => 'children',
            ]);

            $ch =
            curl_init('https://api.easy-orders.net/api/partners-apps/v1/categories/5c1d2e3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f?'
            . $query);

            curl_setopt_array($ch, [
                CURLOPT_CUSTOMREQUEST => 'GET',
                CURLOPT_RETURNTRANSFER => true,
                CURLOPT_HTTPHEADER => [
                    'Authorization: Bearer ' . getenv('EASYORDERS_ACCESS_TOKEN'),
                ],
            ]);


            $answer = json_decode(curl_exec($ch), true);

            $status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

            curl_close($ch);


            if ($status >= 300) {
                throw new RuntimeException($answer['error']['code'] . ': ' . $answer['error']['message']);
            }

            $category = $answer['category'];
        - lang: python
          label: Python
          source: |-
            import os

            import requests

            response = requests.get(
                "https://api.easy-orders.net/api/partners-apps/v1/categories/5c1d2e3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f",
                headers={
                    "Authorization": f"Bearer {os.environ['EASYORDERS_ACCESS_TOKEN']}",
                },
                params=[
                    ("join", "children"),
                ],
                timeout=30,
            )
            answer = response.json()
            if not response.ok:
                raise RuntimeError(f"{answer['error']['code']}: {answer['error']['message']}")
            category = answer["category"]
components:
  parameters:
    CategoryID:
      name: id
      in: path
      required: true
      description: The category's ID.
      schema:
        type: string
        format: uuid
      example: 5c1d2e3f-4a5b-4c6d-8e7f-9a0b1c2d3e4f
  schemas:
    Category:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        slug:
          type: string
          description: The category's address on the storefront. Unique in the store.
        thumb:
          type: string
          description: The category's image URL.
        parent_id:
          type:
            - string
            - 'null'
          format: uuid
          description: The category this one is under; `null` for a top-level category.
        position:
          type: integer
          description: The merchant's order. Subcategories come highest first.
        hidden:
          type: boolean
          description: A hidden category is not shown on the storefront.
        show_in_header:
          type: boolean
          description: Whether the category is shown in the storefront's header.
        created_at:
          type: string
          format: date-time
          description: Old categories without a creation time read `1970-01-01T00:00:00Z`.
        updated_at:
          type: string
          format: date-time
        children:
          type: array
          description: >-
            The subcategories, each with its own `children` at deeper levels.
            Present on a single category with `join`; `[]` when it has none.
          items:
            $ref: '#/components/schemas/Category'
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: A stable, snake_case code. Branch on it, not on the message.
            message:
              type: string
              description: A human-readable explanation. It may change.
            details:
              description: More about the error, shaped per code.
  responses:
    Unauthenticated:
      description: The access token is missing, invalid or expired.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: unauthenticated
              message: Missing or invalid access token
    PaymentRequired:
      description: Your app's subscription on this store is suspended.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: payment_required
              message: The app's subscription on this store is suspended
    InsufficientScope:
      description: The token lacks the scope this endpoint needs.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: insufficient_scope
              message: 'This request requires the scope: read_orders'
              details:
                required_scope: read_orders
    NotFound:
      description: No such resource in this store.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: not_found
              message: Resource not found
    RateLimited:
      description: More than 600 requests in a minute from your app on this store.
      headers:
        Retry-After:
          $ref: '#/components/headers/Retry-After'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: too_many_requests
              message: Rate limit exceeded
  headers:
    Retry-After:
      description: Seconds to wait before retrying.
      schema:
        type: integer
  securitySchemes:
    accessToken:
      type: http
      scheme: bearer
      description: >
        An access token from the OAuth flow (`eo_at_...`). It lasts one hour;

        refresh it with the refresh token. See
        [Authentication](/authentication).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.