> ## Documentation Index
> Fetch the complete documentation index at: https://quickbutik.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Get categories

> Fetch store categories



## OpenAPI

````yaml get /v1/categories
openapi: 3.1.0
info:
  title: Quickbutik API
  version: 1.0.0
  description: >-
    Use the Quickbutik API to access and manage stores, products, orders, and
    more.
  contact:
    name: Quickbutik API Support
    url: https://quickbutik.com/support
  license:
    name: Proprietary
  x-fiddle-import-file: true
servers:
  - url: https://api.quickbutik.com
    description: Production server
security:
  - BasicAuth: []
tags:
  - name: Orders
    description: Order management operations
  - name: Products
    description: Product catalog management
  - name: Categories
    description: Product category management
  - name: Payment Methods
    description: Available payment methods
  - name: Shipping Methods
    description: Available shipping methods
  - name: Metadata
    description: Custom metadata management
  - name: Settings
    description: Store settings and configuration
  - name: Scripts
    description: Storefront script management
paths:
  /v1/categories:
    get:
      tags:
        - Categories
      summary: Get categories
      description: Fetch store categories
      operationId: get-categories
      parameters:
        - $ref: '#/components/parameters/CategoryIdQuery'
      responses:
        '200':
          $ref: '#/components/responses/CategoriesSuccess'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    CategoryIdQuery:
      name: category_id
      in: query
      schema:
        type: string
      description: >-
        Optional. Enter if you would like to fetch data from a specific
        category_id
  responses:
    CategoriesSuccess:
      description: Categories retrieved successfully
      content:
        application/json:
          schema:
            type: object
            properties:
              results:
                $ref: '#/components/schemas/Category'
    Unauthorized:
      description: Unauthorized - Invalid or missing authentication
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Category:
      type: object
      properties:
        category_id:
          type: integer
          example: 14
        uri:
          type: string
          example: sulor
        url:
          type: string
          example: /herr/skor/sulor
        name:
          type: string
          example: Sulor
        name_path:
          type: string
          example: Herr > Skor > Sulor
        description1:
          type:
            - string
            - 'null'
        description2:
          type:
            - string
            - 'null'
        parent_id:
          type:
            - integer
            - 'null'
          example: 13
          description: Returns NULL if this category is main
    Error:
      type: object
      properties:
        code:
          type: integer
          example: 404
        error:
          type: string
          example: Resource not found
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic
      description: >
        **Basic Authentication with API Keys**


        The Quickbutik API uses Basic Authentication where you use your API key
        as both the username and password.


        **How it works:**

        1. Format your credentials as `api_key:api_key` (using the SAME API key
        for both username and password)

        2. Base64 encode the formatted string

        3. Include in the Authorization header as: `Authorization: Basic
        ENCODED_STRING`


        **Example:**

        - API Key: `sk_live_abc123`

        - Formatted: `sk_live_abc123:sk_live_abc123`

        - Base64 Encoded: `c2tfbGl2ZV9hYmMxMjM6c2tfbGl2ZV9hYmMxMjM=`

        - Header: `Authorization: Basic
        c2tfbGl2ZV9hYmMxMjM6c2tfbGl2ZV9hYmMxMjM=`


        **cURL Example:**

        ```bash

        curl https://api.quickbutik.com/v1/orders -u your_api_key:your_api_key

        ```


        All API requests must be made over HTTPS. Requests made over HTTP will
        be rejected.


        API keys can be generated in the Quickbutik Control Panel under Settings
        → API.

````