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

# Get a category

> One category with its products.

**Permission:** `categories.show`



## OpenAPI

````yaml /docs/catalog-api.yaml get /categories/{category}
openapi: 3.1.0
info:
  title: Spartan Catalog API
  version: '2026.11'
  description: >-
    Read only access to products, categories and coupons.


    All requests need an API key from **Admin, API** in the `Authorization:
    Bearer <key>` header. Replace `{domain}` with the domain of your Spartan
    installation. Successful responses use the envelope `{"data": ..., "meta":
    {"request_id": ...}}`; errors use `{"error": {"code", "message", "details"},
    "request_id"}`.
servers:
  - url: https://{domain}/api/application
    description: Your Spartan installation
    variables:
      domain:
        default: billing.example.com
        description: Domain of your Spartan installation, without https://
security:
  - bearerAuth: []
tags:
  - name: Products
  - name: Categories
  - name: Coupons
paths:
  /categories/{category}:
    get:
      tags:
        - Categories
      summary: Get a category
      description: |-
        One category with its products.

        **Permission:** `categories.show`
      operationId: getCategory
      parameters:
        - name: category
          in: path
          required: true
          description: Category id.
          schema:
            type: integer
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/CategoryDetail'
                  meta:
                    $ref: '#/components/schemas/Meta'
                required:
                  - data
                  - meta
              example:
                data:
                  id: 3
                  name: Minecraft Plans
                  description: Minecraft Plans to test the Pterodactyl Module.
                  image: categories/bpDSK36Tny6D0ki7j3D0fS0GLzMW5x0HMeBv7hxN.png
                  position: 1
                  design: image_background
                  products_count: 7
                  products:
                    - id: 20
                      name: Minecraft Advanced
                      slug: minecraft-advanced-plan
                      description: >-
                        <ul style="margin-top:16px; line-height:2;
                        list-style:none; padding:0;">
                            <li>✅ <strong>8 GB RAM</strong></li>
                            <li>✅ <strong>16 GB NVMe storage</strong></li>
                            <li>✅ backups &amp; DDoS protection</li>
                            <li>✅ One click plugin &amp; mod installer</li>
                            <li>✅ 24/7 support</li>
                        </ul>
                      image: products/gGPRQ6sy9Gzr0JDaUz2aaA8OIE6Tmp1sKsXNoprX.png
                      icon_image: null
                      tags: []
                      status: active
                      position: 1
                      stock: 1
                      per_user_stock: -1
                      category:
                        id: 3
                        name: Minecraft Plans
                      module: PterodactylService
                      billing_cycles:
                        weekly:
                          enabled: false
                          price: 0
                          setup_fee: 0
                          setup_fee_recurring: false
                        monthly:
                          enabled: true
                          price: 25
                          setup_fee: 4
                          setup_fee_recurring: true
                        quarterly:
                          enabled: true
                          price: 50
                          setup_fee: 5
                          setup_fee_recurring: true
                        yearly:
                          enabled: true
                          price: 100
                          setup_fee: 5
                          setup_fee_recurring: true
                        lifetime:
                          enabled: false
                          price: 0
                          setup_fee: 0
                          setup_fee_recurring: false
                      custom_plans: []
                      configurable_options:
                        - name: Extra Memory
                          type: slider
                          required: false
                          validation_rules: null
                          min: 1024
                          max: 3072
                          step: 1
                          default_value: '1024'
                          mapped_field: memory
                          options:
                            - label: 1 GB RAM
                              value: '1024'
                              description: null
                              image_url: null
                              price: null
                              pricing:
                                custom_1772008065238_ih05rvby0: 2
                                custom_1772008076590_vrnrkyrxr: 3
                                weekly: 3
                                monthly: 4
                                quarterly: 5
                                yearly: 6
                                lifetime: 8
                      upgrade:
                        enabled: true
                        fee: 0
                        prorate: false
                      downgrade:
                        enabled: true
                        fee: 0
                        refund: true
                      is_taxable: true
                      created_at: '2026-02-25T08:58:36.000000Z'
                      updated_at: '2026-11-16T07:49:12.000000Z'
                  created_at: '2026-02-25T08:22:15.000000Z'
                  updated_at: '2026-07-06T07:39:20.000000Z'
                meta:
                  request_id: 44bbfda0-d6d7-47f8-ac71-f1bc9d391d9a
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    CategoryDetail:
      allOf:
        - $ref: '#/components/schemas/Category'
        - type: object
          properties:
            products:
              type: array
              items:
                $ref: '#/components/schemas/Product'
    Meta:
      type: object
      properties:
        request_id:
          type: string
          format: uuid
          description: Request id, also sent in the `X-Request-ID` response header.
      required:
        - request_id
    Category:
      type: object
      properties:
        id:
          type: integer
          description: Category id.
        name:
          type: string
        description:
          type:
            - string
            - 'null'
        image:
          type:
            - string
            - 'null'
        position:
          type: integer
        design:
          type:
            - string
            - 'null'
          description: Storefront card design.
        products_count:
          type: integer
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Product:
      type: object
      properties:
        id:
          type: integer
          description: Product id.
        name:
          type: string
        slug:
          type: string
        description:
          type:
            - string
            - 'null'
          description: HTML description.
        image:
          type:
            - string
            - 'null'
          description: Path on the public storage disk (prefix with `/storage/`).
        icon_image:
          type:
            - string
            - 'null'
        tags:
          type: array
          items:
            type: string
        status:
          type: string
          enum:
            - active
            - inactive
            - hidden
        position:
          type: integer
          description: Sort order inside the category.
        stock:
          type: integer
          description: '`-1` means unlimited.'
        per_user_stock:
          type: integer
          description: '`-1` means unlimited.'
        category:
          type:
            - object
            - 'null'
          properties:
            id:
              type: integer
            name:
              type: string
        module:
          type:
            - string
            - 'null'
          description: Provisioning module.
        billing_cycles:
          type: object
          properties: {}
          description: >-
            Built in cycles keyed by `weekly`, `monthly`, `quarterly`, `yearly`,
            `lifetime`.
          additionalProperties:
            $ref: '#/components/schemas/BillingCycle'
        custom_plans:
          type: array
          items:
            type: object
            properties: {}
            additionalProperties: true
          description: Custom billing plans.
        configurable_options:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              type:
                type: string
                description: >-
                  Input type, for example `slider`, `dropdown`, `text`,
                  `checkbox`.
              required:
                type: boolean
              validation_rules:
                type:
                  - string
                  - 'null'
              min:
                type:
                  - number
                  - 'null'
              max:
                type:
                  - number
                  - 'null'
              step:
                type:
                  - number
                  - 'null'
              default_value:
                type:
                  - string
                  - 'null'
              mapped_field:
                type:
                  - string
                  - 'null'
                description: Module field the option maps to.
              options:
                type: array
                items:
                  type: object
                  properties: {}
                  additionalProperties: true
                description: Choices with label, value and per cycle `pricing`.
        upgrade:
          type: object
          properties:
            enabled:
              type: boolean
            fee:
              type: number
            prorate:
              type: boolean
        downgrade:
          type: object
          properties:
            enabled:
              type: boolean
            fee:
              type: number
            refund:
              type: boolean
        is_taxable:
          type: boolean
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: >-
                Machine readable error code, for example `unauthorized`,
                `forbidden`, `not_found`, `invalid_service_state`.
            message:
              type: string
              description: Human readable explanation.
            details:
              type: object
              properties: {}
              description: Extra context. An empty object for most errors.
              additionalProperties: true
          required:
            - code
            - message
            - details
        request_id:
          type: string
          format: uuid
          description: >-
            Request id. Also returned in the `X-Request-ID` header. Send your
            own with `X-Request-ID` to correlate logs.
      description: Error envelope returned by every failed request.
      required:
        - error
        - request_id
    BillingCycle:
      type: object
      properties:
        enabled:
          type: boolean
        price:
          type: number
        setup_fee:
          type: number
        setup_fee_recurring:
          type: boolean
  responses:
    Unauthorized:
      description: Missing, invalid or inactive API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            missing:
              summary: No Authorization header
              value:
                error:
                  code: unauthorized
                  message: Bearer token required.
                  details: {}
                request_id: 9aca26ca-e06f-4725-8e4b-4385d6c03422
            invalid:
              summary: Unknown or inactive key
              value:
                error:
                  code: unauthorized
                  message: Invalid or inactive token.
                  details: {}
                request_id: 8802a669-6f06-453e-a1d8-0b81621167c3
    Forbidden:
      description: >-
        The key lacks the permission for this endpoint, or the request IP is not
        in the key allow list.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            forbidden:
              summary: Missing permission
              value:
                error:
                  code: forbidden
                  message: Insufficient permissions for this action.
                  details: {}
                request_id: 191c51e1-03a3-448e-8df7-3c584be888b0
            ip_not_allowed:
              summary: IP not allowed
              value:
                error:
                  code: ip_not_allowed
                  message: Access denied from this IP address.
                  details: {}
                request_id: 3f6c2a1e-8b4d-4f7a-9c2e-5d1b7a9e0c42
    NotFound:
      description: The resource in the path does not exist.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: not_found
              message: The requested resource was not found.
              details: {}
            request_id: cccbc627-4fd4-4727-889e-fa727c48792c
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key created in Admin, API. Send it as `Authorization: Bearer <key>`.
        Each key has its own permissions and optional IP allow list.

````

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