Ver .md

integrations.records

Requisições de uma integração (página). Histórico da integração como no original: entrada lista os eventos recebidos, saída as entregas. Paginado por página (page, perPage), com filtro de status (COMPLETED, PROCESSING, FAILED, DELAYED) e ordem por data. Devolve também a contagem por status (sem o filtro) para os cartões do topo.

  • Endpoint: POST https://app.atomiks.com.br/api/v1/integrations.records (corpo JSON)
  • Quem pode chamar: membro da conta
  • Escopo da chave: automations:read
  • Grava dados: não
  • Pela chave de API: sim
  • Ferramenta MCP: integrations_records
  • Ficha em JSON: https://app.atomiks.com.br/api/v1/openapi.json (operationId integrations.records)

Entrada

CampoTipoObrigatórioNota
integrationIdstring (uuid)sim
status"COMPLETED" | "PROCESSING" | "FAILED" | "DELAYED"não
order"ASC" | "DESC"nãopadrão "DESC"
pageintegernãopadrão 1
perPageintegernãopadrão 10
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "integrationId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "status": {
      "type": "string",
      "enum": [
        "COMPLETED",
        "PROCESSING",
        "FAILED",
        "DELAYED"
      ]
    },
    "order": {
      "default": "DESC",
      "type": "string",
      "enum": [
        "ASC",
        "DESC"
      ]
    },
    "page": {
      "default": 1,
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    },
    "perPage": {
      "default": 10,
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    }
  },
  "required": [
    "integrationId"
  ]
}

Exemplo

curl -X POST https://app.atomiks.com.br/api/v1/integrations.records \
  -H "Authorization: Bearer $ATOMIKS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"integrationId":"00000000-0000-0000-0000-000000000000","order":"DESC","page":1,"perPage":10}'

CLI:

node cli/atomiks.mjs integrations.records --json '{"integrationId":"00000000-0000-0000-0000-000000000000","order":"DESC","page":1,"perPage":10}'

MCP: ferramenta integrations_records com a mesma entrada.

Saída

Sucesso: {"data": ...} com o formato abaixo.

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "in",
        "out"
      ]
    },
    "records": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "trigger": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "COMPLETED",
              "PROCESSING",
              "FAILED",
              "DELAYED"
            ]
          },
          "createdAt": {
            "type": "string"
          },
          "attempts": {
            "type": [
              "number",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "trigger",
          "status",
          "createdAt",
          "attempts"
        ],
        "additionalProperties": false
      }
    },
    "total": {
      "type": "number"
    },
    "countPages": {
      "type": "number"
    },
    "counts": {
      "type": "object",
      "properties": {
        "all": {
          "type": "number"
        },
        "completed": {
          "type": "number"
        },
        "processing": {
          "type": "number"
        },
        "failed": {
          "type": "number"
        },
        "delayed": {
          "type": "number"
        }
      },
      "required": [
        "all",
        "completed",
        "processing",
        "failed",
        "delayed"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "type",
    "records",
    "total",
    "countPages",
    "counts"
  ],
  "additionalProperties": false
}

Erros

{"error": {"code", "message", "requestId"}}. Códigos: invalid_input (400), unauthorized (401), forbidden / account_pending / scope_missing (403), not_found (404), limit_reached (409), internal (500).