{"openapi":"3.0.3","info":{"title":"LBA API - Grupo Incorporadoras","version":"1.0.0","description":"API REST de integração entre os sistemas das incorporadoras e o Sistema de Gestão de Operações da LBA Capital. Versão inicial para o grupo Incorporadoras, somente leitura. O escopo dos dados é sempre derivado da identidade autenticada no token — a incorporadora nunca informa o developer_id.\n\n## Como chamar\n\n**Base URL (produção):** `https://api-dev.lbacapital.com.br`\n\n**Base URL (desenvolvimento/preview):** `https://id-preview--12b79583-b955-48c1-977d-9b32b32cdbe9.lovable.app`\n\nTodos os recursos de negócio usam o prefixo **`/api/public/v1/`**. Fora do prefixo versionado existem apenas: `/api/public/health`, `/api/public/oauth/token`, `/api/public/docs` e `/api/public/openapi.json`.\n\n| | Exemplo |\n| --- | --- |\n| Correto | `GET https://api-dev.lbacapital.com.br/api/public/v1/developments` |\n| Errado (404) | `GET https://api-dev.lbacapital.com.br/api/public/developments` |\n\nTodos os endpoints `/api/public/v1/*` exigem o header `Authorization: Bearer <access_token>` obtido em `/api/public/oauth/token`.\n\nCada endpoint abaixo possui o botão **Copiar URL**, que copia o endereço completo já com a base URL do ambiente atual."},"servers":[{"url":"https://api-dev.lbacapital.com.br","description":"Ambiente atual"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"}}}}},"Pagination":{"type":"object","properties":{"page":{"type":"integer"},"limit":{"type":"integer"},"total":{"type":"integer"},"total_pages":{"type":"integer"}}},"TokenResponse":{"type":"object","properties":{"access_token":{"type":"string"},"token_type":{"type":"string","example":"Bearer"},"expires_in":{"type":"integer","example":3600},"scope":{"type":"string"}}},"Development":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string","nullable":true},"type":{"type":"string","enum":["MCMV","SBPE","CAPITAL_PROPRIO"],"nullable":true,"description":"Tipo do empreendimento."},"units":{"type":"integer","nullable":true},"vgv":{"type":"number","nullable":true},"currency":{"type":"string","example":"BRL"},"spe":{"type":"object","nullable":true,"properties":{"cnpj":{"type":"string","nullable":true}}},"delivery_date":{"type":"string","format":"date","nullable":true},"launch_date":{"type":"string","format":"date","nullable":true}}},"Customer":{"type":"object","properties":{"cpf":{"type":"string"},"name":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"development_id":{"type":"integer"}}},"Contract":{"type":"object","properties":{"id":{"type":"integer"},"development_id":{"type":"integer"},"customer_cpf":{"type":"string"},"customer_name":{"type":"string","nullable":true},"unit_name":{"type":"string","nullable":true},"signed_at":{"type":"string","format":"date","nullable":true},"closing_at":{"type":"string","format":"date","nullable":true},"total_amount":{"type":"number","nullable":true},"amortization_type":{"type":"string","enum":["SAC","PRICE","OUTROS"],"nullable":true,"description":"Sistema de amortização do contrato."},"correction_index":{"type":"string","enum":["IPCA","IGPM","INCC","INCCM","REAL"],"nullable":true,"description":"Índice de correção monetária do contrato."},"status":{"type":"string","enum":["ATIVO","INATIVO"],"nullable":true,"description":"Status cadastral do contrato."},"situation":{"type":"string","enum":["ATIVO","INATIVO","DISTRATO","QUITADO","SUSPENSO","EM_RENEGOCIACAO","INADIMPLENTE"],"nullable":true,"description":"Situação comercial do contrato."}}},"Installment":{"type":"object","properties":{"id":{"type":"integer"},"group_id":{"type":"integer","nullable":true},"contract_id":{"type":"integer"},"number":{"type":"integer"},"due_date":{"type":"string","format":"date","nullable":true},"original_amount":{"type":"number","nullable":true},"current_amount":{"type":"number","nullable":true},"paid_amount":{"type":"number","nullable":true},"paid_at":{"type":"string","format":"date","nullable":true},"status":{"type":"string","enum":["PENDENTE","PAGO","VENCIDO","CANCELADO","BAIXADO"],"nullable":true,"description":"Status da parcela."},"linked":{"type":"boolean"}}},"Bankslip":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"account_id":{"type":"string","format":"uuid","nullable":true},"our_number":{"type":"string","nullable":true},"status":{"type":"string","enum":["ACCEPTED","REJECTED","PAYMENT_NOTICE","NOTARY_OFFICE_PAYMENT_NOTICE","REGISTERED","PAYMENT_BLOCKED","PAID","WRITTEN_OFF"],"nullable":true,"description":"Status do boleto no banco."},"protest_status":{"type":"string","enum":["NOT_PROTESTED","PROTEST_REQUESTED","NOTARY_OFFICE_ENTRY","PROTEST_CANCEL_REQUESTED","NOTARY_OFFICE_EXIT","PROTESTED","PAID_AT_NOTARY_OFFICE","JUDICIALLY_SUSPENDED","PROTEST_REMOVE_REQUESTED"],"nullable":true,"description":"Status de protesto do boleto."},"document_number":{"type":"string","nullable":true},"amount":{"type":"number","nullable":true},"expiration":{"type":"string","format":"date","nullable":true},"barcode":{"type":"string","nullable":true},"digitable_line":{"type":"string","nullable":true},"bankslip_file_url":{"type":"string","nullable":true},"paid_at":{"type":"string","format":"date","nullable":true},"paid_amount":{"type":"number","nullable":true}}},"Delinquency":{"type":"object","properties":{"development_id":{"type":"integer","nullable":true},"development_name":{"type":"string","nullable":true},"customer_cpf":{"type":"string","nullable":true},"customer_name":{"type":"string","nullable":true},"contract_id":{"type":"integer","nullable":true},"installment_id":{"type":"integer"},"installment_number":{"type":"integer","nullable":true},"due_date":{"type":"string","format":"date","nullable":true},"original_amount":{"type":"number","nullable":true},"current_amount":{"type":"number","nullable":true},"days_overdue":{"type":"integer","nullable":true},"status":{"type":"string","enum":["PENDENTE","PAGO","VENCIDO","CANCELADO","BAIXADO"],"nullable":true,"description":"Status da parcela em atraso."}}},"DelinquencySummary":{"type":"object","properties":{"total_amount_overdue":{"type":"number"},"total_amount_due":{"type":"number"},"total_overdue_count":{"type":"integer"},"customers_overdue":{"type":"integer"},"currency":{"type":"string","example":"BRL"}}},"OperationsReportOperation":{"type":"object","properties":{"operation_id":{"type":"integer"},"development_id":{"type":"integer"},"tranche":{"type":"integer","nullable":true},"status":{"type":"string","enum":["ATIVA","PRE_PAGA","FINALIZADA","WO","RASCUNHO"],"nullable":true,"description":"Status da operação."},"installments":{"type":"array","items":{"$ref":"#/components/schemas/OperationsReportInstallment"}}}},"OperationsReportInstallment":{"type":"object","properties":{"installment_number":{"type":"integer"},"due_date":{"type":"string","format":"date","nullable":true},"expected_receivables":{"type":"number","nullable":true},"realized_receivables":{"type":"number","nullable":true},"customer_contribution":{"type":"number","nullable":true},"amortization":{"type":"number","nullable":true},"interest":{"type":"number","nullable":true},"cdi_interest":{"type":"number","nullable":true,"description":"Juros CDI + mora + multa + juros do contrato. Nulo quando não conciliado."},"outstanding_balance":{"type":"number","nullable":true},"refund":{"type":"number","nullable":true},"cashsweep":{"type":"number","nullable":true},"realized_reserve_fund":{"type":"number","nullable":true},"expected_reserve_fund":{"type":"number","nullable":true},"adherence":{"type":"number","nullable":true,"description":"Fração decimal (0.98 = 98%)"},"delinquency":{"type":"number","nullable":true,"description":"Fração decimal (0.01 = 1%)"},"billed_receivables":{"type":"number","nullable":true},"reserve_fund_movement":{"type":"number","nullable":true},"fees":{"type":"number","nullable":true},"reconciled":{"type":"boolean"}}},"DunningRule":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"sender_name":{"type":"string","nullable":true},"sender_email":{"type":"string","nullable":true},"is_default":{"type":"boolean"},"events":{"type":"array","items":{"$ref":"#/components/schemas/DunningEvent"}}}},"DunningEvent":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"rule_id":{"type":"string","format":"uuid"},"format":{"type":"string","enum":["EMAIL","WHATSAPP"],"nullable":true,"description":"Canal de comunicação."},"type":{"type":"string","enum":["ENVIO_COBRANCA_BOLETO","LEMBRETE_COBRANCA_BOLETO","PAGAMENTO_ATRASO_BOLETO","PAGAMENTO_RECEBIDO","COBRANCA_BAIXADA","NOTIFICACAO_CESSAO","AVISO_VENCIMENTO_BOLETO"],"nullable":true,"description":"Tipo de comunicação da régua."},"trigger":{"type":"string","enum":["ANTES_VENCIMENTO","DIA_VENCIMENTO","APOS_VENCIMENTO","IMEDIATO"],"nullable":true,"description":"Momento do disparo em relação ao vencimento."},"days":{"type":"integer"}}},"CustomerEmail":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"cpf":{"type":"string"},"email":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"phone":{"type":"string","nullable":true},"development_id":{"type":"integer","nullable":true}}},"NotificationLog":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"cpf":{"type":"string","nullable":true},"email":{"type":"string","nullable":true},"bank_slip_ids":{"type":"array","items":{"type":"string","format":"uuid"}},"status":{"type":"string","nullable":true},"error_message":{"type":"string","nullable":true},"sent_at":{"type":"string","format":"date-time","nullable":true}}},"CnabFile":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"account_id":{"type":"string","format":"uuid"},"requester_profile_key":{"type":"string","format":"uuid"},"file_name":{"type":"string"},"status":{"type":"string","enum":["UPLOADED","PROCESSING","READ","REJECTED"],"nullable":true,"description":"Status de processamento do arquivo CNAB."},"occurrence_count":{"type":"integer","nullable":true},"generated_at":{"type":"string","format":"date-time","nullable":true}}},"DischargeFile":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"account_id":{"type":"string","format":"uuid"},"file_name":{"type":"string"},"file_url":{"type":"string","nullable":true},"reference_date":{"type":"string","format":"date","nullable":true},"generated_at":{"type":"string","format":"date-time","nullable":true}}},"Account":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"bank_code":{"type":"integer","nullable":true},"branch":{"type":"string","nullable":true},"account_number":{"type":"string","nullable":true},"account_digit":{"type":"string","nullable":true},"account_type":{"type":"string","enum":["CHECKING","INVESTMENT","ESCROW"],"nullable":true,"description":"Tipo da conta."},"status":{"type":"string","enum":["OPENED","CLOSED","BLOCKED"],"nullable":true,"description":"Status da conta."},"balance":{"type":"number","nullable":true},"blocked_balance":{"type":"number","nullable":true},"available_balance":{"type":"number","nullable":true},"currency":{"type":"string","example":"BRL"},"development":{"type":"object","nullable":true,"properties":{"id":{"type":"integer","nullable":true},"name":{"type":"string","nullable":true}}},"operation":{"type":"object","nullable":true,"properties":{"id":{"type":"integer","nullable":true}}}}},"Transaction":{"type":"object","properties":{"id":{"type":"string","nullable":true},"date":{"type":"string","format":"date-time","nullable":true},"type":{"type":"string","enum":["CREDIT","DEBIT"]},"description":{"type":"string","nullable":true},"category":{"type":"string","nullable":true},"amount":{"type":"number"},"currency":{"type":"string","example":"BRL"},"balance":{"type":"number","nullable":true}}},"Statement":{"type":"object","properties":{"account":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"bank_code":{"type":"integer","nullable":true},"branch":{"type":"string","nullable":true},"account_number":{"type":"string","nullable":true},"account_digit":{"type":"string","nullable":true}}},"period":{"type":"object","properties":{"start_date":{"type":"string","format":"date"},"end_date":{"type":"string","format":"date"}}},"currency":{"type":"string","example":"BRL"},"opening_balance":{"type":"number","nullable":true},"closing_balance":{"type":"number","nullable":true},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/Transaction"}}}}}},"paths":{"/api/public/health":{"get":{"summary":"Health check","security":[],"responses":{"200":{"description":"Serviço no ar","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"}}},"example":{"status":"ok"}}}}},"tags":["Saúde"]}},"/api/public/oauth/token":{"post":{"summary":"Emissão de access token (client_credentials)","security":[],"requestBody":{"required":true,"content":{"application/json":{"example":{"grant_type":"client_credentials","client_id":"lba_incorporadora_demo","client_secret":"••••••••","scope":"developments:read accounts:read statement:read contracts:read"}},"application/x-www-form-urlencoded":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"Token emitido","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"},"example":{"access_token":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...","token_type":"Bearer","expires_in":3600,"scope":"developments:read accounts:read statement:read contracts:read"}}}},"401":{"description":"Erro","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INVALID_TOKEN","message":"Missing bearer access token","request_id":"0f5d1a2e-7c62-4a1f-9a34-16a3d4e0f0aa"}}}}}},"tags":["Autenticação"]}},"/api/public/v1/developments":{"get":{"summary":"Lista empreendimentos da incorporadora autenticada","security":[{"bearerAuth":[]}],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}}],"responses":{"200":{"description":"Lista paginada","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Development"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"example":{"data":[{"id":1042,"name":"Residencial Jardim Aurora","type":"MCMV","units":168,"vgv":98750000,"currency":"BRL","spe":{"cnpj":"09480159000125"},"delivery_date":"2027-11-30","launch_date":"2024-03-15"},{"id":1058,"name":"Edifício Mirante do Vale","type":"MCMV","units":96,"vgv":54200000,"currency":"BRL","spe":{"cnpj":"09480159000125"},"delivery_date":"2028-04-30","launch_date":"2025-06-01"}],"pagination":{"page":1,"limit":50,"total":2,"total_pages":1}}}}},"401":{"description":"Erro","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INVALID_TOKEN","message":"Missing bearer access token","request_id":"0f5d1a2e-7c62-4a1f-9a34-16a3d4e0f0aa"}}}}}},"tags":["Empreendimentos"]}},"/api/public/v1/developments/{id}":{"get":{"summary":"Detalhe do empreendimento","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Empreendimento","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Development"}}},"example":{"data":{"id":1042,"name":"Residencial Jardim Aurora","type":"MCMV","units":168,"vgv":98750000,"currency":"BRL","spe":{"cnpj":"09480159000125"},"delivery_date":"2027-11-30","launch_date":"2024-03-15"}}}}},"404":{"description":"Erro","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INVALID_TOKEN","message":"Missing bearer access token","request_id":"0f5d1a2e-7c62-4a1f-9a34-16a3d4e0f0aa"}}}}}},"tags":["Empreendimentos"]}},"/api/public/v1/accounts":{"get":{"summary":"Contas escrow vinculadas às operações da incorporadora","security":[{"bearerAuth":[]}],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}}],"responses":{"200":{"description":"Lista paginada","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Account"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"example":{"data":[{"id":"c1f0a8de-4a35-4b0e-9d3a-6a2f1d9b7e51","bank_code":329,"branch":"0001","account_number":"4471209","account_digit":"6","account_type":"ESCROW","status":"OPENED","balance":3820450.77,"blocked_balance":120000,"available_balance":3700450.77,"currency":"BRL","development":{"id":1042,"name":"Residencial Jardim Aurora"},"operation":{"id":5310}}],"pagination":{"page":1,"limit":50,"total":1,"total_pages":1}}}}},"401":{"description":"Erro","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INVALID_TOKEN","message":"Missing bearer access token","request_id":"0f5d1a2e-7c62-4a1f-9a34-16a3d4e0f0aa"}}}}}},"tags":["Contas escrow"]}},"/api/public/v1/accounts/{id}":{"get":{"summary":"Detalhe da conta escrow","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Conta escrow","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Account"}}},"example":{"data":{"id":"c1f0a8de-4a35-4b0e-9d3a-6a2f1d9b7e51","bank_code":329,"branch":"0001","account_number":"4471209","account_digit":"6","account_type":"ESCROW","status":"OPENED","balance":3820450.77,"blocked_balance":120000,"available_balance":3700450.77,"currency":"BRL","development":{"id":1042,"name":"Residencial Jardim Aurora"},"operation":{"id":5310}}}}}},"404":{"description":"Erro","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INVALID_TOKEN","message":"Missing bearer access token","request_id":"0f5d1a2e-7c62-4a1f-9a34-16a3d4e0f0aa"}}}}}},"tags":["Contas escrow"]}},"/api/public/v1/accounts/{id}/statement":{"get":{"summary":"Extrato da conta escrow (período máximo de 90 dias)","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"start_date","in":"query","schema":{"type":"string","format":"date"}},{"name":"end_date","in":"query","schema":{"type":"string","format":"date"}},{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}}],"responses":{"200":{"description":"Extrato","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Statement"},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"example":{"data":{"account":{"id":"c1f0a8de-4a35-4b0e-9d3a-6a2f1d9b7e51","bank_code":329,"branch":"0001","account_number":"4471209","account_digit":"6"},"period":{"start_date":"2026-07-01","end_date":"2026-07-31"},"currency":"BRL","opening_balance":3636150.27,"closing_balance":3728450.77,"transactions":[{"id":"a8b6a0d2-7f1c-4a41-9a1e-2f0d5c3b9a10","date":"2026-07-03T12:18:44.000Z","type":"CREDIT","description":"Repasse de recebíveis - unidade 703","category":"PIX_IN","amount":184300.5,"currency":"BRL","balance":3820450.77},{"id":"4f2c9e77-13b8-4d55-8f2c-1c9a4e77b301","date":"2026-07-05T09:02:10.000Z","type":"DEBIT","description":"Liberação de medição de obra","category":"TED_OUT","amount":92000,"currency":"BRL","balance":3728450.77}]},"pagination":{"page":1,"limit":50,"total":2,"total_pages":1}}}}},"400":{"description":"Erro","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INVALID_TOKEN","message":"Missing bearer access token","request_id":"0f5d1a2e-7c62-4a1f-9a34-16a3d4e0f0aa"}}}}},"404":{"description":"Erro","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INVALID_TOKEN","message":"Missing bearer access token","request_id":"0f5d1a2e-7c62-4a1f-9a34-16a3d4e0f0aa"}}}}},"502":{"description":"Erro","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INVALID_TOKEN","message":"Missing bearer access token","request_id":"0f5d1a2e-7c62-4a1f-9a34-16a3d4e0f0aa"}}}}}},"tags":["Contas escrow"]}},"/api/public/v1/statement":{"get":{"summary":"Extrato de conta escrow (período máximo de 90 dias)","security":[{"bearerAuth":[]}],"parameters":[{"name":"account_id","in":"query","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"start_date","in":"query","schema":{"type":"string","format":"date"}},{"name":"end_date","in":"query","schema":{"type":"string","format":"date"}},{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}}],"responses":{"200":{"description":"Extrato","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Statement"},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"example":{"data":{"account":{"id":"c1f0a8de-4a35-4b0e-9d3a-6a2f1d9b7e51","bank_code":329,"branch":"0001","account_number":"4471209","account_digit":"6"},"period":{"start_date":"2026-07-01","end_date":"2026-07-31"},"currency":"BRL","opening_balance":3636150.27,"closing_balance":3728450.77,"transactions":[{"id":"a8b6a0d2-7f1c-4a41-9a1e-2f0d5c3b9a10","date":"2026-07-03T12:18:44.000Z","type":"CREDIT","description":"Repasse de recebíveis - unidade 703","category":"PIX_IN","amount":184300.5,"currency":"BRL","balance":3820450.77},{"id":"4f2c9e77-13b8-4d55-8f2c-1c9a4e77b301","date":"2026-07-05T09:02:10.000Z","type":"DEBIT","description":"Liberação de medição de obra","category":"TED_OUT","amount":92000,"currency":"BRL","balance":3728450.77}]},"pagination":{"page":1,"limit":50,"total":2,"total_pages":1}}}}},"400":{"description":"Erro","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INVALID_TOKEN","message":"Missing bearer access token","request_id":"0f5d1a2e-7c62-4a1f-9a34-16a3d4e0f0aa"}}}}},"404":{"description":"Erro","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INVALID_TOKEN","message":"Missing bearer access token","request_id":"0f5d1a2e-7c62-4a1f-9a34-16a3d4e0f0aa"}}}}},"502":{"description":"Erro","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INVALID_TOKEN","message":"Missing bearer access token","request_id":"0f5d1a2e-7c62-4a1f-9a34-16a3d4e0f0aa"}}}}}},"tags":["Contas escrow"]}},"/api/public/v1/customers":{"get":{"summary":"Lista clientes (compradores) dos empreendimentos da incorporadora","security":[{"bearerAuth":[]}],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}}],"responses":{"200":{"description":"Lista paginada","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Customer"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"example":{"data":[{"cpf":"12345678909","name":"Maria Helena da Silva","email":"maria.silva@email.com","phone":"11987654321","development_id":1042}],"pagination":{"page":1,"limit":50,"total":1,"total_pages":1}}}}},"401":{"description":"Erro","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INVALID_TOKEN","message":"Missing bearer access token","request_id":"0f5d1a2e-7c62-4a1f-9a34-16a3d4e0f0aa"}}}}}},"tags":["Clientes"]}},"/api/public/v1/customers/{cpf}":{"get":{"summary":"Detalhe do cliente","security":[{"bearerAuth":[]}],"parameters":[{"name":"cpf","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Cliente","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Customer"}}},"example":{"data":{"cpf":"12345678909","name":"Maria Helena da Silva","email":"maria.silva@email.com","phone":"11987654321","development_id":1042}}}}},"404":{"description":"Erro","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INVALID_TOKEN","message":"Missing bearer access token","request_id":"0f5d1a2e-7c62-4a1f-9a34-16a3d4e0f0aa"}}}}}},"tags":["Clientes"]}},"/api/public/v1/contracts":{"get":{"summary":"Lista contratos dos empreendimentos da incorporadora","security":[{"bearerAuth":[]}],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}}],"responses":{"200":{"description":"Lista paginada","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Contract"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"example":{"data":[{"id":98765,"development_id":1042,"customer_cpf":"12345678909","customer_name":"Maria Helena da Silva","unit_name":"Apartamento 703 - Torre A","signed_at":"2024-03-15","closing_at":"2034-03-15","total_amount":850000,"amortization_type":"SAC","correction_index":"INCC","status":"ATIVO","situation":"ATIVO"}],"pagination":{"page":1,"limit":50,"total":1,"total_pages":1}}}}},"401":{"description":"Erro","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INVALID_TOKEN","message":"Missing bearer access token","request_id":"0f5d1a2e-7c62-4a1f-9a34-16a3d4e0f0aa"}}}}}},"tags":["Contratos"]}},"/api/public/v1/contracts/{id}":{"get":{"summary":"Detalhe do contrato","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Contrato","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Contract"}}},"example":{"data":{"id":98765,"development_id":1042,"customer_cpf":"12345678909","customer_name":"Maria Helena da Silva","unit_name":"Apartamento 703 - Torre A","signed_at":"2024-03-15","closing_at":"2034-03-15","total_amount":850000,"amortization_type":"SAC","correction_index":"INCC","status":"ATIVO","situation":"ATIVO"}}}}},"404":{"description":"Erro","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INVALID_TOKEN","message":"Missing bearer access token","request_id":"0f5d1a2e-7c62-4a1f-9a34-16a3d4e0f0aa"}}}}}},"tags":["Contratos"]}},"/api/public/v1/contracts/{id}/installments":{"get":{"summary":"Parcelas de um contrato","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}}],"responses":{"200":{"description":"Lista paginada","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Installment"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"example":{"data":[{"id":112233,"group_id":4455,"contract_id":98765,"number":12,"due_date":"2026-08-15","original_amount":4500,"current_amount":4500,"paid_amount":0,"paid_at":null,"status":"PENDENTE","linked":true}],"pagination":{"page":1,"limit":50,"total":1,"total_pages":1}}}}},"404":{"description":"Erro","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INVALID_TOKEN","message":"Missing bearer access token","request_id":"0f5d1a2e-7c62-4a1f-9a34-16a3d4e0f0aa"}}}}}},"tags":["Contratos"]}},"/api/public/v1/installments":{"get":{"summary":"Lista parcelas dos empreendimentos da incorporadora","security":[{"bearerAuth":[]}],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}}],"responses":{"200":{"description":"Lista paginada","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Installment"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"example":{"data":[{"id":112233,"group_id":4455,"contract_id":98765,"number":12,"due_date":"2026-08-15","original_amount":4500,"current_amount":4500,"paid_amount":0,"paid_at":null,"status":"PENDENTE","linked":true}],"pagination":{"page":1,"limit":50,"total":1,"total_pages":1}}}}},"401":{"description":"Erro","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INVALID_TOKEN","message":"Missing bearer access token","request_id":"0f5d1a2e-7c62-4a1f-9a34-16a3d4e0f0aa"}}}}}},"tags":["Parcelas"]}},"/api/public/v1/installments/{id}":{"get":{"summary":"Detalhe da parcela","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Parcela","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Installment"}}},"example":{"data":{"id":112233,"group_id":4455,"contract_id":98765,"number":12,"due_date":"2026-08-15","original_amount":4500,"current_amount":4500,"paid_amount":0,"paid_at":null,"status":"PENDENTE","linked":true}}}}},"404":{"description":"Erro","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INVALID_TOKEN","message":"Missing bearer access token","request_id":"0f5d1a2e-7c62-4a1f-9a34-16a3d4e0f0aa"}}}}}},"tags":["Parcelas"]}},"/api/public/v1/bankslips":{"get":{"summary":"Lista boletos dos empreendimentos da incorporadora","security":[{"bearerAuth":[]}],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}}],"responses":{"200":{"description":"Lista paginada","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Bankslip"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"example":{"data":[{"id":"f0e2c4b8-5d7a-4b9e-8f1c-3a2b1c4d5e6f","account_id":"c1f0a8de-4a35-4b0e-9d3a-6a2f1d9b7e51","our_number":"00012345678901234567","status":"REGISTERED","protest_status":"NOT_PROTESTED","document_number":"12345678909","amount":4500,"expiration":"2026-08-15","barcode":"32900012345678901234567890123456789012345678901","digitable_line":"32900.12345 67890.123456 78901.234567 8 90123456789012","bankslip_file_url":"https://files.qitech.com.br/bankslips/f0e2c4b8.pdf","paid_at":null,"paid_amount":0}],"pagination":{"page":1,"limit":50,"total":1,"total_pages":1}}}}},"401":{"description":"Erro","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INVALID_TOKEN","message":"Missing bearer access token","request_id":"0f5d1a2e-7c62-4a1f-9a34-16a3d4e0f0aa"}}}}}},"tags":["Boletos"]}},"/api/public/v1/bankslips/{id}":{"get":{"summary":"Detalhe do boleto","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Boleto","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Bankslip"}}},"example":{"data":{"id":"f0e2c4b8-5d7a-4b9e-8f1c-3a2b1c4d5e6f","account_id":"c1f0a8de-4a35-4b0e-9d3a-6a2f1d9b7e51","our_number":"00012345678901234567","status":"REGISTERED","protest_status":"NOT_PROTESTED","document_number":"12345678909","amount":4500,"expiration":"2026-08-15","barcode":"32900012345678901234567890123456789012345678901","digitable_line":"32900.12345 67890.123456 78901.234567 8 90123456789012","bankslip_file_url":"https://files.qitech.com.br/bankslips/f0e2c4b8.pdf","paid_at":null,"paid_amount":0}}}}},"404":{"description":"Erro","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INVALID_TOKEN","message":"Missing bearer access token","request_id":"0f5d1a2e-7c62-4a1f-9a34-16a3d4e0f0aa"}}}}}},"tags":["Boletos"]}},"/api/public/v1/delinquency":{"get":{"summary":"Lista de parcelas em atraso","security":[{"bearerAuth":[]}],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}}],"responses":{"200":{"description":"Lista paginada","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Delinquency"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"example":{"data":[{"development_id":1042,"development_name":"Residencial Jardim Aurora","customer_cpf":null,"customer_name":null,"contract_id":98765,"installment_id":112233,"installment_number":12,"due_date":"2026-07-15","original_amount":4500,"current_amount":4500,"days_overdue":18,"status":"PENDENTE"}],"pagination":{"page":1,"limit":50,"total":1,"total_pages":1}}}}},"401":{"description":"Erro","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INVALID_TOKEN","message":"Missing bearer access token","request_id":"0f5d1a2e-7c62-4a1f-9a34-16a3d4e0f0aa"}}}}}},"tags":["Inadimplência"]}},"/api/public/v1/delinquency/summary":{"get":{"summary":"Resumo de inadimplência","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Resumo de inadimplência","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/DelinquencySummary"}}},"example":{"data":{"total_amount_overdue":184500,"total_amount_due":421000,"total_overdue_count":41,"customers_overdue":18,"currency":"BRL"}}}}},"401":{"description":"Erro","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INVALID_TOKEN","message":"Missing bearer access token","request_id":"0f5d1a2e-7c62-4a1f-9a34-16a3d4e0f0aa"}}}}}},"tags":["Inadimplência"]}},"/api/public/v1/operations-report":{"get":{"summary":"Prestação de contas por empreendimento","description":"Retorna os dados de conciliação agrupados por operação, com o status da operação e as parcelas exibidas na tela de prestação de contas do portal da incorporadora.","security":[{"bearerAuth":[]}],"parameters":[{"name":"development_id","in":"query","required":true,"schema":{"type":"integer"},"description":"Código do empreendimento (deve pertencer à incorporadora autenticada)."}],"responses":{"200":{"description":"Relatório de operações","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OperationsReportOperation"}}}},"example":{"data":[{"operation_id":5310,"development_id":1042,"tranche":1,"status":"ATIVA","installments":[{"installment_number":1,"due_date":"2024-04-15","expected_receivables":250000,"realized_receivables":248500,"customer_contribution":0,"amortization":200000,"interest":15000,"cdi_interest":3500,"outstanding_balance":1800000,"refund":0,"cashsweep":0,"realized_reserve_fund":120000,"expected_reserve_fund":150000,"adherence":0.98,"delinquency":0.01,"billed_receivables":248500,"reserve_fund_movement":0,"fees":150,"reconciled":true},{"installment_number":2,"due_date":"2024-05-15","expected_receivables":250000,"realized_receivables":null,"customer_contribution":null,"amortization":200000,"interest":15000,"cdi_interest":null,"outstanding_balance":1600000,"refund":null,"cashsweep":null,"realized_reserve_fund":120000,"expected_reserve_fund":150000,"adherence":null,"delinquency":null,"billed_receivables":null,"reserve_fund_movement":null,"fees":null,"reconciled":false}]}]}}}},"400":{"description":"Erro","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INVALID_TOKEN","message":"Missing bearer access token","request_id":"0f5d1a2e-7c62-4a1f-9a34-16a3d4e0f0aa"}}}}},"401":{"description":"Erro","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INVALID_TOKEN","message":"Missing bearer access token","request_id":"0f5d1a2e-7c62-4a1f-9a34-16a3d4e0f0aa"}}}}},"403":{"description":"Erro","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INVALID_TOKEN","message":"Missing bearer access token","request_id":"0f5d1a2e-7c62-4a1f-9a34-16a3d4e0f0aa"}}}}},"404":{"description":"Erro","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INVALID_TOKEN","message":"Missing bearer access token","request_id":"0f5d1a2e-7c62-4a1f-9a34-16a3d4e0f0aa"}}}}}},"tags":["Prestação de contas"]}},"/api/public/v1/dunning-rules":{"get":{"summary":"Lista réguas de cobrança da incorporadora","security":[{"bearerAuth":[]}],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}}],"responses":{"200":{"description":"Lista paginada","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DunningRule"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"example":{"data":[{"id":"d1e2f3a4-b5c6-7d8e-9f0a-1b2c3d4e5f6a","name":"Régua Padrão 30/60/90","sender_name":"LBA Capital","sender_email":"cobranca@lba.com.br","is_default":true,"events":[{"id":"e1f2a3b4-c5d6-7e8f-9a0b-1c2d3e4f5a6b","rule_id":"d1e2f3a4-b5c6-7d8e-9f0a-1b2c3d4e5f6a","format":"EMAIL","type":"ENVIO_COBRANCA_BOLETO","trigger":"ANTES_VENCIMENTO","days":5},{"id":"e2f3a4b5-c6d7-8e9f-0a1b-2c3d4e5f6a7b","rule_id":"d1e2f3a4-b5c6-7d8e-9f0a-1b2c3d4e5f6a","format":"EMAIL","type":"PAGAMENTO_ATRASO_BOLETO","trigger":"APOS_VENCIMENTO","days":5}]}],"pagination":{"page":1,"limit":50,"total":1,"total_pages":1}}}}},"401":{"description":"Erro","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INVALID_TOKEN","message":"Missing bearer access token","request_id":"0f5d1a2e-7c62-4a1f-9a34-16a3d4e0f0aa"}}}}}},"tags":["Comunicação"]}},"/api/public/v1/dunning-rules/{id}":{"get":{"summary":"Detalhe da régua de cobrança","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Régua de cobrança","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/DunningRule"}}},"example":{"data":{"id":"d1e2f3a4-b5c6-7d8e-9f0a-1b2c3d4e5f6a","name":"Régua Padrão 30/60/90","sender_name":"LBA Capital","sender_email":"cobranca@lba.com.br","is_default":true,"events":[{"id":"e1f2a3b4-c5d6-7e8f-9a0b-1c2d3e4f5a6b","rule_id":"d1e2f3a4-b5c6-7d8e-9f0a-1b2c3d4e5f6a","format":"EMAIL","type":"ENVIO_COBRANCA_BOLETO","trigger":"ANTES_VENCIMENTO","days":5},{"id":"e2f3a4b5-c6d7-8e9f-0a1b-2c3d4e5f6a7b","rule_id":"d1e2f3a4-b5c6-7d8e-9f0a-1b2c3d4e5f6a","format":"EMAIL","type":"PAGAMENTO_ATRASO_BOLETO","trigger":"APOS_VENCIMENTO","days":5}]}}}}},"404":{"description":"Erro","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INVALID_TOKEN","message":"Missing bearer access token","request_id":"0f5d1a2e-7c62-4a1f-9a34-16a3d4e0f0aa"}}}}}},"tags":["Comunicação"]}},"/api/public/v1/customer-emails":{"get":{"summary":"Lista e-mails de clientes cadastrados","security":[{"bearerAuth":[]}],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}}],"responses":{"200":{"description":"Lista paginada","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CustomerEmail"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"example":{"data":[{"id":"c1d2e3f4-a5b6-7c8d-9e0f-1a2b3c4d5e6f","cpf":"12345678909","email":"maria.silva@email.com","name":"Maria Helena da Silva","phone":"11987654321","development_id":1042}],"pagination":{"page":1,"limit":50,"total":1,"total_pages":1}}}}},"401":{"description":"Erro","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INVALID_TOKEN","message":"Missing bearer access token","request_id":"0f5d1a2e-7c62-4a1f-9a34-16a3d4e0f0aa"}}}}}},"tags":["Comunicação"]}},"/api/public/v1/customer-emails/{id}":{"get":{"summary":"Detalhe do e-mail de cliente","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"E-mail de cliente","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CustomerEmail"}}},"example":{"data":{"id":"c1d2e3f4-a5b6-7c8d-9e0f-1a2b3c4d5e6f","cpf":"12345678909","email":"maria.silva@email.com","name":"Maria Helena da Silva","phone":"11987654321","development_id":1042}}}}},"404":{"description":"Erro","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INVALID_TOKEN","message":"Missing bearer access token","request_id":"0f5d1a2e-7c62-4a1f-9a34-16a3d4e0f0aa"}}}}}},"tags":["Comunicação"]}},"/api/public/v1/notification-logs":{"get":{"summary":"Logs de envio de notificações (boletos/cobrança)","security":[{"bearerAuth":[]}],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}}],"responses":{"200":{"description":"Lista paginada","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/NotificationLog"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"example":{"data":[{"id":"n1o2p3q4-r5s6-7t8u-9v0w-1x2y3z4a5b6c","cpf":"12345678909","email":"maria.silva@email.com","bank_slip_ids":["f0e2c4b8-5d7a-4b9e-8f1c-3a2b1c4d5e6f"],"status":"SENT","error_message":null,"sent_at":"2026-07-16T10:00:00.000Z"}],"pagination":{"page":1,"limit":50,"total":1,"total_pages":1}}}}},"401":{"description":"Erro","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INVALID_TOKEN","message":"Missing bearer access token","request_id":"0f5d1a2e-7c62-4a1f-9a34-16a3d4e0f0aa"}}}}}},"tags":["Comunicação"]}},"/api/public/v1/notification-logs/{id}":{"get":{"summary":"Detalhe do log de envio","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Log de envio","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/NotificationLog"}}},"example":{"data":{"id":"n1o2p3q4-r5s6-7t8u-9v0w-1x2y3z4a5b6c","cpf":"12345678909","email":"maria.silva@email.com","bank_slip_ids":["f0e2c4b8-5d7a-4b9e-8f1c-3a2b1c4d5e6f"],"status":"SENT","error_message":null,"sent_at":"2026-07-16T10:00:00.000Z"}}}}},"404":{"description":"Erro","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INVALID_TOKEN","message":"Missing bearer access token","request_id":"0f5d1a2e-7c62-4a1f-9a34-16a3d4e0f0aa"}}}}}},"tags":["Comunicação"]}},"/api/public/v1/discharge-files":{"get":{"summary":"Lista arquivos de retorno (CNAB)","security":[{"bearerAuth":[]}],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}}],"responses":{"200":{"description":"Lista paginada","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DischargeFile"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"example":{"data":[{"id":"6f1b9c2a-8d34-4c71-9f5e-1a2b3c4d5e6f","account_id":"c1f0a8de-4a35-4b0e-9d3a-6a2f1d9b7e51","file_name":"RETORNO_20260731.RET","file_url":"https://files.qitech.com.br/cnab/RETORNO_20260731.RET","reference_date":"2026-07-31","generated_at":"2026-07-31T23:10:00.000Z"}],"pagination":{"page":1,"limit":50,"total":1,"total_pages":1}}}}},"401":{"description":"Erro","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INVALID_TOKEN","message":"Missing bearer access token","request_id":"0f5d1a2e-7c62-4a1f-9a34-16a3d4e0f0aa"}}}}}},"tags":["Arquivos"]}},"/api/public/v1/discharge-files/{id}":{"get":{"summary":"Detalhe do arquivo de retorno","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Arquivo de retorno","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/DischargeFile"}}},"example":{"data":{"id":"6f1b9c2a-8d34-4c71-9f5e-1a2b3c4d5e6f","account_id":"c1f0a8de-4a35-4b0e-9d3a-6a2f1d9b7e51","file_name":"RETORNO_20260731.RET","file_url":"https://files.qitech.com.br/cnab/RETORNO_20260731.RET","reference_date":"2026-07-31","generated_at":"2026-07-31T23:10:00.000Z"}}}}},"404":{"description":"Erro","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INVALID_TOKEN","message":"Missing bearer access token","request_id":"0f5d1a2e-7c62-4a1f-9a34-16a3d4e0f0aa"}}}}}},"tags":["Arquivos"]}},"/api/public/v1/cnab-files":{"get":{"summary":"Lista arquivos CNAB temporários","security":[{"bearerAuth":[]}],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}}],"responses":{"200":{"description":"Lista paginada","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CnabFile"}},"pagination":{"$ref":"#/components/schemas/Pagination"}}},"example":{"data":[{"id":"f1a2b3c4-d5e6-7f8a-9b0c-1d2e3f4a5b6c","account_id":"c1f0a8de-4a35-4b0e-9d3a-6a2f1d9b7e51","requester_profile_key":"p1q2r3s4-t5u6-7v8w-9x0y-1z2a3b4c5d6e","file_name":"remessa_20260716_001.txt","status":"READ","occurrence_count":42,"generated_at":"2026-07-16T08:00:00.000Z"}],"pagination":{"page":1,"limit":50,"total":1,"total_pages":1}}}}},"401":{"description":"Erro","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INVALID_TOKEN","message":"Missing bearer access token","request_id":"0f5d1a2e-7c62-4a1f-9a34-16a3d4e0f0aa"}}}}}},"tags":["Arquivos"]}},"/api/public/v1/cnab-files/{id}":{"get":{"summary":"Detalhe do arquivo CNAB","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Arquivo CNAB","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/CnabFile"}}},"example":{"data":{"id":"f1a2b3c4-d5e6-7f8a-9b0c-1d2e3f4a5b6c","account_id":"c1f0a8de-4a35-4b0e-9d3a-6a2f1d9b7e51","requester_profile_key":"p1q2r3s4-t5u6-7v8w-9x0y-1z2a3b4c5d6e","file_name":"remessa_20260716_001.txt","status":"READ","occurrence_count":42,"generated_at":"2026-07-16T08:00:00.000Z"}}}}},"404":{"description":"Erro","headers":{"X-Request-Id":{"description":"Identificador único da requisição, útil para suporte e auditoria.","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"INVALID_TOKEN","message":"Missing bearer access token","request_id":"0f5d1a2e-7c62-4a1f-9a34-16a3d4e0f0aa"}}}}}},"tags":["Arquivos"]}}},"tags":[{"name":"Saúde","description":"Verificação de disponibilidade do serviço."},{"name":"Autenticação","description":"Emissão de access token via client_credentials."},{"name":"Empreendimentos","description":"Empreendimentos da incorporadora autenticada."},{"name":"Contas escrow","description":"Contas escrow e extratos."},{"name":"Clientes","description":"Clientes vinculados aos contratos."},{"name":"Contratos","description":"Contratos e suas parcelas."},{"name":"Parcelas","description":"Parcelas de contratos."},{"name":"Boletos","description":"Boletos emitidos."},{"name":"Inadimplência","description":"Indicadores e listagem de inadimplência."},{"name":"Prestação de contas","description":"Relatório de operações e conciliação."},{"name":"Comunicação","description":"Réguas de cobrança, e-mails de clientes e logs de envio."},{"name":"Arquivos","description":"Arquivos CNAB e arquivos de retorno."}]}