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

# Eliminar Categoría

> Aprende a eliminar una categoría de la tienda usando el endpoint DELETE /stores/{storeId}/categories/{categoryId}.

## 📌 Endpoint

`DELETE /stores/{storeId}/categories/{categoryId}`

Elimina una categoría de la tienda.

***

## 🔐 Autenticación

* **Ruta privada**.
* Envía `Authorization` con tu API Key.

***

## 🧾 Parámetros de ruta

| Parámetro | Tipo | Obligatorio | Descripción |
| - | - | - | - |
| `storeId` | string | Sí | ID de la tienda |
| `categoryId` | string | Sí | ID de la categoría |

***

## ✅ Ejemplo de solicitud

```bash theme={null}
curl -X DELETE "https://api.cabrapi.com.br/v1/stores/STORE_ID/categories/CATEGORY_ID" \
	-H "Authorization: TU_API_KEY"
```

***

## 📦 Respuesta exitosa (200)

```json theme={null}
{
	"code": "CATEGORY_DELETED"
}
```

***

## ⚠️ Posibles errores

* `400 INVALID_DATA` → parámetros inválidos
* `401 API_KEY_NOT_PROVIDED` → header `Authorization` no enviado (o `TOKEN_NOT_PROVIDED` vía Bearer)
* `401 INVALID_API_KEY` → API Key inválida (o `INVALID_TOKEN` / `TOKEN_EXPIRED` / `SESSION_NOT_FOUND` / `SESSION_EXPIRED` / `UNAUTHENTICATED` vía Bearer)
* `403 USER_DISABLED` → usuario desactivado o eliminado
* `403 NO_ACTIVE_SUBSCRIPTION` → plan inactivo o expirado (o `PENDING_2FA` vía Bearer)
* `403 STORE_NOT_FOUND` → tienda no encontrada o sin permiso
* `404 CATEGORY_NOT_FOUND` → categoría no encontrada
* `429 RATE_LIMIT_EXCEEDED` → límite de solicitudes por minuto excedido
* `500 INTERNAL_SERVER_ERROR` → error interno
* `503 SERVICE_UNAVAILABLE` → servicio o base de datos no disponible


## OpenAPI

````yaml DELETE /stores/{storeId}/categories/{categoryId}
openapi: 3.1.0
info:
  title: caBRAPI
  version: 1.0.0
servers:
  - url: https://api.cabrapi.com.br/v1
security: []
paths:
  /stores/{storeId}/categories/{categoryId}:
    delete:
      tags:
        - Categories
      summary: Delete category
      operationId: deleteCategory
      parameters:
        - $ref: '#/components/parameters/StoreId'
        - $ref: '#/components/parameters/CategoryId'
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  code:
                    example: CATEGORY_DELETED
                    type: string
                required:
                  - code
                type: object
          description: Delete category.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Invalid request.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Missing or invalid API key.
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Forbidden (inactive plan or insufficient permissions).
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Resource not found.
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Rate limit exceeded.
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Internal server error.
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Service unavailable.
      security:
        - ApiKey: []
components:
  parameters:
    StoreId:
      in: path
      name: storeId
      required: true
      schema:
        type: string
        minLength: 1
        maxLength: 50
    CategoryId:
      in: path
      name: categoryId
      required: true
      schema:
        type: string
        minLength: 1
        maxLength: 50
  schemas:
    Error:
      properties:
        code:
          example: STORE_NOT_FOUND
          type: string
      required:
        - code
      type: object
  securitySchemes:
    ApiKey:
      in: header
      name: Authorization
      type: apiKey
      x-default: YOUR_API_KEY_HERE

````

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