Conexxa Health · v1.0.0

Documentação da API

API oficial alinhada ao modelo canônico CCOM.

https://api.conexxa.health/api/v1

Introdução

API oficial da Conexxa Health. | O contrato é alinhado ao modelo CCOM (Conexxa Canonical Order Model) - v0.2.0. | Modelo canônico para pedidos, itens, participantes, anexos, eventos e devolutivas no ecossistema Conexxa | Definição: O CCOM é o contrato de dados interno da Conexxa. Ele desacopla os formatos de entrada dos formatos exigidos pelos destinos.

URL base: https://api.conexxa.health/api/v1

Autenticação

Token privado no formato cxh_<64hex>. Configurado no gerenciamento de empresas do APP Conexxa Health.

Authorization: Bearer cxh_<64hex>
get/me

Identidade do usuário e empresas autorizadas

Respostas

  • 200 — Sucesso
curl -X GET "https://api.conexxa.health/api/v1/me" \
  -H "Authorization: Bearer cxh_SEU_TOKEN"

Resposta 200

{
  "user": {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "name": "string",
    "email": "usuario@empresa.com"
  },
  "companies": [
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "name": "string",
      "slug": "string"
    }
  ],
  "permissions": [
    "string"
  ],
  "company_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
get/connectors

Listar conectores

Parâmetros

company_idquerystring (uuid)

Respostas

  • 200 — Lista de conectores
curl -X GET "https://api.conexxa.health/api/v1/connectors" \
  -H "Authorization: Bearer cxh_SEU_TOKEN"

Resposta 200

{
  "data": [
    {}
  ]
}
get/connector-instances

Listar instâncias de conectores

Parâmetros

company_idquerystring (uuid)

Respostas

  • 200 — Lista de instâncias de conectores
curl -X GET "https://api.conexxa.health/api/v1/connector-instances" \
  -H "Authorization: Bearer cxh_SEU_TOKEN"

Resposta 200

{
  "data": [
    {}
  ]
}
get/workflows

Listar workflows

Parâmetros

company_idquerystring (uuid)

Respostas

  • 200 — Lista de workflows
curl -X GET "https://api.conexxa.health/api/v1/workflows" \
  -H "Authorization: Bearer cxh_SEU_TOKEN"

Resposta 200

{
  "data": [
    {}
  ]
}
get/workflows/{workflow}

Recuperar workflow por id

Parâmetros

workflowobrigatóriopathstring (uuid)

Respostas

  • 200 — Workflow encontrado
  • 404 — Workflow não encontrado
curl -X GET "https://api.conexxa.health/api/v1/workflows/{workflow}" \
  -H "Authorization: Bearer cxh_SEU_TOKEN"

Resposta 200

{}
get/processing-routes

Listar rotas de processamento

Parâmetros

company_idquerystring (uuid)

Respostas

  • 200 — Lista de rotas de processamento
curl -X GET "https://api.conexxa.health/api/v1/processing-routes" \
  -H "Authorization: Bearer cxh_SEU_TOKEN"

Resposta 200

{
  "data": [
    {}
  ]
}
get/mappings

Listar mapeamentos

Parâmetros

company_idquerystring (uuid)

Respostas

  • 200 — Lista de mapeamentos
curl -X GET "https://api.conexxa.health/api/v1/mappings" \
  -H "Authorization: Bearer cxh_SEU_TOKEN"

Resposta 200

{
  "data": [
    {}
  ]
}
get/reference-data/{resource}

Consultar dados de referência

Parâmetros

resourceobrigatóriopathstring · companies | connectors | workflows

Respostas

  • 200 — Dados de referência
  • 403 — Recurso não permitido
curl -X GET "https://api.conexxa.health/api/v1/reference-data/{resource}" \
  -H "Authorization: Bearer cxh_SEU_TOKEN"

Resposta 200

{
  "resource": "string",
  "data": [
    {}
  ]
}
get/orders

Listar pedidos

Parâmetros

company_idquerystring (uuid)
pagequeryinteger · padrão 1

Respostas

  • 200 — Lista paginada de pedidos
curl -X GET "https://api.conexxa.health/api/v1/orders" \
  -H "Authorization: Bearer cxh_SEU_TOKEN"

Resposta 200

{
  "data": [
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "company_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "business_key": "string",
      "status": "string",
      "source_channel": "string",
      "payload": {},
      "created_at": "2026-01-15T10:30:00Z",
      "updated_at": "2026-01-15T10:30:00Z"
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 1,
    "total": 1,
    "pages": 1
  }
}
post/orders

Registrar uma ordem e iniciar processamento assíncrono

Corpo da requisição (JSON) obrigatório. Veja o exemplo ao lado.

Respostas

  • 202 — Pedido aceito
curl -X POST "https://api.conexxa.health/api/v1/orders" \
  -H "Authorization: Bearer cxh_SEU_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "company_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "idempotency_key": "string",
  "order": {}
}'

Resposta 202

{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "status": "RECEIVED",
  "accepted_at": "2026-01-15T10:30:00Z",
  "location": "string"
}
get/orders/{id}

Recuperar pedido por id

Parâmetros

idobrigatóriopathstring (uuid)

Respostas

  • 200 — Pedido encontrado
curl -X GET "https://api.conexxa.health/api/v1/orders/{id}" \
  -H "Authorization: Bearer cxh_SEU_TOKEN"

Resposta 200

{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "company_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "business_key": "string",
  "status": "string",
  "source_channel": "string",
  "payload": {},
  "created_at": "2026-01-15T10:30:00Z",
  "updated_at": "2026-01-15T10:30:00Z"
}
patch/orders/{id}

Atualização controlada do pedido

Parâmetros

idobrigatóriopathstring (uuid)

Corpo da requisição (JSON) obrigatório. Veja o exemplo ao lado.

Respostas

  • 200 — Pedido atualizado
curl -X PATCH "https://api.conexxa.health/api/v1/orders/{id}" \
  -H "Authorization: Bearer cxh_SEU_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "status": "string",
  "notes": "string"
}'

Resposta 200

{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "company_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "business_key": "string",
  "status": "string",
  "source_channel": "string",
  "payload": {},
  "created_at": "2026-01-15T10:30:00Z",
  "updated_at": "2026-01-15T10:30:00Z"
}
get/orders/{id}/status

Situação atual do pedido e destinos

Parâmetros

idobrigatóriopathstring (uuid)

Respostas

  • 200 — Status do pedido
curl -X GET "https://api.conexxa.health/api/v1/orders/{id}/status" \
  -H "Authorization: Bearer cxh_SEU_TOKEN"

Resposta 200

{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "status": "string",
  "destinations": [
    {}
  ]
}
get/orders/{id}/events

Timeline de eventos e auditoria

Parâmetros

idobrigatóriopathstring (uuid)

Respostas

  • 200 — Eventos
curl -X GET "https://api.conexxa.health/api/v1/orders/{id}/events" \
  -H "Authorization: Bearer cxh_SEU_TOKEN"

Resposta 200

{
  "data": [
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "type": "string",
      "status": "string",
      "message": "string",
      "created_at": "2026-01-15T10:30:00Z"
    }
  ]
}
post/orders/{id}/reprocess

Solicitar reprocessamento do pedido

Parâmetros

idobrigatóriopathstring (uuid)

Respostas

  • 202 — Reprocessamento aceito
curl -X POST "https://api.conexxa.health/api/v1/orders/{id}/reprocess" \
  -H "Authorization: Bearer cxh_SEU_TOKEN"

Resposta 202

{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "status": "RECEIVED",
  "accepted_at": "2026-01-15T10:30:00Z",
  "location": "string"
}
post/orders/{id}/cancel

Solicitar cancelamento do pedido

Parâmetros

idobrigatóriopathstring (uuid)

Respostas

  • 202 — Cancelamento aceito
curl -X POST "https://api.conexxa.health/api/v1/orders/{id}/cancel" \
  -H "Authorization: Bearer cxh_SEU_TOKEN"

Resposta 202

{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "status": "RECEIVED",
  "accepted_at": "2026-01-15T10:30:00Z",
  "location": "string"
}