Ver .md

pipelines.stage_rules_get

Regras de uma etapa. Campos obrigatórios para entrar (requiredOn, requiredFields com kind standard ou custom), limite de cards (wipOn, wipLimit, wipMode warn ou block), direção permitida (directionOn, direction: any, forward, one_step, terminal) e currentCount.

  • Endpoint: POST https://app.atomiks.com.br/api/v1/pipelines.stage_rules_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: pipelines_stage_rules_get
  • Ficha em JSON: https://app.atomiks.com.br/api/v1/openapi.json (operationId pipelines.stage_rules_get)

Entrada

CampoTipoObrigatórioNota
stageIdstring (uuid)sim
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "stageId": {
      "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)$"
    }
  },
  "required": [
    "stageId"
  ]
}

Exemplo

curl -X POST https://app.atomiks.com.br/api/v1/pipelines.stage_rules_get \
  -H "Authorization: Bearer $ATOMIKS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"stageId":"00000000-0000-0000-0000-000000000000"}'

CLI:

node cli/atomiks.mjs pipelines.stage_rules_get --json '{"stageId":"00000000-0000-0000-0000-000000000000"}'

MCP: ferramenta pipelines_stage_rules_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": {
    "stageId": {
      "type": "string"
    },
    "requiredOn": {
      "type": "boolean"
    },
    "requiredFields": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "standard",
              "custom"
            ]
          },
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          }
        },
        "required": [
          "kind",
          "id"
        ],
        "additionalProperties": false
      }
    },
    "wipOn": {
      "type": "boolean"
    },
    "wipLimit": {
      "type": "number"
    },
    "wipMode": {
      "type": "string",
      "enum": [
        "warn",
        "block"
      ]
    },
    "directionOn": {
      "type": "boolean"
    },
    "direction": {
      "type": "string",
      "enum": [
        "any",
        "forward",
        "one_step",
        "terminal"
      ]
    },
    "currentCount": {
      "type": "number"
    }
  },
  "required": [
    "stageId",
    "requiredOn",
    "requiredFields",
    "wipOn",
    "wipLimit",
    "wipMode",
    "directionOn",
    "direction",
    "currentCount"
  ],
  "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).