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

# Obtener

> Obtiene una categoría por su ID.



## OpenAPI

````yaml /api/openapi.json get /categories/{categoryId}
openapi: 3.1.0
info:
  title: Riqra API
  version: '1.0'
  contact:
    email: soporte@riqra.com
    url: https://www.riqra.com/
    name: Riqra Support
  description: >-
    Usando nuestra API puedes integrar tu ERP o tu sistema actual de
    administración con [Riqra](https://www.riqra.com/).
servers:
  - url: https://sandbox.api.riqra.com
    description: Sandbox
  - description: Producción
    url: https://api.riqra.com
security:
  - API Key: []
tags:
  - name: Almacenes
  - name: Banners
  - name: Categorías
  - name: Clientes
  - name: Clientes - Direcciones
  - name: Cobertura
  - name: Comercio
  - name: Cupones
  - name: Inventario
  - name: Líneas de Crédito
  - name: Lista de Precios
  - name: Lista de Precios - Precios
  - name: Marcas
  - name: Pedidos
  - name: Productos
  - name: Productos Sugeridos
  - name: Promociones
  - name: Stock
  - name: Subcategorías
  - name: Variantes
paths:
  /categories/{categoryId}:
    parameters:
      - schema:
          type: integer
          format: int64
        name: categoryId
        in: path
        description: ID de la categoría.
        required: true
    get:
      tags:
        - Categorías
      summary: Obtener
      description: Obtiene una categoría por su ID.
      operationId: get-categories-categoryId
      parameters: []
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CategoryItemResponse'
        '404':
          description: Not Found
components:
  schemas:
    CategoryItemResponse:
      title: CategoryItemResponse
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Category'
    Category:
      type: object
      title: Category
      description: ''
      properties:
        id:
          $ref: '#/components/schemas/CategoryId'
        name:
          $ref: '#/components/schemas/CategoryName'
        image:
          $ref: '#/components/schemas/CategoryImage'
        description:
          $ref: '#/components/schemas/CategoryDescription'
        seo:
          $ref: '#/components/schemas/CategorySeo'
        order:
          $ref: '#/components/schemas/CategoryOrder'
        isFeatured:
          $ref: '#/components/schemas/CategoryIsFeatured'
        subcategories:
          type: array
          items:
            $ref: '#/components/schemas/SubcategoryId'
      required:
        - id
        - name
        - image
        - description
        - seo
        - order
        - isFeatured
        - subcategories
    CategoryId:
      type: integer
      title: CategoryId
      format: int64
      description: ID de la categoría.
    CategoryName:
      title: CategoryName
      type: string
      description: Nombre de la categoría.
    CategoryImage:
      type: string
      title: CategoryImage
      description: URL válida de imagen asociada con la categoría.
      format: uri
    CategoryDescription:
      title: CategoryDescription
      description: Descripción de la categoría.
      type: string
    CategorySeo:
      title: CategorySeo
      type: object
      description: Atributos para el SEO.
      properties:
        description:
          type: string
          description: Descripción de la categoría para el SEO.
    CategoryOrder:
      type: integer
      title: CategoryOrder
      format: int64
      default: 9999
      description: |-
        El orden de la categoría con respecto a las demás categorías.

        Ejemplo: `1` significa que será mostrado primero.
    CategoryIsFeatured:
      title: CategoryIsFeatured
      description: Indica si la categoría será destacada.
      type: boolean
    SubcategoryId:
      type: integer
      title: SubcategoryId
      description: El ID de la subcategoría.
      format: int64
  securitySchemes:
    API Key:
      name: api-key
      type: apiKey
      in: header
      description: >-
        Todas las llamadas al API tienen que contener este header junto a la
        clave para poder autenticar y autorizar al cliente.

````