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

# Estado de canales

> Canales de cada subcompañía por tipo y proveedor, con su estado

Devuelve, para cada subcompañía de la página, sus canales agrupados por tipo y proveedor con su estado. Sirve para alimentar un tablero de estado de servicio.

## Campos de cada subcompañía

| Campo | Tipo | Descripción |
| - | - | - |
| `id` | string | Id de la empresa en Jelou. |
| `externalId` | string \| null | Identificador de la empresa en tus sistemas, si está configurado. |
| `channels` | object\[] | Un elemento por combinación de tipo y proveedor, ordenados por `type` y `provider`. |
| `channels[].type` | string | Tipo de canal en minúsculas, por ejemplo `whatsapp` o `widget`. |
| `channels[].provider` | string \| null | Proveedor del canal, por ejemplo `gupshup_capi` o `whatsapp_cloud`. |
| `channels[].status` | string | `active` si al menos un canal de ese grupo está activo; si no, `inactive`. |

> [!NOTE]
>
> Los canales eliminados no aparecen. Una subcompañía sin canales llega con `channels: []`.

```bash cURL theme={null}
curl --request GET \
  --url 'https://gateway.jelou.ai/v1/partner/monitoring?page=1&limit=25' \
  --header 'x-api-key: <API_KEY>'
```

```json 200 Éxito theme={null}
{
  "success": true,
  "result": {
    "partner": "acme",
    "page": 1,
    "limit": 25,
    "total": 2,
    "subcompanies": [
      {
        "id": "1024",
        "externalId": "C-000123",
        "channels": [
          { "type": "whatsapp", "provider": "gupshup_capi", "status": "active" },
          { "type": "widget", "provider": "web", "status": "active" }
        ]
      },
      {
        "id": "1031",
        "externalId": null,
        "channels": [
          { "type": "whatsapp", "provider": "whatsapp_cloud", "status": "inactive" }
        ]
      }
    ]
  },
  "statusCode": 200
}
```

```json 403 Sin partners:read theme={null}
{
  "success": false,
  "statusCode": 403
}
```


## OpenAPI

````yaml api/partner/openapi.json GET /monitoring
openapi: 3.1.0
info:
  title: Jelou Partner API
  version: 1.0.0
  description: >-
    Read-only API for partners to monitor the companies subscribed to their
    products. The partner is resolved from the API key, so no route takes a
    partner identifier.
servers:
  - url: https://gateway.jelou.ai/v1/partner
    description: Production
security:
  - apiKey: []
paths:
  /monitoring:
    get:
      summary: List channel status per subcompany
      description: >-
        Channels of each subcompany grouped by type and provider, with their
        status.
      operationId: listPartnerMonitoring
      parameters:
        - name: page
          in: query
          description: Page number.
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: limit
          in: query
          description: Subcompanies per page.
          schema:
            type: integer
            minimum: 1
            maximum: 25
            default: 25
      responses:
        '200':
          description: A page of subcompanies.
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - result
                  - statusCode
                properties:
                  success:
                    const: true
                  statusCode:
                    const: 200
                  result:
                    type: object
                    required:
                      - partner
                      - page
                      - limit
                      - total
                      - subcompanies
                    properties:
                      partner:
                        type: string
                        description: Partner slug resolved from the API key.
                      page:
                        type: integer
                      limit:
                        type: integer
                      total:
                        type: integer
                        description: Subcompanies matching the request across all pages.
                      subcompanies:
                        type: array
                        items:
                          $ref: '#/components/schemas/MonitoringSubcompany'
        '400':
          description: Invalid query parameter.
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - statusCode
                  - error
                properties:
                  success:
                    const: false
                  statusCode:
                    const: 400
                  error:
                    type: string
                    enum:
                      - invalid_page
                      - invalid_limit
        '401':
          description: Missing or invalid API key.
        '403':
          description: >-
            The API key lacks the `partners:read` scope, carries the `*`
            wildcard, or does not belong to an active partner.
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - statusCode
                properties:
                  success:
                    const: false
                  statusCode:
                    const: 403
        '404':
          description: >-
            Resource not found. Also returned for a company that is not a
            subscriber of the partner.
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - statusCode
                properties:
                  success:
                    const: false
                  statusCode:
                    const: 404
        '429':
          description: 'Rate limit exceeded: 60 requests per minute.'
        '500':
          description: Unexpected error.
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - statusCode
                properties:
                  success:
                    const: false
                  statusCode:
                    const: 500
components:
  schemas:
    MonitoringSubcompany:
      type: object
      required:
        - id
        - externalId
        - channels
      properties:
        id:
          type: string
          description: Jelou company id.
        externalId:
          type:
            - string
            - 'null'
          description: Identifier of the company in the partner's own systems, when set.
        channels:
          type: array
          items:
            type: object
            required:
              - type
              - provider
              - status
            properties:
              type:
                type: string
              provider:
                type:
                  - string
                  - 'null'
              status:
                type: string
                enum:
                  - active
                  - inactive
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: Organization API key with the `partners:read` scope.

````

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