Ver .md

crm.availability_get

Disponibilidade de um atendente. Expediente semanal usado em "Horários livres": weekly = {mon..sun: [["09:00","12:00"], ...]} no timezone do atendente, slotMinutes é o passo da grade. configured: false = ainda sem disponibilidade ("Configurar disponibilidade"). userId omitido ou "me" = o chamador.

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

Entrada

CampoTipoObrigatórioNota
userIdstring (uuid) | "me"não
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "userId": {
      "anyOf": [
        {
          "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)$"
        },
        {
          "type": "string",
          "const": "me"
        }
      ]
    }
  }
}

Exemplo

curl -X POST https://app.atomiks.com.br/api/v1/crm.availability_get \
  -H "Authorization: Bearer $ATOMIKS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"userId":"me"}'

CLI:

node cli/atomiks.mjs crm.availability_get --json '{"userId":"me"}'

MCP: ferramenta crm_availability_get com a mesma entrada.

Saída

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

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "userId": {
      "type": "string"
    },
    "configured": {
      "type": "boolean"
    },
    "timezone": {
      "type": "string"
    },
    "slotMinutes": {
      "type": "number"
    },
    "weekly": {
      "type": "object",
      "properties": {
        "mon": {
          "maxItems": 8,
          "type": "array",
          "items": {
            "type": "array",
            "prefixItems": [
              {
                "type": "string"
              },
              {
                "type": "string"
              }
            ],
            "items": false,
            "minItems": 2,
            "maxItems": 2
          }
        },
        "tue": {
          "maxItems": 8,
          "type": "array",
          "items": {
            "type": "array",
            "prefixItems": [
              {
                "type": "string"
              },
              {
                "type": "string"
              }
            ],
            "items": false,
            "minItems": 2,
            "maxItems": 2
          }
        },
        "wed": {
          "maxItems": 8,
          "type": "array",
          "items": {
            "type": "array",
            "prefixItems": [
              {
                "type": "string"
              },
              {
                "type": "string"
              }
            ],
            "items": false,
            "minItems": 2,
            "maxItems": 2
          }
        },
        "thu": {
          "maxItems": 8,
          "type": "array",
          "items": {
            "type": "array",
            "prefixItems": [
              {
                "type": "string"
              },
              {
                "type": "string"
              }
            ],
            "items": false,
            "minItems": 2,
            "maxItems": 2
          }
        },
        "fri": {
          "maxItems": 8,
          "type": "array",
          "items": {
            "type": "array",
            "prefixItems": [
              {
                "type": "string"
              },
              {
                "type": "string"
              }
            ],
            "items": false,
            "minItems": 2,
            "maxItems": 2
          }
        },
        "sat": {
          "maxItems": 8,
          "type": "array",
          "items": {
            "type": "array",
            "prefixItems": [
              {
                "type": "string"
              },
              {
                "type": "string"
              }
            ],
            "items": false,
            "minItems": 2,
            "maxItems": 2
          }
        },
        "sun": {
          "maxItems": 8,
          "type": "array",
          "items": {
            "type": "array",
            "prefixItems": [
              {
                "type": "string"
              },
              {
                "type": "string"
              }
            ],
            "items": false,
            "minItems": 2,
            "maxItems": 2
          }
        }
      },
      "additionalProperties": false
    }
  },
  "required": [
    "userId",
    "configured",
    "timezone",
    "slotMinutes",
    "weekly"
  ],
  "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).