> ## 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.

# Listar Webhooks de la Tienda

> Retorna todos los webhooks registrados para una tienda y el límite máximo permitido por el plan.

## 📋 Listar Webhooks de la Tienda

Este endpoint permite listar todos los webhooks registrados para una tienda específica, además de informar el límite máximo de webhooks permitido por el plan de la tienda.

### 🔐 Autenticación

Esta ruta requiere autenticación mediante API Key, enviada en el header de la solicitud:

```http theme={null}
Authorization: TU_API_KEY_AQUI
```

### 📥 Parámetros de Ruta

| Parámetro | Tipo | Obligatorio | Descripción |
| - | - | - | - |
| `storeId` | `string (UUID)` | Sí | ID de la tienda |

### 📋 Ejemplo de Solicitud

```bash theme={null}
curl --location "https://api.cabrapi.com.br/v1/stores/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/webhooks" \
--header "Authorization: TU_API_KEY_AQUI"
```

### 📊 Ejemplo de Respuesta (200)

```json theme={null}
{
  "webhooks": [
    {
      "url": "https://meusistema.com/callback1",
      "events": [
        "payment.status.changed",
        "payment.updated"
      ]
    }
  ],
  "max": 3
}
```

### ❌ Posibles Errores

| Status | Code | Cuándo ocurre |
| - | - | - |
| `400` | `STORE_ID_REQUIRED` | Código muerto: la ruta exige `storeId`; nunca se dispara en la práctica. |
| `401` | `API_KEY_NOT_PROVIDED` | Header `Authorization` no enviado. |
| `401` | `INVALID_API_KEY` | API Key inválida o no encontrada. |
| `403` | `USER_DISABLED` | Cuenta de usuario desactivada o eliminada. |
| `403` | `NO_ACTIVE_SUBSCRIPTION` | Cuenta sin plan activo. |
| `404` | `STORE_NOT_FOUND` | Cuando la tienda no existe o no pertenece a su cuenta. |
| `429` | `RATE_LIMIT_EXCEEDED` | Límite de solicitudes por minuto del plan excedido. |
| `503` | `SERVICE_UNAVAILABLE` | Servicio temporalmente no disponible. |

> **Actualización de eventos:** Para actualizar la lista de `events` de un webhook ya registrado, utilice `PUT` o `PATCH /v1/stores/{storeId}/webhooks` enviando `url` y `events` (retorna `200` con `code: "WEBHOOK_UPDATED"`).


## OpenAPI

````yaml GET /stores/{storeId}/webhooks
openapi: 3.1.0
info:
  title: caBRAPI
  version: 1.0.0
servers:
  - url: https://api.cabrapi.com.br/v1
security: []
paths:
  /stores/{storeId}/webhooks:
    get:
      tags:
        - Webhooks
      summary: List store webhooks
      operationId: listWebhooks
      parameters:
        - $ref: '#/components/parameters/StoreId'
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  max:
                    example: 3
                    type: integer
                  webhooks:
                    items:
                      $ref: '#/components/schemas/Webhook'
                    type: array
                required:
                  - webhooks
                  - max
                type: object
          description: List store webhooks.
        '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.
        '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
  schemas:
    Webhook:
      description: Store webhook (events and delivery URL).
      properties:
        events:
          items:
            enum:
              - store.created
              - store.updated
              - store.deleted
              - store.reordered
              - product.created
              - product.updated
              - product.deleted
              - product.reordered
              - category.created
              - category.updated
              - category.deleted
              - category.reordered
              - coupon.created
              - coupon.updated
              - coupon.deleted
              - coupon.reordered
              - page.upserted
              - page.deleted
              - affiliate.created
              - affiliate.updated
              - affiliate.deleted
              - payment.created
              - payment.updated
              - payment.deleted
              - payment.status.changed
            type: string
          type: array
        url:
          format: uri
          type: string
      required:
        - url
        - events
      type: object
    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.