{
  "openapi": "3.1.0",
  "info": {
    "title": "Kinology · API pública de parceiros",
    "version": "1.0.0",
    "description": "Contrato público de integração 1.0.0. Dados exclusivamente sintéticos. Disponibilidade de ambiente não confirmada."
  },
  "servers": [
    {
      "url": "https://api.exemplo.invalid"
    }
  ],
  "security": [
    {
      "ApiKey": []
    }
  ],
  "components": {
    "securitySchemes": {
      "ApiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "Credencial emitida pela Kinology."
      }
    },
    "schemas": {
      "Erro": {
        "type": "object",
        "properties": {
          "status": {
            "enum": [
              "fail"
            ]
          },
          "code": {
            "enum": [
              -1
            ]
          },
          "VERSAO_SCHEMA": {
            "enum": [
              "1.0"
            ]
          },
          "CODIGO_ERRO": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "ID_CORRELACAO": {
            "type": "string"
          },
          "ID_REQUISICAO": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "status",
          "code",
          "VERSAO_SCHEMA",
          "CODIGO_ERRO",
          "message",
          "ID_CORRELACAO",
          "ID_REQUISICAO"
        ],
        "additionalProperties": false
      }
    }
  },
  "paths": {
    "/v7/integracoes/contas": {
      "get": {
        "operationId": "contas",
        "summary": "Listar contas",
        "description": "Retorna até 100 concessões e as permissões de cada conta. Use REFERENCIA_CONTA nas próximas chamadas.\nPermissão: API key válida.",
        "tags": [
          "autenticacao"
        ],
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "X-Correlation-ID",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._-]{1,100}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Operação concluída.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "success"
                      ]
                    },
                    "code": {
                      "enum": [
                        0
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "CONTAS": {
                      "type": "array",
                      "maxItems": 100,
                      "items": {
                        "type": "object",
                        "properties": {
                          "REFERENCIA_CONTA": {
                            "type": "string",
                            "pattern": "^cta_[a-f0-9]{32}$"
                          },
                          "PERMISSOES": {
                            "type": "array",
                            "items": {
                              "enum": [
                                "PACIENTES_LER",
                                "PACIENTES_ESCREVER",
                                "RELATORIOS_LER",
                                "RELATORIOS_PDF_LER"
                              ]
                            }
                          }
                        },
                        "required": [
                          "REFERENCIA_CONTA",
                          "PERMISSOES"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO",
                    "CONTAS"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "success",
                  "code": 0,
                  "VERSAO_SCHEMA": "1.0",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111",
                  "CONTAS": [
                    {
                      "REFERENCIA_CONTA": "cta_0123456789abcdef0123456789abcdef",
                      "PERMISSOES": [
                        "PACIENTES_LER",
                        "PACIENTES_ESCREVER",
                        "RELATORIOS_LER",
                        "RELATORIOS_PDF_LER"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Revise campos, filtros, datas e cursor.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "CAMPO_INVALIDO",
                  "message": "Revise campos, filtros, datas e cursor.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "401": {
            "description": "Solicite à Kinology uma credencial válida.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "CREDENCIAL_INVALIDA",
                  "message": "Solicite à Kinology uma credencial válida.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "403": {
            "description": "Confirme a concessão e a permissão da conta.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "PERMISSAO_NEGADA",
                  "message": "Confirme a concessão e a permissão da conta.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "404": {
            "description": "Para ticket expirado ou indisponível, solicite outro PDF.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "ACESSO_INDISPONIVEL",
                  "message": "Para ticket expirado ou indisponível, solicite outro PDF.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "408": {
            "description": "Envie o corpo completo dentro do prazo.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "PRAZO_LEITURA_EXCEDIDO",
                  "message": "Envie o corpo completo dentro do prazo.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "409": {
            "description": "Consulte a versão atual antes de revisar a atualização.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "VERSAO_CONFLITANTE",
                  "message": "Consulte a versão atual antes de revisar a atualização.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "413": {
            "description": "Reduza o corpo ou divida o CSV.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "PAYLOAD_INVALIDO",
                  "message": "Reduza o corpo ou divida o CSV.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "415": {
            "description": "Envie application/json sem compressão.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "FORMATO_NAO_SUPORTADO",
                  "message": "Envie application/json sem compressão.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "422": {
            "description": "Reduza o período ou revise as seções.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "SEM_DADOS_PDF",
                  "message": "Reduza o período ou revise as seções.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "429": {
            "description": "Respeite Retry-After e reduza o paralelismo.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Segundos antes de retentar."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "LIMITE_CONCORRENCIA",
                  "message": "Respeite Retry-After e reduza o paralelismo.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "503": {
            "description": "Respeite Retry-After; repita com espera progressiva e limite de tentativas.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Segundos antes de retentar."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "SERVICO_INDISPONIVEL",
                  "message": "Respeite Retry-After; repita com espera progressiva e limite de tentativas.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          }
        }
      }
    },
    "/v7/integracoes/contas/{CONTA}/pacientes/sincronizar": {
      "post": {
        "operationId": "sincronizar",
        "summary": "Sincronizar paciente",
        "description": "Versão 0 cria (201); versão atual atualiza (200). Omitir campos na atualização preserva os valores. METADADOS.ID_REFERENCIA_EXTERNA é obrigatório em ambas.\nPermissão: PACIENTES_ESCREVER.",
        "tags": [
          "pacientes"
        ],
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "CONTA",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Referência opaca."
          },
          {
            "name": "X-Correlation-ID",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._-]{1,100}$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._-]{8,100}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "VERSAO_REGISTRO": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "USUARIO_NOME": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 200
                  },
                  "USUARIO_NASCIMENTO": {
                    "type": "string",
                    "format": "date",
                    "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                  },
                  "USUARIO_SEXO": {
                    "enum": [
                      "M",
                      "F"
                    ]
                  },
                  "METADADOS": {
                    "type": "object",
                    "properties": {
                      "ID_REFERENCIA_EXTERNA": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100
                      }
                    },
                    "required": [
                      "ID_REFERENCIA_EXTERNA"
                    ],
                    "additionalProperties": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "description": "Outras chaves exigem autorização prévia da Kinology; não são filtros genéricos."
                  }
                },
                "required": [
                  "VERSAO_REGISTRO",
                  "METADADOS"
                ],
                "additionalProperties": false,
                "if": {
                  "properties": {
                    "VERSAO_REGISTRO": {
                      "enum": [
                        0
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "USUARIO_NOME",
                    "USUARIO_NASCIMENTO",
                    "USUARIO_SEXO"
                  ]
                }
              },
              "example": {
                "VERSAO_REGISTRO": 0,
                "USUARIO_NOME": "Paciente Exemplo",
                "USUARIO_NASCIMENTO": "1990-04-15",
                "USUARIO_SEXO": "M",
                "METADADOS": {
                  "ID_REFERENCIA_EXTERNA": "00158"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Operação concluída.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "success"
                      ]
                    },
                    "code": {
                      "enum": [
                        0
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "PACIENTE": {
                      "type": "object",
                      "properties": {
                        "SITUACAO": {
                          "enum": [
                            "CRIADO",
                            "ATUALIZADO"
                          ]
                        },
                        "REFERENCIA_PACIENTE": {
                          "type": "string",
                          "pattern": "^pac_[a-f0-9]{32}$"
                        },
                        "VERSAO_REGISTRO": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "SITUACAO",
                        "REFERENCIA_PACIENTE",
                        "VERSAO_REGISTRO"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO",
                    "PACIENTE"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "success",
                  "code": 0,
                  "VERSAO_SCHEMA": "1.0",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111",
                  "PACIENTE": {
                    "SITUACAO": "CRIADO",
                    "REFERENCIA_PACIENTE": "pac_abcdef0123456789abcdef0123456789",
                    "VERSAO_REGISTRO": 1
                  }
                }
              }
            }
          },
          "201": {
            "description": "Operação concluída.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "success"
                      ]
                    },
                    "code": {
                      "enum": [
                        0
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "PACIENTE": {
                      "type": "object",
                      "properties": {
                        "SITUACAO": {
                          "enum": [
                            "CRIADO",
                            "ATUALIZADO"
                          ]
                        },
                        "REFERENCIA_PACIENTE": {
                          "type": "string",
                          "pattern": "^pac_[a-f0-9]{32}$"
                        },
                        "VERSAO_REGISTRO": {
                          "type": "integer",
                          "minimum": 1
                        }
                      },
                      "required": [
                        "SITUACAO",
                        "REFERENCIA_PACIENTE",
                        "VERSAO_REGISTRO"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO",
                    "PACIENTE"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "success",
                  "code": 0,
                  "VERSAO_SCHEMA": "1.0",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111",
                  "PACIENTE": {
                    "SITUACAO": "CRIADO",
                    "REFERENCIA_PACIENTE": "pac_abcdef0123456789abcdef0123456789",
                    "VERSAO_REGISTRO": 1
                  }
                }
              }
            }
          },
          "400": {
            "description": "Revise campos, filtros, datas e cursor.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "CAMPO_INVALIDO",
                  "message": "Revise campos, filtros, datas e cursor.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "401": {
            "description": "Solicite à Kinology uma credencial válida.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "CREDENCIAL_INVALIDA",
                  "message": "Solicite à Kinology uma credencial válida.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "403": {
            "description": "Confirme a concessão e a permissão da conta.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "PERMISSAO_NEGADA",
                  "message": "Confirme a concessão e a permissão da conta.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "404": {
            "description": "Para ticket expirado ou indisponível, solicite outro PDF.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "ACESSO_INDISPONIVEL",
                  "message": "Para ticket expirado ou indisponível, solicite outro PDF.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "408": {
            "description": "Envie o corpo completo dentro do prazo.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "PRAZO_LEITURA_EXCEDIDO",
                  "message": "Envie o corpo completo dentro do prazo.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "409": {
            "description": "Consulte a versão atual antes de revisar a atualização.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "VERSAO_CONFLITANTE",
                  "message": "Consulte a versão atual antes de revisar a atualização.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "413": {
            "description": "Reduza o corpo ou divida o CSV.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "PAYLOAD_INVALIDO",
                  "message": "Reduza o corpo ou divida o CSV.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "415": {
            "description": "Envie application/json sem compressão.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "FORMATO_NAO_SUPORTADO",
                  "message": "Envie application/json sem compressão.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "422": {
            "description": "Reduza o período ou revise as seções.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "SEM_DADOS_PDF",
                  "message": "Reduza o período ou revise as seções.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "429": {
            "description": "Respeite Retry-After e reduza o paralelismo.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Segundos antes de retentar."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "LIMITE_CONCORRENCIA",
                  "message": "Respeite Retry-After e reduza o paralelismo.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "503": {
            "description": "Respeite Retry-After; repita com espera progressiva e limite de tentativas.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Segundos antes de retentar."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "SERVICO_INDISPONIVEL",
                  "message": "Respeite Retry-After; repita com espera progressiva e limite de tentativas.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          }
        }
      }
    },
    "/v7/integracoes/contas/{CONTA}/pacientes/importar": {
      "post": {
        "operationId": "importar",
        "summary": "Importar CSV",
        "description": "Importação síncrona somente de criação. Até 100 registros, 128 KiB decodificados. HTTP 200 indica lote processado; confira RESULTADOS por linha.\nPermissão: PACIENTES_ESCREVER.",
        "tags": [
          "csv"
        ],
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "CONTA",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Referência opaca."
          },
          {
            "name": "X-Correlation-ID",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._-]{1,100}$"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._-]{8,100}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "CSV_BASE64": {
                    "type": "string",
                    "contentEncoding": "base64"
                  }
                },
                "required": [
                  "CSV_BASE64"
                ],
                "additionalProperties": false
              },
              "example": {
                "CSV_BASE64": "SURfUkVGRVJFTkNJQV9FWFRFUk5BLFVTVUFSSU9fTk9NRSxVU1VBUklPX05BU0NJTUVOVE8sVVNVQVJJT19TRVhPCjAwMTU4LCJBbmEsIEV4ZW1wbG8iLDE5OTAtMDQtMTUsRgo="
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Operação concluída.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "success"
                      ]
                    },
                    "code": {
                      "enum": [
                        0
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "RESUMO": {
                      "type": "object",
                      "properties": {
                        "TOTAL": {
                          "type": "integer"
                        },
                        "CRIADOS": {
                          "type": "integer"
                        },
                        "JA_CADASTRADOS": {
                          "type": "integer"
                        },
                        "REJEITADOS": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "TOTAL",
                        "CRIADOS",
                        "JA_CADASTRADOS",
                        "REJEITADOS"
                      ],
                      "additionalProperties": false
                    },
                    "RESULTADOS": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "LINHA": {
                            "type": "integer"
                          },
                          "ID_REFERENCIA_EXTERNA": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "SITUACAO": {
                            "enum": [
                              "CRIADO",
                              "JA_CADASTRADO",
                              "REJEITADO"
                            ]
                          },
                          "REFERENCIA_PACIENTE": {
                            "type": "string",
                            "pattern": "^pac_[a-f0-9]{32}$"
                          },
                          "VERSAO_REGISTRO": {
                            "type": "integer"
                          },
                          "CODIGO_ERRO": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "LINHA",
                          "ID_REFERENCIA_EXTERNA",
                          "SITUACAO"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO",
                    "RESUMO",
                    "RESULTADOS"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "success",
                  "code": 0,
                  "VERSAO_SCHEMA": "1.0",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111",
                  "RESUMO": {
                    "TOTAL": 2,
                    "CRIADOS": 1,
                    "JA_CADASTRADOS": 0,
                    "REJEITADOS": 1
                  },
                  "RESULTADOS": [
                    {
                      "LINHA": 2,
                      "ID_REFERENCIA_EXTERNA": "00158",
                      "SITUACAO": "CRIADO",
                      "REFERENCIA_PACIENTE": "pac_abcdef0123456789abcdef0123456789",
                      "VERSAO_REGISTRO": 1
                    },
                    {
                      "LINHA": 3,
                      "ID_REFERENCIA_EXTERNA": "00159",
                      "SITUACAO": "REJEITADO",
                      "CODIGO_ERRO": "DATA_INVALIDA"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Revise campos, filtros, datas e cursor.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "CAMPO_INVALIDO",
                  "message": "Revise campos, filtros, datas e cursor.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "401": {
            "description": "Solicite à Kinology uma credencial válida.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "CREDENCIAL_INVALIDA",
                  "message": "Solicite à Kinology uma credencial válida.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "403": {
            "description": "Confirme a concessão e a permissão da conta.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "PERMISSAO_NEGADA",
                  "message": "Confirme a concessão e a permissão da conta.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "404": {
            "description": "Para ticket expirado ou indisponível, solicite outro PDF.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "ACESSO_INDISPONIVEL",
                  "message": "Para ticket expirado ou indisponível, solicite outro PDF.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "408": {
            "description": "Envie o corpo completo dentro do prazo.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "PRAZO_LEITURA_EXCEDIDO",
                  "message": "Envie o corpo completo dentro do prazo.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "409": {
            "description": "Consulte a versão atual antes de revisar a atualização.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "VERSAO_CONFLITANTE",
                  "message": "Consulte a versão atual antes de revisar a atualização.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "413": {
            "description": "Reduza o corpo ou divida o CSV.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "PAYLOAD_INVALIDO",
                  "message": "Reduza o corpo ou divida o CSV.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "415": {
            "description": "Envie application/json sem compressão.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "FORMATO_NAO_SUPORTADO",
                  "message": "Envie application/json sem compressão.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "422": {
            "description": "Reduza o período ou revise as seções.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "SEM_DADOS_PDF",
                  "message": "Reduza o período ou revise as seções.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "429": {
            "description": "Respeite Retry-After e reduza o paralelismo.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Segundos antes de retentar."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "LIMITE_CONCORRENCIA",
                  "message": "Respeite Retry-After e reduza o paralelismo.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "503": {
            "description": "Respeite Retry-After; repita com espera progressiva e limite de tentativas.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Segundos antes de retentar."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "SERVICO_INDISPONIVEL",
                  "message": "Respeite Retry-After; repita com espera progressiva e limite de tentativas.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          }
        }
      }
    },
    "/v7/integracoes/contas/{CONTA}/pacientes/importar/modelo": {
      "get": {
        "operationId": "modelo",
        "summary": "Baixar modelo CSV",
        "description": "Arquivo text/csv UTF-8 com as quatro colunas obrigatórias.\nPermissão: PACIENTES_ESCREVER.",
        "tags": [
          "csv"
        ],
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "CONTA",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Referência opaca."
          },
          {
            "name": "X-Correlation-ID",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._-]{1,100}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Operação concluída.",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                },
                "example": "ID_REFERENCIA_EXTERNA,USUARIO_NOME,USUARIO_NASCIMENTO,USUARIO_SEXO\n00158,\"Ana, Exemplo\",1990-04-15,F\n"
              }
            }
          },
          "400": {
            "description": "Revise campos, filtros, datas e cursor.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "CAMPO_INVALIDO",
                  "message": "Revise campos, filtros, datas e cursor.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "401": {
            "description": "Solicite à Kinology uma credencial válida.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "CREDENCIAL_INVALIDA",
                  "message": "Solicite à Kinology uma credencial válida.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "403": {
            "description": "Confirme a concessão e a permissão da conta.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "PERMISSAO_NEGADA",
                  "message": "Confirme a concessão e a permissão da conta.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "404": {
            "description": "Para ticket expirado ou indisponível, solicite outro PDF.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "ACESSO_INDISPONIVEL",
                  "message": "Para ticket expirado ou indisponível, solicite outro PDF.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "408": {
            "description": "Envie o corpo completo dentro do prazo.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "PRAZO_LEITURA_EXCEDIDO",
                  "message": "Envie o corpo completo dentro do prazo.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "409": {
            "description": "Consulte a versão atual antes de revisar a atualização.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "VERSAO_CONFLITANTE",
                  "message": "Consulte a versão atual antes de revisar a atualização.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "413": {
            "description": "Reduza o corpo ou divida o CSV.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "PAYLOAD_INVALIDO",
                  "message": "Reduza o corpo ou divida o CSV.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "415": {
            "description": "Envie application/json sem compressão.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "FORMATO_NAO_SUPORTADO",
                  "message": "Envie application/json sem compressão.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "422": {
            "description": "Reduza o período ou revise as seções.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "SEM_DADOS_PDF",
                  "message": "Reduza o período ou revise as seções.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "429": {
            "description": "Respeite Retry-After e reduza o paralelismo.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Segundos antes de retentar."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "LIMITE_CONCORRENCIA",
                  "message": "Respeite Retry-After e reduza o paralelismo.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "503": {
            "description": "Respeite Retry-After; repita com espera progressiva e limite de tentativas.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Segundos antes de retentar."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "SERVICO_INDISPONIVEL",
                  "message": "Respeite Retry-After; repita com espera progressiva e limite de tentativas.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          }
        }
      }
    },
    "/v7/integracoes/contas/{CONTA}/pacientes/referencia_externa/{EXTERNA}": {
      "get": {
        "operationId": "referencia-externa",
        "summary": "Consultar por código externo",
        "description": "Comparação exata e sensível à caixa. Preserve zeros iniciais e use encodeURIComponent no segmento EXTERNA.\nPermissão: PACIENTES_LER.",
        "tags": [
          "pacientes"
        ],
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "CONTA",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Referência opaca."
          },
          {
            "name": "EXTERNA",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "String exata; preserve zeros e aplique percent-encoding."
          },
          {
            "name": "X-Correlation-ID",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._-]{1,100}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Operação concluída.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "success"
                      ]
                    },
                    "code": {
                      "enum": [
                        0
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "PACIENTE": {
                      "type": "object",
                      "properties": {
                        "REFERENCIA_PACIENTE": {
                          "type": "string",
                          "pattern": "^pac_[a-f0-9]{32}$"
                        },
                        "VERSAO_REGISTRO": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "USUARIO_NOME": {
                          "type": "string"
                        },
                        "USUARIO_NASCIMENTO": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date"
                        },
                        "USUARIO_SEXO": {
                          "enum": [
                            "M",
                            "F",
                            null
                          ]
                        },
                        "METADADOS": {
                          "type": "object",
                          "properties": {
                            "ID_REFERENCIA_EXTERNA": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            }
                          },
                          "required": [
                            "ID_REFERENCIA_EXTERNA"
                          ],
                          "additionalProperties": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "description": "Outras chaves exigem autorização prévia da Kinology; não são filtros genéricos."
                        },
                        "CRIADO_EM": {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "Z$"
                        },
                        "ATUALIZADO_EM": {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "Z$"
                        }
                      },
                      "required": [
                        "REFERENCIA_PACIENTE",
                        "VERSAO_REGISTRO",
                        "USUARIO_NOME",
                        "USUARIO_NASCIMENTO",
                        "USUARIO_SEXO",
                        "METADADOS",
                        "CRIADO_EM",
                        "ATUALIZADO_EM"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO",
                    "PACIENTE"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "success",
                  "code": 0,
                  "VERSAO_SCHEMA": "1.0",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111",
                  "PACIENTE": {
                    "REFERENCIA_PACIENTE": "pac_abcdef0123456789abcdef0123456789",
                    "VERSAO_REGISTRO": 1,
                    "USUARIO_NOME": "Paciente Exemplo",
                    "USUARIO_NASCIMENTO": "1990-04-15",
                    "USUARIO_SEXO": "M",
                    "METADADOS": {
                      "ID_REFERENCIA_EXTERNA": "00158"
                    },
                    "CRIADO_EM": "2026-11-18T12:00:00.000Z",
                    "ATUALIZADO_EM": "2026-11-18T12:00:00.000Z"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Revise campos, filtros, datas e cursor.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "CAMPO_INVALIDO",
                  "message": "Revise campos, filtros, datas e cursor.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "401": {
            "description": "Solicite à Kinology uma credencial válida.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "CREDENCIAL_INVALIDA",
                  "message": "Solicite à Kinology uma credencial válida.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "403": {
            "description": "Confirme a concessão e a permissão da conta.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "PERMISSAO_NEGADA",
                  "message": "Confirme a concessão e a permissão da conta.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "404": {
            "description": "Para ticket expirado ou indisponível, solicite outro PDF.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "ACESSO_INDISPONIVEL",
                  "message": "Para ticket expirado ou indisponível, solicite outro PDF.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "408": {
            "description": "Envie o corpo completo dentro do prazo.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "PRAZO_LEITURA_EXCEDIDO",
                  "message": "Envie o corpo completo dentro do prazo.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "409": {
            "description": "Consulte a versão atual antes de revisar a atualização.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "VERSAO_CONFLITANTE",
                  "message": "Consulte a versão atual antes de revisar a atualização.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "413": {
            "description": "Reduza o corpo ou divida o CSV.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "PAYLOAD_INVALIDO",
                  "message": "Reduza o corpo ou divida o CSV.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "415": {
            "description": "Envie application/json sem compressão.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "FORMATO_NAO_SUPORTADO",
                  "message": "Envie application/json sem compressão.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "422": {
            "description": "Reduza o período ou revise as seções.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "SEM_DADOS_PDF",
                  "message": "Reduza o período ou revise as seções.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "429": {
            "description": "Respeite Retry-After e reduza o paralelismo.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Segundos antes de retentar."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "LIMITE_CONCORRENCIA",
                  "message": "Respeite Retry-After e reduza o paralelismo.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "503": {
            "description": "Respeite Retry-After; repita com espera progressiva e limite de tentativas.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Segundos antes de retentar."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "SERVICO_INDISPONIVEL",
                  "message": "Respeite Retry-After; repita com espera progressiva e limite de tentativas.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          }
        }
      }
    },
    "/v7/integracoes/contas/{CONTA}/pacientes/{PACIENTE}": {
      "get": {
        "operationId": "paciente",
        "summary": "Consultar por referência pública",
        "description": "REFERENCIA_PACIENTE é opaca. Conhecê-la não concede acesso ao registro.\nPermissão: PACIENTES_LER.",
        "tags": [
          "pacientes"
        ],
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "CONTA",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Referência opaca."
          },
          {
            "name": "PACIENTE",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Referência opaca."
          },
          {
            "name": "X-Correlation-ID",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._-]{1,100}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Operação concluída.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "success"
                      ]
                    },
                    "code": {
                      "enum": [
                        0
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "PACIENTE": {
                      "type": "object",
                      "properties": {
                        "REFERENCIA_PACIENTE": {
                          "type": "string",
                          "pattern": "^pac_[a-f0-9]{32}$"
                        },
                        "VERSAO_REGISTRO": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "USUARIO_NOME": {
                          "type": "string"
                        },
                        "USUARIO_NASCIMENTO": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "date"
                        },
                        "USUARIO_SEXO": {
                          "enum": [
                            "M",
                            "F",
                            null
                          ]
                        },
                        "METADADOS": {
                          "type": "object",
                          "properties": {
                            "ID_REFERENCIA_EXTERNA": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            }
                          },
                          "required": [
                            "ID_REFERENCIA_EXTERNA"
                          ],
                          "additionalProperties": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 200
                          },
                          "description": "Outras chaves exigem autorização prévia da Kinology; não são filtros genéricos."
                        },
                        "CRIADO_EM": {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "Z$"
                        },
                        "ATUALIZADO_EM": {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "Z$"
                        }
                      },
                      "required": [
                        "REFERENCIA_PACIENTE",
                        "VERSAO_REGISTRO",
                        "USUARIO_NOME",
                        "USUARIO_NASCIMENTO",
                        "USUARIO_SEXO",
                        "METADADOS",
                        "CRIADO_EM",
                        "ATUALIZADO_EM"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO",
                    "PACIENTE"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "success",
                  "code": 0,
                  "VERSAO_SCHEMA": "1.0",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111",
                  "PACIENTE": {
                    "REFERENCIA_PACIENTE": "pac_abcdef0123456789abcdef0123456789",
                    "VERSAO_REGISTRO": 1,
                    "USUARIO_NOME": "Paciente Exemplo",
                    "USUARIO_NASCIMENTO": "1990-04-15",
                    "USUARIO_SEXO": "M",
                    "METADADOS": {
                      "ID_REFERENCIA_EXTERNA": "00158"
                    },
                    "CRIADO_EM": "2026-11-18T12:00:00.000Z",
                    "ATUALIZADO_EM": "2026-11-18T12:00:00.000Z"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Revise campos, filtros, datas e cursor.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "CAMPO_INVALIDO",
                  "message": "Revise campos, filtros, datas e cursor.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "401": {
            "description": "Solicite à Kinology uma credencial válida.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "CREDENCIAL_INVALIDA",
                  "message": "Solicite à Kinology uma credencial válida.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "403": {
            "description": "Confirme a concessão e a permissão da conta.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "PERMISSAO_NEGADA",
                  "message": "Confirme a concessão e a permissão da conta.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "404": {
            "description": "Para ticket expirado ou indisponível, solicite outro PDF.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "ACESSO_INDISPONIVEL",
                  "message": "Para ticket expirado ou indisponível, solicite outro PDF.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "408": {
            "description": "Envie o corpo completo dentro do prazo.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "PRAZO_LEITURA_EXCEDIDO",
                  "message": "Envie o corpo completo dentro do prazo.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "409": {
            "description": "Consulte a versão atual antes de revisar a atualização.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "VERSAO_CONFLITANTE",
                  "message": "Consulte a versão atual antes de revisar a atualização.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "413": {
            "description": "Reduza o corpo ou divida o CSV.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "PAYLOAD_INVALIDO",
                  "message": "Reduza o corpo ou divida o CSV.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "415": {
            "description": "Envie application/json sem compressão.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "FORMATO_NAO_SUPORTADO",
                  "message": "Envie application/json sem compressão.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "422": {
            "description": "Reduza o período ou revise as seções.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "SEM_DADOS_PDF",
                  "message": "Reduza o período ou revise as seções.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "429": {
            "description": "Respeite Retry-After e reduza o paralelismo.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Segundos antes de retentar."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "LIMITE_CONCORRENCIA",
                  "message": "Respeite Retry-After e reduza o paralelismo.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "503": {
            "description": "Respeite Retry-After; repita com espera progressiva e limite de tentativas.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Segundos antes de retentar."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "SERVICO_INDISPONIVEL",
                  "message": "Respeite Retry-After; repita com espera progressiva e limite de tentativas.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          }
        }
      }
    },
    "/v7/integracoes/contas/{CONTA}/pacientes/buscar": {
      "post": {
        "operationId": "buscar",
        "summary": "Buscar pacientes",
        "description": "Filtros combinados por E. Instantes UTC: início inclusivo e fim exclusivo. LIMITE padrão 20, máximo 100. Reinicie o cursor ao trocar conta ou filtros.\nPermissão: PACIENTES_LER.",
        "tags": [
          "paginacao"
        ],
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "CONTA",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Referência opaca."
          },
          {
            "name": "X-Correlation-ID",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._-]{1,100}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "FILTROS": {
                    "type": "object",
                    "properties": {
                      "ID_REFERENCIA_EXTERNA": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 100
                      },
                      "CRIADO_EM_DE": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "Z$"
                      },
                      "CRIADO_EM_ATE": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "Z$"
                      },
                      "ATUALIZADO_EM_DE": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "Z$"
                      },
                      "ATUALIZADO_EM_ATE": {
                        "type": "string",
                        "format": "date-time",
                        "pattern": "Z$"
                      }
                    },
                    "required": [],
                    "additionalProperties": false
                  },
                  "PAGINACAO": {
                    "type": "object",
                    "properties": {
                      "LIMITE": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 100
                      },
                      "CURSOR": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 3000
                      }
                    },
                    "required": [],
                    "additionalProperties": false
                  }
                },
                "required": [],
                "additionalProperties": false
              },
              "example": {
                "FILTROS": {
                  "ATUALIZADO_EM_DE": "2026-11-01T00:00:00Z",
                  "ATUALIZADO_EM_ATE": "2026-12-01T00:00:00Z"
                },
                "PAGINACAO": {
                  "LIMITE": 20,
                  "CURSOR": null
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Operação concluída.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "success"
                      ]
                    },
                    "code": {
                      "enum": [
                        0
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "PACIENTES": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "REFERENCIA_PACIENTE": {
                            "type": "string",
                            "pattern": "^pac_[a-f0-9]{32}$"
                          },
                          "VERSAO_REGISTRO": {
                            "type": "integer",
                            "minimum": 1
                          },
                          "USUARIO_NOME": {
                            "type": "string"
                          },
                          "USUARIO_NASCIMENTO": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "format": "date"
                          },
                          "USUARIO_SEXO": {
                            "enum": [
                              "M",
                              "F",
                              null
                            ]
                          },
                          "METADADOS": {
                            "type": "object",
                            "properties": {
                              "ID_REFERENCIA_EXTERNA": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 100
                              }
                            },
                            "required": [
                              "ID_REFERENCIA_EXTERNA"
                            ],
                            "additionalProperties": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 200
                            },
                            "description": "Outras chaves exigem autorização prévia da Kinology; não são filtros genéricos."
                          },
                          "CRIADO_EM": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "Z$"
                          },
                          "ATUALIZADO_EM": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "Z$"
                          }
                        },
                        "required": [
                          "REFERENCIA_PACIENTE",
                          "VERSAO_REGISTRO",
                          "USUARIO_NOME",
                          "USUARIO_NASCIMENTO",
                          "USUARIO_SEXO",
                          "METADADOS",
                          "CRIADO_EM",
                          "ATUALIZADO_EM"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "PAGINACAO": {
                      "type": "object",
                      "properties": {
                        "PROXIMO_CURSOR": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "TEM_MAIS": {
                          "enum": [
                            "S",
                            "N"
                          ]
                        }
                      },
                      "required": [
                        "PROXIMO_CURSOR",
                        "TEM_MAIS"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO",
                    "PACIENTES",
                    "PAGINACAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "success",
                  "code": 0,
                  "VERSAO_SCHEMA": "1.0",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111",
                  "PACIENTES": [
                    {
                      "REFERENCIA_PACIENTE": "pac_abcdef0123456789abcdef0123456789",
                      "VERSAO_REGISTRO": 1,
                      "USUARIO_NOME": "Paciente Exemplo",
                      "USUARIO_NASCIMENTO": "1990-04-15",
                      "USUARIO_SEXO": "M",
                      "METADADOS": {
                        "ID_REFERENCIA_EXTERNA": "00158"
                      },
                      "CRIADO_EM": "2026-11-18T12:00:00.000Z",
                      "ATUALIZADO_EM": "2026-11-18T12:00:00.000Z"
                    }
                  ],
                  "PAGINACAO": {
                    "PROXIMO_CURSOR": null,
                    "TEM_MAIS": "N"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Revise campos, filtros, datas e cursor.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "CAMPO_INVALIDO",
                  "message": "Revise campos, filtros, datas e cursor.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "401": {
            "description": "Solicite à Kinology uma credencial válida.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "CREDENCIAL_INVALIDA",
                  "message": "Solicite à Kinology uma credencial válida.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "403": {
            "description": "Confirme a concessão e a permissão da conta.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "PERMISSAO_NEGADA",
                  "message": "Confirme a concessão e a permissão da conta.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "404": {
            "description": "Para ticket expirado ou indisponível, solicite outro PDF.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "ACESSO_INDISPONIVEL",
                  "message": "Para ticket expirado ou indisponível, solicite outro PDF.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "408": {
            "description": "Envie o corpo completo dentro do prazo.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "PRAZO_LEITURA_EXCEDIDO",
                  "message": "Envie o corpo completo dentro do prazo.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "409": {
            "description": "Consulte a versão atual antes de revisar a atualização.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "VERSAO_CONFLITANTE",
                  "message": "Consulte a versão atual antes de revisar a atualização.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "413": {
            "description": "Reduza o corpo ou divida o CSV.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "PAYLOAD_INVALIDO",
                  "message": "Reduza o corpo ou divida o CSV.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "415": {
            "description": "Envie application/json sem compressão.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "FORMATO_NAO_SUPORTADO",
                  "message": "Envie application/json sem compressão.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "422": {
            "description": "Reduza o período ou revise as seções.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "SEM_DADOS_PDF",
                  "message": "Reduza o período ou revise as seções.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "429": {
            "description": "Respeite Retry-After e reduza o paralelismo.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Segundos antes de retentar."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "LIMITE_CONCORRENCIA",
                  "message": "Respeite Retry-After e reduza o paralelismo.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "503": {
            "description": "Respeite Retry-After; repita com espera progressiva e limite de tentativas.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Segundos antes de retentar."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "SERVICO_INDISPONIVEL",
                  "message": "Respeite Retry-After; repita com espera progressiva e limite de tentativas.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          }
        }
      }
    },
    "/v7/integracoes/contas/{CONTA}/relatorios/catalogo": {
      "get": {
        "operationId": "catalogo",
        "summary": "Consultar catálogo",
        "description": "Códigos de seções e política de validade. FORMATOS depende da concessão RELATORIOS_PDF_LER.\nPermissão: RELATORIOS_LER.",
        "tags": [
          "pdf"
        ],
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "CONTA",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Referência opaca."
          },
          {
            "name": "X-Correlation-ID",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._-]{1,100}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Operação concluída.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "success"
                      ]
                    },
                    "code": {
                      "enum": [
                        0
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "SECOES": {
                      "type": "array",
                      "items": {
                        "enum": [
                          "TRIAGEM",
                          "ANAMNESE",
                          "ATENDIMENTO",
                          "PREENSAO_PALMAR",
                          "ASSIMETRIA",
                          "EQUILIBRIO_MUSCULAR",
                          "EVA",
                          "SF_36",
                          "PROGRESSAO_FORCA",
                          "CURVAS_FORCA"
                        ]
                      }
                    },
                    "FORMATOS": {
                      "type": "array",
                      "items": {
                        "enum": [
                          "PDF"
                        ]
                      }
                    },
                    "IMPORTACAO": {
                      "type": "object",
                      "properties": {
                        "MAXIMO_LINHAS": {
                          "type": "integer"
                        },
                        "MAXIMO_BYTES": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "MAXIMO_LINHAS",
                        "MAXIMO_BYTES"
                      ],
                      "additionalProperties": false
                    },
                    "PDF": {
                      "type": "object",
                      "properties": {
                        "TTL_PADRAO_SEGUNDOS": {
                          "type": "integer"
                        },
                        "TTL_MAXIMO_SEGUNDOS": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "TTL_PADRAO_SEGUNDOS",
                        "TTL_MAXIMO_SEGUNDOS"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO",
                    "SECOES",
                    "FORMATOS",
                    "IMPORTACAO",
                    "PDF"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "success",
                  "code": 0,
                  "VERSAO_SCHEMA": "1.0",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111",
                  "SECOES": [
                    "TRIAGEM",
                    "ANAMNESE",
                    "ATENDIMENTO",
                    "PREENSAO_PALMAR",
                    "ASSIMETRIA",
                    "EQUILIBRIO_MUSCULAR",
                    "EVA",
                    "SF_36",
                    "PROGRESSAO_FORCA",
                    "CURVAS_FORCA"
                  ],
                  "FORMATOS": [
                    "PDF"
                  ],
                  "IMPORTACAO": {
                    "MAXIMO_LINHAS": 100,
                    "MAXIMO_BYTES": 131072
                  },
                  "PDF": {
                    "TTL_PADRAO_SEGUNDOS": 604800,
                    "TTL_MAXIMO_SEGUNDOS": 604800
                  }
                }
              }
            }
          },
          "400": {
            "description": "Revise campos, filtros, datas e cursor.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "CAMPO_INVALIDO",
                  "message": "Revise campos, filtros, datas e cursor.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "401": {
            "description": "Solicite à Kinology uma credencial válida.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "CREDENCIAL_INVALIDA",
                  "message": "Solicite à Kinology uma credencial válida.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "403": {
            "description": "Confirme a concessão e a permissão da conta.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "PERMISSAO_NEGADA",
                  "message": "Confirme a concessão e a permissão da conta.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "404": {
            "description": "Para ticket expirado ou indisponível, solicite outro PDF.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "ACESSO_INDISPONIVEL",
                  "message": "Para ticket expirado ou indisponível, solicite outro PDF.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "408": {
            "description": "Envie o corpo completo dentro do prazo.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "PRAZO_LEITURA_EXCEDIDO",
                  "message": "Envie o corpo completo dentro do prazo.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "409": {
            "description": "Consulte a versão atual antes de revisar a atualização.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "VERSAO_CONFLITANTE",
                  "message": "Consulte a versão atual antes de revisar a atualização.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "413": {
            "description": "Reduza o corpo ou divida o CSV.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "PAYLOAD_INVALIDO",
                  "message": "Reduza o corpo ou divida o CSV.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "415": {
            "description": "Envie application/json sem compressão.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "FORMATO_NAO_SUPORTADO",
                  "message": "Envie application/json sem compressão.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "422": {
            "description": "Reduza o período ou revise as seções.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "SEM_DADOS_PDF",
                  "message": "Reduza o período ou revise as seções.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "429": {
            "description": "Respeite Retry-After e reduza o paralelismo.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Segundos antes de retentar."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "LIMITE_CONCORRENCIA",
                  "message": "Respeite Retry-After e reduza o paralelismo.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "503": {
            "description": "Respeite Retry-After; repita com espera progressiva e limite de tentativas.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Segundos antes de retentar."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "SERVICO_INDISPONIVEL",
                  "message": "Respeite Retry-After; repita com espera progressiva e limite de tentativas.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          }
        }
      }
    },
    "/v7/integracoes/contas/{CONTA}/pacientes/referencia_externa/{EXTERNA}/relatorios/datas": {
      "get": {
        "operationId": "datas",
        "summary": "Consultar datas clínicas",
        "description": "As 20 datas mais recentes, em ordem decrescente. DATA_DE e DATA_ATE inclusivas. DATAS vazio indica ausência de dados na projeção atual; sua atualização pode ter atraso.\nPermissão: RELATORIOS_LER.",
        "tags": [
          "pdf"
        ],
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "CONTA",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Referência opaca."
          },
          {
            "name": "EXTERNA",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "String exata; preserve zeros e aplique percent-encoding."
          },
          {
            "name": "DATA_DE",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "DATA_ATE",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "CURSOR",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Correlation-ID",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._-]{1,100}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Operação concluída.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "success"
                      ]
                    },
                    "code": {
                      "enum": [
                        0
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "DATAS": {
                      "type": "array",
                      "maxItems": 20,
                      "items": {
                        "type": "object",
                        "properties": {
                          "DATA": {
                            "type": "string",
                            "format": "date",
                            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                          },
                          "SECOES_DISPONIVEIS": {
                            "type": "array",
                            "items": {
                              "enum": [
                                "TRIAGEM",
                                "ANAMNESE",
                                "ATENDIMENTO",
                                "PREENSAO_PALMAR",
                                "ASSIMETRIA",
                                "EQUILIBRIO_MUSCULAR",
                                "EVA",
                                "SF_36",
                                "PROGRESSAO_FORCA",
                                "CURVAS_FORCA"
                              ]
                            }
                          }
                        },
                        "required": [
                          "DATA",
                          "SECOES_DISPONIVEIS"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "PROXIMO_CURSOR": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO",
                    "DATAS",
                    "PROXIMO_CURSOR"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "success",
                  "code": 0,
                  "VERSAO_SCHEMA": "1.0",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111",
                  "DATAS": [
                    {
                      "DATA": "2026-11-18",
                      "SECOES_DISPONIVEIS": [
                        "ANAMNESE",
                        "EVA"
                      ]
                    }
                  ],
                  "PROXIMO_CURSOR": null
                }
              }
            }
          },
          "400": {
            "description": "Revise campos, filtros, datas e cursor.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "CAMPO_INVALIDO",
                  "message": "Revise campos, filtros, datas e cursor.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "401": {
            "description": "Solicite à Kinology uma credencial válida.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "CREDENCIAL_INVALIDA",
                  "message": "Solicite à Kinology uma credencial válida.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "403": {
            "description": "Confirme a concessão e a permissão da conta.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "PERMISSAO_NEGADA",
                  "message": "Confirme a concessão e a permissão da conta.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "404": {
            "description": "Para ticket expirado ou indisponível, solicite outro PDF.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "ACESSO_INDISPONIVEL",
                  "message": "Para ticket expirado ou indisponível, solicite outro PDF.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "408": {
            "description": "Envie o corpo completo dentro do prazo.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "PRAZO_LEITURA_EXCEDIDO",
                  "message": "Envie o corpo completo dentro do prazo.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "409": {
            "description": "Consulte a versão atual antes de revisar a atualização.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "VERSAO_CONFLITANTE",
                  "message": "Consulte a versão atual antes de revisar a atualização.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "413": {
            "description": "Reduza o corpo ou divida o CSV.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "PAYLOAD_INVALIDO",
                  "message": "Reduza o corpo ou divida o CSV.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "415": {
            "description": "Envie application/json sem compressão.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "FORMATO_NAO_SUPORTADO",
                  "message": "Envie application/json sem compressão.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "422": {
            "description": "Reduza o período ou revise as seções.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "SEM_DADOS_PDF",
                  "message": "Reduza o período ou revise as seções.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "429": {
            "description": "Respeite Retry-After e reduza o paralelismo.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Segundos antes de retentar."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "LIMITE_CONCORRENCIA",
                  "message": "Respeite Retry-After e reduza o paralelismo.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "503": {
            "description": "Respeite Retry-After; repita com espera progressiva e limite de tentativas.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Segundos antes de retentar."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "SERVICO_INDISPONIVEL",
                  "message": "Respeite Retry-After; repita com espera progressiva e limite de tentativas.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          }
        }
      }
    },
    "/v7/integracoes/contas/{CONTA}/pacientes/referencia_externa/{EXTERNA}/relatorios/pdf": {
      "post": {
        "operationId": "solicitar-pdf",
        "summary": "Solicitar PDF",
        "description": "Período de até 31 dias inclusivos e seções válidas sem duplicatas. 409 PDF_EM_GERACAO indica pedido pendente: retente o mesmo pedido com espera limitada. Gera ou reaproveita PDF equivalente. EXPIRA_EM é a fonte de verdade: até sete dias, podendo vencer antes.\nPermissão: RELATORIOS_PDF_LER.",
        "tags": [
          "pdf"
        ],
        "security": [
          {
            "ApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "CONTA",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Referência opaca."
          },
          {
            "name": "EXTERNA",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "String exata; preserve zeros e aplique percent-encoding."
          },
          {
            "name": "X-Correlation-ID",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._-]{1,100}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "PERIODO": {
                    "type": "object",
                    "properties": {
                      "INICIO": {
                        "type": "string",
                        "format": "date",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      },
                      "FIM": {
                        "type": "string",
                        "format": "date",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                      }
                    },
                    "required": [
                      "INICIO",
                      "FIM"
                    ],
                    "additionalProperties": false,
                    "description": "Início e fim inclusivos; até 31 dias."
                  },
                  "SECOES": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "TRIAGEM",
                        "ANAMNESE",
                        "ATENDIMENTO",
                        "PREENSAO_PALMAR",
                        "ASSIMETRIA",
                        "EQUILIBRIO_MUSCULAR",
                        "EVA",
                        "SF_36",
                        "PROGRESSAO_FORCA",
                        "CURVAS_FORCA"
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 10,
                    "uniqueItems": true
                  }
                },
                "required": [
                  "PERIODO",
                  "SECOES"
                ],
                "additionalProperties": false
              },
              "example": {
                "PERIODO": {
                  "INICIO": "2026-11-18",
                  "FIM": "2026-11-18"
                },
                "SECOES": [
                  "ANAMNESE",
                  "EVA"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Operação concluída.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "success"
                      ]
                    },
                    "code": {
                      "enum": [
                        0
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "REFERENCIA_RELATORIO": {
                      "type": "string",
                      "pattern": "^pdf_[a-f0-9]{32}$"
                    },
                    "URL_PDF": {
                      "type": "string",
                      "format": "uri"
                    },
                    "EXPIRA_EM": {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "Z$"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO",
                    "REFERENCIA_RELATORIO",
                    "URL_PDF",
                    "EXPIRA_EM"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "success",
                  "code": 0,
                  "VERSAO_SCHEMA": "1.0",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111",
                  "REFERENCIA_RELATORIO": "pdf_0123456789abcdef0123456789abcdef",
                  "URL_PDF": "https://api.exemplo.invalid/v7/integracoes/documentos/acesso/solicitado/TICKET_SINTETICO_NAO_UTILIZAVEL",
                  "EXPIRA_EM": "2026-11-25T12:00:00.000Z"
                }
              }
            }
          },
          "400": {
            "description": "Revise campos, filtros, datas e cursor.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "CAMPO_INVALIDO",
                  "message": "Revise campos, filtros, datas e cursor.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "401": {
            "description": "Solicite à Kinology uma credencial válida.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "CREDENCIAL_INVALIDA",
                  "message": "Solicite à Kinology uma credencial válida.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "403": {
            "description": "Confirme a concessão e a permissão da conta.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "PERMISSAO_NEGADA",
                  "message": "Confirme a concessão e a permissão da conta.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "404": {
            "description": "Para ticket expirado ou indisponível, solicite outro PDF.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "ACESSO_INDISPONIVEL",
                  "message": "Para ticket expirado ou indisponível, solicite outro PDF.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "408": {
            "description": "Envie o corpo completo dentro do prazo.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "PRAZO_LEITURA_EXCEDIDO",
                  "message": "Envie o corpo completo dentro do prazo.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "409": {
            "description": "Consulte a versão atual antes de revisar a atualização.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "VERSAO_CONFLITANTE",
                  "message": "Consulte a versão atual antes de revisar a atualização.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "413": {
            "description": "Reduza o corpo ou divida o CSV.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "PAYLOAD_INVALIDO",
                  "message": "Reduza o corpo ou divida o CSV.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "415": {
            "description": "Envie application/json sem compressão.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "FORMATO_NAO_SUPORTADO",
                  "message": "Envie application/json sem compressão.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "422": {
            "description": "Reduza o período ou revise as seções.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "SEM_DADOS_PDF",
                  "message": "Reduza o período ou revise as seções.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "429": {
            "description": "Respeite Retry-After e reduza o paralelismo.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Segundos antes de retentar."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "LIMITE_CONCORRENCIA",
                  "message": "Respeite Retry-After e reduza o paralelismo.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "503": {
            "description": "Respeite Retry-After; repita com espera progressiva e limite de tentativas.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Segundos antes de retentar."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "SERVICO_INDISPONIVEL",
                  "message": "Respeite Retry-After; repita com espera progressiva e limite de tentativas.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          }
        }
      }
    },
    "/v7/integracoes/documentos/acesso/solicitado/{TOKEN}": {
      "get": {
        "operationId": "resgatar-pdf",
        "summary": "Abrir link temporário",
        "description": "Abra URL_PDF diretamente e permita redirecionamentos. Sem Bearer. Retorna 302, Cache-Control: private, no-store e Referrer-Policy: no-referrer. Ticket é segredo temporário; mantenha fora de logs, analytics e armazenamento persistente.\nPermissão: Ticket válido e escopo revalidado.",
        "tags": [
          "pdf"
        ],
        "security": [],
        "parameters": [
          {
            "name": "TOKEN",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Referência opaca."
          }
        ],
        "responses": {
          "302": {
            "description": "Redirecionamento ao PDF.",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string",
                  "format": "uri"
                }
              },
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "private, no-store"
              },
              "Referrer-Policy": {
                "schema": {
                  "type": "string"
                },
                "example": "no-referrer"
              }
            }
          },
          "400": {
            "description": "Revise campos, filtros, datas e cursor.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "CAMPO_INVALIDO",
                  "message": "Revise campos, filtros, datas e cursor.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "401": {
            "description": "Solicite à Kinology uma credencial válida.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "CREDENCIAL_INVALIDA",
                  "message": "Solicite à Kinology uma credencial válida.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "403": {
            "description": "Confirme a concessão e a permissão da conta.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "PERMISSAO_NEGADA",
                  "message": "Confirme a concessão e a permissão da conta.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "404": {
            "description": "Para ticket expirado ou indisponível, solicite outro PDF.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "ACESSO_INDISPONIVEL",
                  "message": "Para ticket expirado ou indisponível, solicite outro PDF.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "408": {
            "description": "Envie o corpo completo dentro do prazo.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "PRAZO_LEITURA_EXCEDIDO",
                  "message": "Envie o corpo completo dentro do prazo.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "409": {
            "description": "Consulte a versão atual antes de revisar a atualização.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "VERSAO_CONFLITANTE",
                  "message": "Consulte a versão atual antes de revisar a atualização.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "413": {
            "description": "Reduza o corpo ou divida o CSV.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "PAYLOAD_INVALIDO",
                  "message": "Reduza o corpo ou divida o CSV.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "415": {
            "description": "Envie application/json sem compressão.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "FORMATO_NAO_SUPORTADO",
                  "message": "Envie application/json sem compressão.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "422": {
            "description": "Reduza o período ou revise as seções.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "SEM_DADOS_PDF",
                  "message": "Reduza o período ou revise as seções.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "429": {
            "description": "Respeite Retry-After e reduza o paralelismo.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Segundos antes de retentar."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "LIMITE_CONCORRENCIA",
                  "message": "Respeite Retry-After e reduza o paralelismo.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          },
          "503": {
            "description": "Respeite Retry-After; repita com espera progressiva e limite de tentativas.",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Segundos antes de retentar."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "enum": [
                        "fail"
                      ]
                    },
                    "code": {
                      "enum": [
                        -1
                      ]
                    },
                    "VERSAO_SCHEMA": {
                      "enum": [
                        "1.0"
                      ]
                    },
                    "CODIGO_ERRO": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "ID_CORRELACAO": {
                      "type": "string"
                    },
                    "ID_REQUISICAO": {
                      "type": "string",
                      "format": "uuid"
                    }
                  },
                  "required": [
                    "status",
                    "code",
                    "VERSAO_SCHEMA",
                    "CODIGO_ERRO",
                    "message",
                    "ID_CORRELACAO",
                    "ID_REQUISICAO"
                  ],
                  "additionalProperties": false
                },
                "example": {
                  "status": "fail",
                  "code": -1,
                  "VERSAO_SCHEMA": "1.0",
                  "CODIGO_ERRO": "SERVICO_INDISPONIVEL",
                  "message": "Respeite Retry-After; repita com espera progressiva e limite de tentativas.",
                  "ID_CORRELACAO": "INTEGRACAO-EXEMPLO-001",
                  "ID_REQUISICAO": "11111111-1111-4111-8111-111111111111"
                }
              }
            }
          }
        }
      }
    }
  }
}
