Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Formato padrão de erros e status codes da API.
{ "error": "Descrição legível do problema." }
code
error
200
201
400
401
403
404
409
500
{ "error": "contratoId, descricao, valor, dataVencimento e tipo são obrigatórios." }
{ "error": "Tipo inválido. Use: ALUGUEL, CAUCAO, REPARO" }
{ "error": "Acesso negado a este contrato." }
{ "error": "Contrato não encontrado." }
{ "error": "Já existe um locatário cadastrado com esse CPF." }
{ "error": "Não é possível excluir um locatário com contrato ativo." }
const res = await fetch("https://api.patrimonion.com.br/financeiro", { method: "POST", credentials: "include", // envia o cookie imob_session automaticamente headers: { "Content-Type": "application/json" }, body: JSON.stringify(payload), }); if (!res.ok) { const { error } = await res.json(); // error é sempre uma string legível toast.error(error); return; } const data = await res.json();