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

# Категории товаров

> Возвращает список всех категорий последнего уровня с названием, ID и ID родительской категории.

Создать товары можно только в категориях последнего уровня, поэтому сравните именно их с категориями в своей системе.

Если при создании товара вы укажите категорию не из справочника или категорию не последнего уровня, выйдет ошибка.

<RequestExample>
  ```bash Пример запроса theme={null}
  /api/external/seller/v1/categories?pageNumber=1&pageSize=50
  ```
</RequestExample>


## OpenAPI

````yaml GET /api/seller/v1/categories
openapi: 3.0.1
info:
  title: Teez Seller API — Combined
  version: v1.0
servers:
  - url: https://seller-api.teez.kz
security:
  - oauth2: []
paths:
  /api/seller/v1/categories:
    get:
      tags:
        - Categories
      summary: Получение списка категорий
      parameters:
        - name: PageNumber
          in: query
          schema:
            type: integer
            format: int32
        - name: PageSize
          in: query
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalGetCategoriesApiResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExtendedProblemDetails'
components:
  schemas:
    ExternalGetCategoriesApiResponse:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/ExternalCategoryDto'
          nullable: true
        totalCount:
          type: integer
          format: int32
        pageNumber:
          type: integer
          format: int32
        pageSize:
          type: integer
          format: int32
        totalPages:
          type: integer
          format: int32
      additionalProperties: false
    ExtendedProblemDetails:
      type: object
      properties:
        type:
          type: string
          nullable: true
        title:
          type: string
          nullable: true
        status:
          type: integer
          format: int32
          nullable: true
        detail:
          type: string
          nullable: true
        instance:
          type: string
          nullable: true
        errorCode:
          type: string
          description: Код ошибки
          nullable: true
        errorMessage:
          type: string
          description: Сообщение об ошибке
          nullable: true
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              $ref: '#/components/schemas/ErrorDetail'
          description: Детализация ошибок валидации по полям
          nullable: true
      additionalProperties: {}
    ExternalCategoryDto:
      type: object
      properties:
        id:
          type: integer
          format: int64
        parentId:
          type: integer
          format: int64
        name:
          type: string
          nullable: true
      additionalProperties: false
    ErrorDetail:
      type: object
      properties:
        code:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
      additionalProperties: false
  securitySchemes:
    oauth2:
      type: http
      description: Please enter valid JWT token
      scheme: Bearer
      bearerFormat: JWT

````