{
  "openapi": "3.1.0",
  "info": {
    "title": "API de Antecipação de Recebíveis — Zemo Capital",
    "description": "API V2 para originadores realizarem antecipação de recebíveis.\n\n> ⚠️ **Teste interativo (\"Testar no navegador\")**\n> As requisições enviadas por este portal vão **direto** para o ambiente de **Produção** (`https://receivables-api.zemocapital.com`), sem proxy de terceiros.\n> A plataforma emite **credenciais distintas para Produção e Homologação** — use **exclusivamente as credenciais de homologação** ao testar aqui, para **não impactar dados reais**.",
    "version": "1.0.0"
  },
  "paths": {
    "/v1/health": {
      "get": {
        "tags": [
          "health"
        ],
        "summary": "Service health check",
        "description": "Returns service status, env, version, and uptime info. Used by ALB target group, ECS healthcheck, and smoke tests.",
        "operationId": "health_v1_health_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Health V1 Health Get"
                }
              }
            }
          }
        }
      }
    },
    "/v1/health/deep": {
      "get": {
        "tags": [
          "health"
        ],
        "summary": "Protected deep health check",
        "operationId": "deep_health_v1_health_deep_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Deep Health V1 Health Deep Get"
                }
              }
            }
          }
        }
      }
    },
    "/v1/flow": {
      "get": {
        "tags": [
          "flow"
        ],
        "summary": "Fluxo da API",
        "description": "Retorna a descricao machine-readable do fluxo da API. Use para entender a sequencia de chamadas necessarias para completar uma antecipacao.",
        "operationId": "get_flow_v1_flow_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FlowResponse"
                }
              }
            }
          }
        }
      }
    },
    "/v1/auth/login": {
      "post": {
        "tags": [
          "auth"
        ],
        "summary": "Login",
        "operationId": "login_v1_auth_login_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/auth/me": {
      "get": {
        "tags": [
          "auth"
        ],
        "summary": "Me",
        "operationId": "me_v1_auth_me_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Me V1 Auth Me Get"
                }
              }
            }
          }
        }
      }
    },
    "/v1/auth/token": {
      "post": {
        "tags": [
          "auth"
        ],
        "summary": "Exchange M2M credentials for JWT",
        "description": "Client Credentials flow: exchange client_id + client_secret for a short-lived JWT RS256 token. Use the returned token in subsequent requests via Authorization: Bearer <token>. TTL: 15 minutes.",
        "operationId": "exchange_token_v1_auth_token_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TokenRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/originators/me": {
      "get": {
        "tags": [
          "originators"
        ],
        "summary": "Obter meu originador",
        "description": "Retorna dados do originador autenticado.",
        "operationId": "get_my_originator_v1_originators_me_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OriginatorMe"
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "originator:read"
            ]
          },
          {
            "ClientId": [],
            "ClientSecret": []
          }
        ]
      }
    },
    "/v1/stock": {
      "get": {
        "tags": [
          "stock"
        ],
        "summary": "Listar estoque de recebiveis",
        "description": "Retorna recebiveis registrados, filtrados por status, cedente ou sacado.",
        "operationId": "list_stock_items_v1_stock_get",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "assignor_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Assignor Id"
            }
          },
          {
            "name": "payer_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Payer Id"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StockListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "stock:read"
            ]
          },
          {
            "ClientId": [],
            "ClientSecret": []
          }
        ]
      },
      "post": {
        "tags": [
          "stock"
        ],
        "summary": "Registrar recebivel no estoque",
        "description": "Cadastra um recebivel (NF, duplicata, contrato) como potencial antecipacao.",
        "operationId": "register_stock_item_v1_stock_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StockItemCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StockItemCreateResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Python",
            "label": "SDK (zemo)",
            "source": "import zemo\n\n# Autenticacao M2M (o SDK troca as credenciais por um JWT de curta duracao)\nzemo.user = zemo.Originator(\n    client_id=\"zk_live_...\",\n    client_secret=\"sk_live_...\",\n    environment=\"production\",\n)\n\n# Registrar um recebivel no estoque\nitem = zemo.Stock.create(\n    assignor_id=\"<uuid-cedente>\",\n    payer_id=\"<uuid-sacado>\",\n    external_id=\"NF-001\",\n    gross_face_value=10000.00,\n    net_face_value=10000.00,\n    due_date=\"2026-08-15\",\n    pre_authorized=True,\n)\nprint(item.id)\n"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "stock:write"
            ]
          },
          {
            "ClientId": [],
            "ClientSecret": []
          }
        ]
      }
    },
    "/v1/stock/{item_id}": {
      "get": {
        "tags": [
          "stock"
        ],
        "summary": "Obter item do estoque",
        "operationId": "get_stock_item_v1_stock__item_id__get",
        "parameters": [
          {
            "name": "item_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Item Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StockItemDetail"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "stock:read"
            ]
          },
          {
            "ClientId": [],
            "ClientSecret": []
          }
        ]
      },
      "patch": {
        "tags": [
          "stock"
        ],
        "summary": "Editar item do estoque",
        "description": "Atualiza campos de um recebivel em status IN_STOCK. Envie apenas os campos que deseja alterar.",
        "operationId": "update_stock_item_v1_stock__item_id__patch",
        "parameters": [
          {
            "name": "item_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Item Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StockItemUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Update Stock Item V1 Stock  Item Id  Patch"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "stock:write"
            ]
          },
          {
            "ClientId": [],
            "ClientSecret": []
          }
        ]
      }
    },
    "/v1/stock/{item_id}/expire": {
      "post": {
        "tags": [
          "stock"
        ],
        "summary": "Expirar item do estoque",
        "operationId": "expire_stock_item_v1_stock__item_id__expire_post",
        "parameters": [
          {
            "name": "item_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Item Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StockItemStatusResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "stock:write"
            ]
          },
          {
            "ClientId": [],
            "ClientSecret": []
          }
        ]
      }
    },
    "/v1/stock/{item_id}/cancel": {
      "post": {
        "tags": [
          "stock"
        ],
        "summary": "Cancelar item do estoque",
        "operationId": "cancel_stock_item_v1_stock__item_id__cancel_post",
        "parameters": [
          {
            "name": "item_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Item Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StockItemStatusResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "stock:write"
            ]
          },
          {
            "ClientId": [],
            "ClientSecret": []
          }
        ]
      }
    },
    "/v1/stock/simulate-anticipation": {
      "post": {
        "tags": [
          "stock"
        ],
        "summary": "Simular antecipacao do estoque",
        "description": "Calcula o valor liquido, taxas e descontos de uma antecipacao a partir de itens ja registrados no estoque, **sem criar operacao**. Mesmo calculo do request-anticipation, mas read-only.",
        "operationId": "simulate_anticipation_from_stock_v1_stock_simulate_anticipation_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SimulateAnticipationFromStock"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StockSimulationResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Python",
            "label": "SDK (zemo)",
            "source": "import zemo\n\n# Autenticacao M2M (o SDK troca as credenciais por um JWT de curta duracao)\nzemo.user = zemo.Originator(\n    client_id=\"zk_live_...\",\n    client_secret=\"sk_live_...\",\n    environment=\"production\",\n)\n\n# Simular antecipacao de itens ja no estoque (read-only)\nsim = zemo.Stock.simulate_anticipation(\n    stock_item_ids=[\"<uuid-item-1>\"],\n    requested_advance_value=10000.00,\n    fees=zemo.Fees(monthly_rate_pct=3.5),\n)\nprint(sim.opr_liquid_value, sim.receivables)\n"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "simulation:create"
            ]
          },
          {
            "ClientId": [],
            "ClientSecret": []
          }
        ]
      }
    },
    "/v1/stock/request-anticipation": {
      "post": {
        "tags": [
          "stock"
        ],
        "summary": "Solicitar antecipacao do estoque",
        "description": "Selecione itens do estoque e solicite antecipacao. A operacao e criada automaticamente. Status WAITING_APPROVAL se precisa de aprovacao, APPROVED_DIRECT se auto-aprovado.",
        "operationId": "request_anticipation_from_stock_v1_stock_request_anticipation_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestAnticipationFromStock"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OperationCreateResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Python",
            "label": "SDK (zemo)",
            "source": "import zemo\n\n# Autenticacao M2M (o SDK troca as credenciais por um JWT de curta duracao)\nzemo.user = zemo.Originator(\n    client_id=\"zk_live_...\",\n    client_secret=\"sk_live_...\",\n    environment=\"production\",\n)\n\n# Criar operacao a partir de itens do estoque\nop = zemo.Stock.request_anticipation(\n    stock_item_ids=[\"<uuid-item-1>\"],\n    requested_advance_value=10000.00,\n    bank=zemo.BankData(use_document_pix=True),\n    fees=zemo.Fees(monthly_rate_pct=3.5),\n)\nprint(op.id, op.display_number)\n"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "operation:create"
            ]
          },
          {
            "ClientId": [],
            "ClientSecret": []
          }
        ]
      }
    },
    "/v1/simulate": {
      "post": {
        "tags": [
          "simulation"
        ],
        "summary": "Simular antecipacao",
        "description": "Calcula o valor liquido, taxas e descontos de uma antecipacao **sem criar nada no sistema**. Hierarquia completa de taxas: recebivel > operacao > cedente > sacado > policy originador. Para ativar o nivel do cedente, informe `assignor_document`. O nivel do sacado e resolvido automaticamente via `payer_document` de cada recebivel.",
        "operationId": "simulate_anticipation_v1_simulate_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SimulationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SimulationResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Python",
            "label": "SDK (zemo)",
            "source": "import zemo\n\n# Autenticacao M2M (o SDK troca as credenciais por um JWT de curta duracao)\nzemo.user = zemo.Originator(\n    client_id=\"zk_live_...\",\n    client_secret=\"sk_live_...\",\n    environment=\"production\",\n)\n\n# Simular antecipacao (read-only, nao cria nada)\nsim = zemo.Simulation.create(\n    receivables=[zemo.Receivable(\n        external_id=\"NF-001\",\n        payer_name=\"Sacado ABC SA\",\n        payer_document=\"98765432000188\",\n        net_face_value=10000.00,\n        requested_advance_value=10000.00,\n        due_date=\"2026-08-15\",\n    )],\n    fees=zemo.Fees(monthly_rate_pct=3.5),\n)\nprint(sim.opr_liquid_value)\n"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "simulation:create"
            ]
          },
          {
            "ClientId": [],
            "ClientSecret": []
          }
        ]
      }
    },
    "/v1/products": {
      "get": {
        "tags": [
          "products"
        ],
        "summary": "Listar produtos disponiveis",
        "description": "Lista os produtos financeiros disponiveis para o originador autenticado (read-only). Um registro por `product_id` — a policy ativa primaria ou mais recente. Use o `product_id` retornado em /simulate, /operations/direct, /stock/simulate-anticipation e /stock/request-anticipation.\n\nFiltros opcionais: `product_type`, `is_primary`. Paginacao: `limit` (1-200, default 50) e `offset`. O campo `total` traz a contagem antes da paginacao.",
        "operationId": "list_products_v1_products_get",
        "parameters": [
          {
            "name": "product_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filtra por tipo de produto (match exato)",
              "title": "Product Type"
            },
            "description": "Filtra por tipo de produto (match exato)"
          },
          {
            "name": "is_primary",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Filtra por produto/policy primaria",
              "title": "Is Primary"
            },
            "description": "Filtra por produto/policy primaria"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "description": "Tamanho da pagina (1-200)",
              "default": 50,
              "title": "Limit"
            },
            "description": "Tamanho da pagina (1-200)"
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "description": "Deslocamento para paginacao",
              "default": 0,
              "title": "Offset"
            },
            "description": "Deslocamento para paginacao"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProductsResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/operations": {
      "get": {
        "tags": [
          "operations"
        ],
        "summary": "Listar operacoes",
        "description": "Retorna operacoes filtradas por status, cedente ou situacao de retorno.",
        "operationId": "list_operations_v1_operations_get",
        "parameters": [
          {
            "name": "lifecycle_status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Lifecycle Status"
            }
          },
          {
            "name": "returning_status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Returning Status"
            }
          },
          {
            "name": "assignor_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Assignor Id"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OperationListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "operation:read"
            ]
          },
          {
            "ClientId": [],
            "ClientSecret": []
          }
        ]
      }
    },
    "/v1/operations/{operation_id}": {
      "get": {
        "tags": [
          "operations"
        ],
        "summary": "Obter operacao",
        "description": "Retorna detalhes da operacao incluindo taxas aplicadas e status.",
        "operationId": "get_operation_v1_operations__operation_id__get",
        "parameters": [
          {
            "name": "operation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Operation Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OperationDetail"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "operation:read"
            ]
          },
          {
            "ClientId": [],
            "ClientSecret": []
          }
        ]
      }
    },
    "/v1/operations/{operation_id}/titles": {
      "get": {
        "tags": [
          "operations"
        ],
        "summary": "Listar titulos da operacao",
        "description": "Retorna titulos com saldo devedor corrente.",
        "operationId": "list_operation_titles_v1_operations__operation_id__titles_get",
        "parameters": [
          {
            "name": "operation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Operation Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TitleListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "operation:read"
            ]
          },
          {
            "ClientId": [],
            "ClientSecret": []
          }
        ]
      }
    },
    "/v1/operations/{operation_id}/cancel": {
      "post": {
        "tags": [
          "operations"
        ],
        "summary": "Cancelar operacao",
        "description": "Cancela operacao em status WAITING_APPROVAL. Retorna 409 se ja aprovada.",
        "operationId": "cancel_operation_v1_operations__operation_id__cancel_post",
        "parameters": [
          {
            "name": "operation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Operation Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Cancel Operation V1 Operations  Operation Id  Cancel Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "operation:cancel"
            ]
          },
          {
            "ClientId": [],
            "ClientSecret": []
          }
        ]
      }
    },
    "/v1/operations/direct": {
      "post": {
        "tags": [
          "operations-direct",
          "operations-direct"
        ],
        "summary": "Criar operacao direta",
        "description": "Envia cedente, dados bancarios, recebiveis e taxas em uma unica chamada. O sistema registra cedente, sacado e conta automaticamente se nao existirem.",
        "operationId": "create_operation_direct_v1_operations_direct_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DirectOperationCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OperationCreateResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Python",
            "label": "SDK (zemo)",
            "source": "import zemo\n\n# Autenticacao M2M (o SDK troca as credenciais por um JWT de curta duracao)\nzemo.user = zemo.Originator(\n    client_id=\"zk_live_...\",\n    client_secret=\"sk_live_...\",\n    environment=\"production\",\n)\n\n# Criar operacao em uma unica chamada (registra cedente/sacado/banco)\nop = zemo.Operation.create_direct(\n    name=\"Cedente XPTO SA\",\n    type=\"J\",                 # \"F\" (CPF) ou \"J\" (CNPJ)\n    cnpj=\"12345678000199\",\n    email=\"financeiro@xpto.com\",\n    bank=zemo.BankData(use_document_pix=True),\n    receivables=[zemo.Receivable(\n        external_id=\"NF-001\",\n        payer_name=\"Sacado ABC SA\",\n        payer_document=\"98765432000188\",\n        net_face_value=10000.00,\n        requested_advance_value=10000.00,\n        due_date=\"2026-08-15\",\n    )],\n    fees=zemo.Fees(monthly_rate_pct=3.5),\n)\nprint(op.id, op.display_number)\n"
          }
        ],
        "security": [
          {
            "OAuth2": [
              "operation:create"
            ]
          },
          {
            "ClientId": [],
            "ClientSecret": []
          }
        ]
      }
    },
    "/v1/payers": {
      "get": {
        "tags": [
          "payers"
        ],
        "summary": "Listar sacados",
        "description": "Retorna sacados cadastrados do originador.",
        "operationId": "list_payers_v1_payers_get",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PayerListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "payer:read"
            ]
          },
          {
            "ClientId": [],
            "ClientSecret": []
          }
        ]
      },
      "post": {
        "tags": [
          "payers"
        ],
        "summary": "Cadastrar sacado",
        "description": "Registra um novo sacado vinculado ao originador.",
        "operationId": "create_payer_v1_payers_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PayerCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PayerCreateResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "payer:write"
            ]
          },
          {
            "ClientId": [],
            "ClientSecret": []
          }
        ]
      }
    },
    "/v1/payers/{payer_id}": {
      "get": {
        "tags": [
          "payers"
        ],
        "summary": "Obter sacado",
        "description": "Retorna detalhes do sacado incluindo endereco e configuracoes.",
        "operationId": "get_payer_v1_payers__payer_id__get",
        "parameters": [
          {
            "name": "payer_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Payer Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PayerDetail"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "payer:read"
            ]
          },
          {
            "ClientId": [],
            "ClientSecret": []
          }
        ]
      },
      "patch": {
        "tags": [
          "payers"
        ],
        "summary": "Atualizar sacado",
        "description": "Atualiza campos do sacado. Envia apenas os campos que deseja alterar.",
        "operationId": "update_payer_v1_payers__payer_id__patch",
        "parameters": [
          {
            "name": "payer_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Payer Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PayerUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PayerUpdateResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "payer:write"
            ]
          },
          {
            "ClientId": [],
            "ClientSecret": []
          }
        ]
      },
      "delete": {
        "tags": [
          "payers"
        ],
        "summary": "Arquivar sacado",
        "operationId": "archive_payer_v1_payers__payer_id__delete",
        "parameters": [
          {
            "name": "payer_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Payer Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "payer:write"
            ]
          },
          {
            "ClientId": [],
            "ClientSecret": []
          }
        ]
      }
    },
    "/v1/assignors": {
      "get": {
        "tags": [
          "assignors"
        ],
        "summary": "Listar cedentes",
        "description": "Retorna cedentes cadastrados, filtrados opcionalmente por sacado.",
        "operationId": "list_assignors_v1_assignors_get",
        "parameters": [
          {
            "name": "payer_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Payer Id"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssignorListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "assignor:read"
            ]
          },
          {
            "ClientId": [],
            "ClientSecret": []
          }
        ]
      },
      "post": {
        "tags": [
          "assignors"
        ],
        "summary": "Cadastrar cedente",
        "description": "Registra um novo cedente vinculado ao originador. Dedup por document: se CNPJ/CPF ja existe, retorna 200.",
        "operationId": "create_assignor_v1_assignors_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssignorCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Response Create Assignor V1 Assignors Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "assignor:write"
            ]
          },
          {
            "ClientId": [],
            "ClientSecret": []
          }
        ]
      }
    },
    "/v1/assignors/{assignor_id}": {
      "get": {
        "tags": [
          "assignors"
        ],
        "summary": "Obter cedente",
        "description": "Retorna detalhes do cedente incluindo dados de contato e conta bancaria.",
        "operationId": "get_assignor_v1_assignors__assignor_id__get",
        "parameters": [
          {
            "name": "assignor_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Assignor Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssignorDetail"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "assignor:read"
            ]
          },
          {
            "ClientId": [],
            "ClientSecret": []
          }
        ]
      },
      "patch": {
        "tags": [
          "assignors"
        ],
        "summary": "Atualizar cedente",
        "description": "Atualiza campos do cedente. Envia apenas os campos que deseja alterar.",
        "operationId": "update_assignor_v1_assignors__assignor_id__patch",
        "parameters": [
          {
            "name": "assignor_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Assignor Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssignorUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Update Assignor V1 Assignors  Assignor Id  Patch"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "assignor:write"
            ]
          },
          {
            "ClientId": [],
            "ClientSecret": []
          }
        ]
      }
    },
    "/v1/assignors/{assignor_id}/outstanding-balance": {
      "get": {
        "tags": [
          "assignors"
        ],
        "summary": "Saldo em aberto do cedente",
        "description": "Retorna o saldo devedor total do cedente, separado em atrasado e a vencer. Inclui detalhes dos titulos em atraso.",
        "operationId": "get_assignor_outstanding_balance_v1_assignors__assignor_id__outstanding_balance_get",
        "parameters": [
          {
            "name": "assignor_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Assignor Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Assignor Outstanding Balance V1 Assignors  Assignor Id  Outstanding Balance Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "assignor:read"
            ]
          },
          {
            "ClientId": [],
            "ClientSecret": []
          }
        ]
      }
    },
    "/v1/bank-accounts": {
      "get": {
        "tags": [
          "bank-accounts"
        ],
        "summary": "List Bank Accounts",
        "description": "List bank accounts for assignors belonging to this originator.",
        "operationId": "list_bank_accounts_v1_bank_accounts_get",
        "parameters": [
          {
            "name": "owner_assignor_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Owner Assignor Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Bank Accounts V1 Bank Accounts Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "bank-account:read"
            ]
          },
          {
            "ClientId": [],
            "ClientSecret": []
          }
        ]
      }
    },
    "/v1/titles": {
      "get": {
        "tags": [
          "titles"
        ],
        "summary": "List Titles",
        "operationId": "list_titles_v1_titles_get",
        "parameters": [
          {
            "name": "operation_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Operation Id"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "payer_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Payer Id"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TitleListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "title:read"
            ]
          },
          {
            "ClientId": [],
            "ClientSecret": []
          }
        ]
      }
    },
    "/v1/titles/{title_id}": {
      "get": {
        "tags": [
          "titles"
        ],
        "summary": "Get Title",
        "operationId": "get_title_v1_titles__title_id__get",
        "parameters": [
          {
            "name": "title_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Title Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TitleDetail"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "title:read"
            ]
          },
          {
            "ClientId": [],
            "ClientSecret": []
          }
        ]
      }
    },
    "/v1/titles/{title_id}/balance-events": {
      "get": {
        "tags": [
          "titles"
        ],
        "summary": "List Balance Events",
        "operationId": "list_balance_events_v1_titles__title_id__balance_events_get",
        "parameters": [
          {
            "name": "title_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Title Id"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BalanceEventListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "title:read"
            ]
          },
          {
            "ClientId": [],
            "ClientSecret": []
          }
        ]
      }
    },
    "/v1/assignor-payables": {
      "get": {
        "tags": [
          "assignor-payables"
        ],
        "summary": "List Payables",
        "operationId": "list_payables_v1_assignor_payables_get",
        "parameters": [
          {
            "name": "assignor_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Assignor Id"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Payables V1 Assignor Payables Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "assignor-payables"
        ],
        "summary": "Create Payable",
        "operationId": "create_payable_v1_assignor_payables_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PayableCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Create Payable V1 Assignor Payables Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/assignor-payables/{payable_id}": {
      "get": {
        "tags": [
          "assignor-payables"
        ],
        "summary": "Get Payable",
        "operationId": "get_payable_v1_assignor_payables__payable_id__get",
        "parameters": [
          {
            "name": "payable_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Payable Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Get Payable V1 Assignor Payables  Payable Id  Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/assignor-payables/{payable_id}/payments": {
      "get": {
        "tags": [
          "assignor-payables"
        ],
        "summary": "List Payable Payments",
        "operationId": "list_payable_payments_v1_assignor_payables__payable_id__payments_get",
        "parameters": [
          {
            "name": "payable_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Payable Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Payable Payments V1 Assignor Payables  Payable Id  Payments Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "assignor-payables"
        ],
        "summary": "Record Payable Payment",
        "operationId": "record_payable_payment_v1_assignor_payables__payable_id__payments_post",
        "parameters": [
          {
            "name": "payable_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Payable Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PayablePaymentRecord"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Record Payable Payment V1 Assignor Payables  Payable Id  Payments Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/assignor-payables/{payable_id}/write-off": {
      "post": {
        "tags": [
          "assignor-payables"
        ],
        "summary": "Write Off Payable",
        "operationId": "write_off_payable_v1_assignor_payables__payable_id__write_off_post",
        "parameters": [
          {
            "name": "payable_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Payable Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Write Off Payable V1 Assignor Payables  Payable Id  Write Off Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/discount-credits": {
      "get": {
        "tags": [
          "discount-credits"
        ],
        "summary": "List Discount Credits",
        "operationId": "list_discount_credits_v1_discount_credits_get",
        "parameters": [
          {
            "name": "assignor_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Assignor Id"
            }
          },
          {
            "name": "active_only",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": true,
              "title": "Active Only"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Discount Credits V1 Discount Credits Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "discount-credits"
        ],
        "summary": "Create Discount Credit",
        "operationId": "create_discount_credit_v1_discount_credits_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DiscountCreditCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response Create Discount Credit V1 Discount Credits Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/discount-credits/{credit_id}/consumptions": {
      "get": {
        "tags": [
          "discount-credits"
        ],
        "summary": "List Credit Consumptions",
        "operationId": "list_credit_consumptions_v1_discount_credits__credit_id__consumptions_get",
        "parameters": [
          {
            "name": "credit_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Credit Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true,
                  "title": "Response List Credit Consumptions V1 Discount Credits  Credit Id  Consumptions Get"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/v1/webhooks": {
      "get": {
        "tags": [
          "webhooks"
        ],
        "summary": "Listar webhooks",
        "description": "Retorna webhooks cadastrados pelo originador.",
        "operationId": "list_webhooks_v1_webhooks_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookListResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "webhook:read"
            ]
          },
          {
            "ClientId": [],
            "ClientSecret": []
          }
        ]
      },
      "post": {
        "tags": [
          "webhooks"
        ],
        "summary": "Registrar webhook",
        "description": "Cadastra um webhook para receber notificacoes. O hmac_secret e exibido apenas nesta resposta.",
        "operationId": "create_webhook_v1_webhooks_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookCreateResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "webhook:write"
            ]
          },
          {
            "ClientId": [],
            "ClientSecret": []
          }
        ]
      }
    },
    "/v1/webhooks/{webhook_id}/deliveries": {
      "get": {
        "tags": [
          "webhooks"
        ],
        "summary": "Listar entregas do webhook",
        "description": "Retorna historico de entregas (tentativas) de um webhook.",
        "operationId": "list_deliveries_v1_webhooks__webhook_id__deliveries_get",
        "parameters": [
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Webhook Id"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 200,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDeliveryListResponse"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "webhook:read"
            ]
          },
          {
            "ClientId": [],
            "ClientSecret": []
          }
        ]
      }
    },
    "/v1/webhooks/{webhook_id}": {
      "delete": {
        "tags": [
          "webhooks"
        ],
        "summary": "Arquivar webhook",
        "operationId": "archive_webhook_v1_webhooks__webhook_id__delete",
        "parameters": [
          {
            "name": "webhook_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Webhook Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "OAuth2": [
              "webhook:write"
            ]
          },
          {
            "ClientId": [],
            "ClientSecret": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "Address": {
        "properties": {
          "zip_code": {
            "type": "string",
            "title": "Zip Code",
            "description": "CEP (8 digitos)"
          },
          "street": {
            "type": "string",
            "title": "Street",
            "description": "Logradouro"
          },
          "number": {
            "type": "string",
            "title": "Number",
            "description": "Numero"
          },
          "complement": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Complement"
          },
          "neighborhood": {
            "type": "string",
            "title": "Neighborhood",
            "description": "Bairro"
          },
          "city": {
            "type": "string",
            "title": "City",
            "description": "Cidade"
          },
          "state": {
            "type": "string",
            "title": "State",
            "description": "UF (2 letras)"
          },
          "country": {
            "type": "string",
            "title": "Country",
            "default": "Brasil"
          }
        },
        "type": "object",
        "required": [
          "zip_code",
          "street",
          "number",
          "neighborhood",
          "city",
          "state"
        ],
        "title": "Address"
      },
      "AssignorCreate": {
        "properties": {
          "document": {
            "type": "string",
            "maxLength": 14,
            "minLength": 11,
            "title": "Document",
            "description": "CPF (11) ou CNPJ (14)"
          },
          "legal_name": {
            "type": "string",
            "maxLength": 150,
            "minLength": 2,
            "title": "Legal Name",
            "description": "Razao social do cedente"
          },
          "type": {
            "type": "string",
            "title": "Type",
            "description": "'F' (pessoa fisica) ou 'J' (juridica)",
            "default": "J"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email",
            "description": "Email do cedente"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone",
            "description": "Telefone"
          },
          "trade_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trade Name",
            "description": "Nome fantasia"
          },
          "payer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payer Id",
            "description": "ID do sacado vinculado (opcional)"
          }
        },
        "type": "object",
        "required": [
          "document",
          "legal_name"
        ],
        "title": "AssignorCreate"
      },
      "AssignorDetail": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "legal_name": {
            "type": "string",
            "title": "Legal Name"
          },
          "payer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payer Id"
          },
          "type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Type"
          },
          "document_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Document Hash"
          },
          "trade_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trade Name"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "City"
          },
          "state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "State"
          },
          "transfer_method": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Transfer Method"
          },
          "data_confirmed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Data Confirmed"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "originator_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Originator Id"
          },
          "primary_bank_account_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Primary Bank Account Id"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "legal_name"
        ],
        "title": "AssignorDetail"
      },
      "AssignorListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AssignorSummary"
            },
            "type": "array",
            "title": "Items"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total"
        ],
        "title": "AssignorListResponse"
      },
      "AssignorSummary": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "legal_name": {
            "type": "string",
            "title": "Legal Name"
          },
          "payer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payer Id"
          },
          "type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Type"
          },
          "document_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Document Hash"
          },
          "trade_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trade Name"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "City"
          },
          "state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "State"
          },
          "transfer_method": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Transfer Method"
          },
          "data_confirmed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Data Confirmed"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "legal_name"
        ],
        "title": "AssignorSummary"
      },
      "AssignorUpdate": {
        "properties": {
          "legal_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Legal Name"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "trade_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trade Name"
          },
          "payer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payer Id",
            "description": "Vincular sacado ao cedente"
          }
        },
        "type": "object",
        "title": "AssignorUpdate"
      },
      "BalanceEvent": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "event_type": {
            "type": "string",
            "title": "Event Type"
          },
          "event_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Event At"
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Effective At"
          },
          "payment_delta_brl": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Delta Brl"
          },
          "interest_delta_brl": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Interest Delta Brl"
          },
          "late_fee_delta_brl": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Late Fee Delta Brl"
          },
          "outstanding_before_brl": {
            "type": "string",
            "title": "Outstanding Before Brl"
          },
          "outstanding_after_brl": {
            "type": "string",
            "title": "Outstanding After Brl"
          },
          "triggered_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Triggered By"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          }
        },
        "type": "object",
        "required": [
          "id",
          "event_type",
          "outstanding_before_brl",
          "outstanding_after_brl"
        ],
        "title": "BalanceEvent"
      },
      "BalanceEventListResponse": {
        "properties": {
          "events": {
            "items": {
              "$ref": "#/components/schemas/BalanceEvent"
            },
            "type": "array",
            "title": "Events"
          }
        },
        "type": "object",
        "required": [
          "events"
        ],
        "title": "BalanceEventListResponse"
      },
      "BankData": {
        "properties": {
          "use_document_pix": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Use Document Pix",
            "description": "Pagamento via PIX em chave PIX do CPF/CNPJ, com CPF (type=F) ou CNPJ (type=J) do cedente."
          },
          "code": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 3,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Code",
            "description": "Codigo do banco (3 digitos). Obrigatorio para conta bancaria.",
            "examples": [
              "341"
            ]
          },
          "agency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agency",
            "description": "Agencia. Obrigatorio para conta bancaria.",
            "examples": [
              "1234"
            ]
          },
          "account": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account",
            "description": "Numero da conta com digito. Obrigatorio para conta bancaria.",
            "examples": [
              "56789-0"
            ]
          },
          "type": {
            "type": "string",
            "title": "Type",
            "description": "CC (corrente), CP (poupanca), SA (salario)",
            "default": "CC",
            "examples": [
              "CC"
            ]
          }
        },
        "type": "object",
        "title": "BankData"
      },
      "DecimalRange": {
        "properties": {
          "min": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Min",
            "description": "Limite inferior (string decimal)"
          },
          "max": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max",
            "description": "Limite superior (string decimal)"
          }
        },
        "type": "object",
        "title": "DecimalRange"
      },
      "DirectOperationCreate": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 150,
            "minLength": 2,
            "title": "Name",
            "description": "Nome ou razao social do cedente",
            "examples": [
              "Empresa ABC Ltda"
            ]
          },
          "type": {
            "type": "string",
            "title": "Type",
            "description": "Tipo de pessoa: 'F' (fisica/CPF) ou 'J' (juridica/CNPJ)",
            "examples": [
              "J"
            ]
          },
          "cpf": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cpf",
            "description": "CPF do cedente (11 digitos). Obrigatorio se type='F'.",
            "examples": [
              "12345678901"
            ]
          },
          "cnpj": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cnpj",
            "description": "CNPJ do cedente (14 digitos). Obrigatorio se type='J'.",
            "examples": [
              "12345678000199"
            ]
          },
          "trade_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trade Name",
            "description": "Nome fantasia do cedente (opcional)"
          },
          "email": {
            "type": "string",
            "title": "Email",
            "description": "Email do cedente para notificacoes e contrato",
            "examples": [
              "cedente@empresa.com.br"
            ]
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone",
            "description": "Telefone do cedente (opcional)",
            "examples": [
              "11999998888"
            ]
          },
          "bank": {
            "$ref": "#/components/schemas/BankData",
            "description": "Dados de pagamento — obrigatorio. Enviar { use_document_pix: true } para PIX via CPF/CNPJ do cedente, ou { code, agency, account, type } para conta bancaria."
          },
          "address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Address"
              },
              {
                "type": "null"
              }
            ],
            "description": "Endereco do cedente (opcional)"
          },
          "fees": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Fees"
              },
              {
                "type": "null"
              }
            ],
            "description": "Taxas da operacao. Se omitido, usa hierarquia: cedente > sacado > policy do originador."
          },
          "taxes": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Fees"
              },
              {
                "type": "null"
              }
            ],
            "description": "Alias para 'fees' (backward compatibility com V1)."
          },
          "product_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Id",
            "description": "ID do produto financeiro (opaco, definido pelo Backoffice). Filtra as policies de taxa por produto.",
            "examples": [
              "b3f1c2a4-5d6e-7f80-9a1b-2c3d4e5f6a7b"
            ]
          },
          "policy_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Policy Id",
            "description": "ID da policy do originador (override). Se informado, substitui a policy principal na resolucao.",
            "examples": [
              "01970dc5-1234-7000-8000-000000000000"
            ]
          },
          "receivables": {
            "items": {
              "$ref": "#/components/schemas/Receivable"
            },
            "type": "array",
            "minItems": 1,
            "title": "Receivables",
            "description": "Lista de recebiveis a antecipar."
          }
        },
        "type": "object",
        "required": [
          "name",
          "type",
          "email",
          "bank",
          "receivables"
        ],
        "title": "DirectOperationCreate"
      },
      "DiscountCreditCreate": {
        "properties": {
          "assignor_id": {
            "type": "string",
            "title": "Assignor Id"
          },
          "source_kind": {
            "type": "string",
            "maxLength": 40,
            "minLength": 2,
            "title": "Source Kind"
          },
          "original_amount_brl": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,16}|(?=[\\d.]{1,19}0*$)\\d{0,16}\\.\\d{0,2}0*$)"
              }
            ],
            "title": "Original Amount Brl"
          },
          "reason": {
            "type": "string",
            "maxLength": 500,
            "minLength": 3,
            "title": "Reason"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          }
        },
        "type": "object",
        "required": [
          "assignor_id",
          "source_kind",
          "original_amount_brl",
          "reason"
        ],
        "title": "DiscountCreditCreate"
      },
      "Fees": {
        "properties": {
          "monthly_rate_pct": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Monthly Rate Pct",
            "description": "Taxa de juros mensal (%), aplicada pro-rata aos dias ate o vencimento. Cumulativa com discount_pct e fixed_discount_brl.",
            "examples": [
              3.5
            ]
          },
          "discount_pct": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Discount Pct",
            "description": "Desagio fixo (%) sobre o valor, independente do prazo. Cumulativa com monthly_rate_pct e fixed_discount_brl.",
            "examples": [
              2.0
            ]
          },
          "fixed_discount_brl": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fixed Discount Brl",
            "description": "Desconto nominal fixo em reais por recebivel. Cumulativo com monthly_rate_pct e discount_pct.",
            "examples": [
              150.0
            ]
          },
          "floating_days": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Floating Days",
            "description": "Dias de carencia (float) descontados do prazo antes de calcular o monthly_rate_pct. Default: usa valor da policy.",
            "examples": [
              2
            ]
          },
          "total_liquid_value_brl": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Liquid Value Brl",
            "description": "Valor liquido total desejado para TODA a operacao. O desconto e distribuido proporcionalmente ao face value de cada recebivel. MUTUAMENTE EXCLUSIVO com monthly_rate_pct, discount_pct e fixed_discount_brl. O CET resultante sera validado contra os limites da policy do originador.",
            "examples": [
              47500.0
            ]
          }
        },
        "type": "object",
        "title": "Fees",
        "description": "Taxas aplicadas a todos os recebiveis que NAO tiverem override individual.\n\nHierarquia de resolucao (por recebivel):\n  1. Taxa do recebivel (campos acima no Receivable)\n  2. Taxa da operacao (este objeto Fees)\n  3. Taxa padrao do cedente (assignor fee profile, gerenciado pelo Backoffice)\n  4. Taxa padrao do sacado (payer fee profile, gerenciado pelo Backoffice)\n  5. Taxa padrao do originador (originator policy, gerenciada pelo Backoffice)\n\nAs 3 modalidades de taxa sao CUMULATIVAS — podem ser combinadas."
      },
      "FlowMode": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Nome do modo de operacao"
          },
          "description": {
            "type": "string",
            "title": "Description",
            "description": "Descricao do modo"
          },
          "steps": {
            "items": {
              "$ref": "#/components/schemas/FlowStep"
            },
            "type": "array",
            "title": "Steps",
            "description": "Etapas do fluxo"
          }
        },
        "type": "object",
        "required": [
          "name",
          "description",
          "steps"
        ],
        "title": "FlowMode"
      },
      "FlowResponse": {
        "properties": {
          "api_version": {
            "type": "string",
            "title": "Api Version",
            "description": "Versao da API",
            "examples": [
              "1.0.0"
            ]
          },
          "modes": {
            "items": {
              "$ref": "#/components/schemas/FlowMode"
            },
            "type": "array",
            "title": "Modes",
            "description": "Modos de operacao disponiveis"
          },
          "statuses": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Statuses",
            "description": "Status possiveis de operacao e suas descricoes"
          }
        },
        "type": "object",
        "required": [
          "api_version",
          "modes",
          "statuses"
        ],
        "title": "FlowResponse"
      },
      "FlowStep": {
        "properties": {
          "step": {
            "type": "integer",
            "title": "Step",
            "description": "Numero da etapa"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Nome da etapa"
          },
          "description": {
            "type": "string",
            "title": "Description",
            "description": "O que acontece nesta etapa"
          },
          "endpoint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Endpoint",
            "description": "Endpoint da API (null = automatico)"
          },
          "method": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Method",
            "description": "HTTP method"
          },
          "required": {
            "type": "boolean",
            "title": "Required",
            "description": "Obrigatorio no fluxo"
          },
          "next_steps": {
            "items": {
              "type": "integer"
            },
            "type": "array",
            "title": "Next Steps",
            "description": "Proximas etapas possiveis"
          }
        },
        "type": "object",
        "required": [
          "step",
          "name",
          "description",
          "endpoint",
          "method",
          "required",
          "next_steps"
        ],
        "title": "FlowStep"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "IntRange": {
        "properties": {
          "min": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Min"
          },
          "max": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max"
          }
        },
        "type": "object",
        "title": "IntRange"
      },
      "LoginRequest": {
        "properties": {
          "email": {
            "type": "string",
            "maxLength": 254,
            "minLength": 5,
            "title": "Email"
          },
          "password": {
            "type": "string",
            "maxLength": 256,
            "minLength": 8,
            "title": "Password"
          }
        },
        "type": "object",
        "required": [
          "email",
          "password"
        ],
        "title": "LoginRequest"
      },
      "LoginResponse": {
        "properties": {
          "access_token": {
            "type": "string",
            "title": "Access Token"
          },
          "token_type": {
            "type": "string",
            "title": "Token Type",
            "default": "bearer"
          },
          "user": {
            "additionalProperties": true,
            "type": "object",
            "title": "User"
          }
        },
        "type": "object",
        "required": [
          "access_token",
          "user"
        ],
        "title": "LoginResponse"
      },
      "OperationCreateResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "display_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Number"
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Status"
          },
          "lifecycle_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lifecycle Status"
          },
          "opr_gross_face_value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Opr Gross Face Value"
          },
          "opr_net_face_value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Opr Net Face Value"
          },
          "opr_discounted_value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Opr Discounted Value"
          },
          "opr_liquid_value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Opr Liquid Value"
          },
          "opr_net_liquid_value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Opr Net Liquid Value"
          },
          "other_debt_discounts": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Other Debt Discounts"
          },
          "average_days_in_advance": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Average Days In Advance"
          },
          "floating_days": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Floating Days"
          },
          "product_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Id"
          },
          "needs_backoffice_approval": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Needs Backoffice Approval"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "titles": {
            "anyOf": [
              {
                "items": {
                  "additionalProperties": true,
                  "type": "object"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Titles"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "id"
        ],
        "title": "OperationCreateResponse",
        "description": "Resposta dos endpoints de criacao de operacao.\n\nCobre `POST /v1/operations/direct` e `POST /v1/stock/request-anticipation`.\n`extra=\"allow\"` preserva campos adicionais (ex.: contract_details, fee_hierarchy)."
      },
      "OperationDetail": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "display_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Number"
          },
          "assignor_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assignor Id"
          },
          "opr_gross_face_value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Opr Gross Face Value"
          },
          "opr_liquid_value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Opr Liquid Value"
          },
          "opr_discounted_value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Opr Discounted Value"
          },
          "total_tac": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Tac"
          },
          "total_effective_cost_pct": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Effective Cost Pct"
          },
          "lifecycle_status": {
            "type": "string",
            "title": "Lifecycle Status"
          },
          "returning_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Returning Status"
          },
          "contract_signed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contract Signed At"
          },
          "payment_sent_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Sent At"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "originator_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Originator Id"
          },
          "applied_fees_snapshot": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ],
            "title": "Applied Fees Snapshot"
          },
          "total_fixed_tac": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Fixed Tac"
          },
          "total_variable_tac": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Variable Tac"
          },
          "pix_transfer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pix Transfer Id"
          },
          "payment_completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Completed At"
          },
          "approved_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Approved At"
          },
          "cancelled_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cancelled At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "lifecycle_status",
          "created_at"
        ],
        "title": "OperationDetail"
      },
      "OperationListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/OperationSummary"
            },
            "type": "array",
            "title": "Items"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total"
        ],
        "title": "OperationListResponse"
      },
      "OperationSummary": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "display_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Number"
          },
          "assignor_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assignor Id"
          },
          "opr_gross_face_value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Opr Gross Face Value"
          },
          "opr_liquid_value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Opr Liquid Value"
          },
          "opr_discounted_value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Opr Discounted Value"
          },
          "total_tac": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Tac"
          },
          "total_effective_cost_pct": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Effective Cost Pct"
          },
          "lifecycle_status": {
            "type": "string",
            "title": "Lifecycle Status"
          },
          "returning_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Returning Status"
          },
          "contract_signed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contract Signed At"
          },
          "payment_sent_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Sent At"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "lifecycle_status",
          "created_at"
        ],
        "title": "OperationSummary"
      },
      "OriginatorMe": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "cnpj": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cnpj"
          },
          "legal_name": {
            "type": "string",
            "title": "Legal Name"
          },
          "trade_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trade Name"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "kind": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Kind"
          },
          "primary_backing_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Primary Backing Type"
          },
          "liquidation_method": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Liquidation Method"
          },
          "brand_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Brand Name"
          },
          "active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Active"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "legal_name"
        ],
        "title": "OriginatorMe"
      },
      "PayableCreate": {
        "properties": {
          "assignor_id": {
            "type": "string",
            "title": "Assignor Id"
          },
          "counterparty_kind": {
            "type": "string",
            "title": "Counterparty Kind",
            "default": "ORIGINATOR_DIRECT"
          },
          "counterparty_payer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Counterparty Payer Id"
          },
          "kind": {
            "type": "string",
            "title": "Kind"
          },
          "originating_title_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Originating Title Id"
          },
          "originating_operation_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Originating Operation Id"
          },
          "amount_brl": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,16}|(?=[\\d.]{1,19}0*$)\\d{0,16}\\.\\d{0,2}0*$)"
              }
            ],
            "title": "Amount Brl"
          },
          "reason": {
            "type": "string",
            "maxLength": 500,
            "minLength": 3,
            "title": "Reason"
          },
          "due_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Due Date"
          }
        },
        "type": "object",
        "required": [
          "assignor_id",
          "kind",
          "amount_brl",
          "reason"
        ],
        "title": "PayableCreate"
      },
      "PayablePaymentRecord": {
        "properties": {
          "source": {
            "type": "string",
            "title": "Source"
          },
          "paid_amount_brl": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,16}|(?=[\\d.]{1,19}0*$)\\d{0,16}\\.\\d{0,2}0*$)"
              }
            ],
            "title": "Paid Amount Brl"
          },
          "capital_inflow_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Capital Inflow Id"
          },
          "offsetting_operation_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Offsetting Operation Id"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason"
          }
        },
        "type": "object",
        "required": [
          "source",
          "paid_amount_brl"
        ],
        "title": "PayablePaymentRecord"
      },
      "PayerCreate": {
        "properties": {
          "cnpj": {
            "type": "string",
            "maxLength": 14,
            "minLength": 14,
            "title": "Cnpj"
          },
          "legal_name": {
            "type": "string",
            "maxLength": 150,
            "minLength": 2,
            "title": "Legal Name"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "zip_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Zip Code"
          },
          "street": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Street"
          },
          "street_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Street Number"
          },
          "complement": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Complement"
          },
          "neighborhood": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Neighborhood"
          },
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "City"
          },
          "state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "State"
          }
        },
        "type": "object",
        "required": [
          "cnpj",
          "legal_name"
        ],
        "title": "PayerCreate"
      },
      "PayerCreateResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "cnpj": {
            "type": "string",
            "title": "Cnpj"
          },
          "legal_name": {
            "type": "string",
            "title": "Legal Name"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "cnpj",
          "legal_name",
          "created_at"
        ],
        "title": "PayerCreateResponse"
      },
      "PayerDetail": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "legal_name": {
            "type": "string",
            "title": "Legal Name"
          },
          "cnpj": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cnpj"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "City"
          },
          "state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "State"
          },
          "approve_automatic": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Approve Automatic"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "originator_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Originator Id"
          },
          "zip_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Zip Code"
          },
          "street": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Street"
          },
          "street_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Street Number"
          },
          "complement": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Complement"
          },
          "neighborhood": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Neighborhood"
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Country"
          },
          "override_default_tax_pct": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Override Default Tax Pct"
          },
          "override_fixed_tac_brl": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Override Fixed Tac Brl"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "legal_name"
        ],
        "title": "PayerDetail"
      },
      "PayerListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/PayerSummary"
            },
            "type": "array",
            "title": "Items"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total"
        ],
        "title": "PayerListResponse"
      },
      "PayerSummary": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "legal_name": {
            "type": "string",
            "title": "Legal Name"
          },
          "cnpj": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Cnpj"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "City"
          },
          "state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "State"
          },
          "approve_automatic": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Approve Automatic"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "legal_name"
        ],
        "title": "PayerSummary"
      },
      "PayerUpdate": {
        "properties": {
          "legal_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Legal Name"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Phone"
          },
          "zip_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Zip Code"
          },
          "street": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Street"
          },
          "street_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Street Number"
          },
          "complement": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Complement"
          },
          "neighborhood": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Neighborhood"
          },
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "City"
          },
          "state": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "State"
          },
          "approve_automatic": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Approve Automatic"
          }
        },
        "type": "object",
        "title": "PayerUpdate"
      },
      "PayerUpdateResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "legal_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Legal Name"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "id"
        ],
        "title": "PayerUpdateResponse"
      },
      "PolicyUsedResponse": {
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Id",
            "description": "ID da policy usada"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "Nome da policy"
          },
          "source": {
            "type": "string",
            "title": "Source",
            "description": "Fonte: assignor, payer, policy, receivable, operation"
          },
          "monthly_rate_pct": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Monthly Rate Pct",
            "description": "Taxa mensal aplicada"
          },
          "rate_from_schedule": {
            "type": "boolean",
            "title": "Rate From Schedule",
            "description": "Se a taxa veio do rate_schedule (escalonada por PMP)",
            "default": false
          },
          "schedule_day_used": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Schedule Day Used",
            "description": "Dia do PMP usado no rate_schedule"
          }
        },
        "type": "object",
        "required": [
          "source"
        ],
        "title": "PolicyUsedResponse"
      },
      "Product": {
        "properties": {
          "product_id": {
            "type": "string",
            "title": "Product Id",
            "description": "ID do produto a usar em product_id nas rotas de operacao/simulacao"
          },
          "product_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Type",
            "description": "Tipo/risco do produto (metadata do BO)"
          },
          "policy_slug": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Policy Slug",
            "description": "ID logico estavel da policy (entre versoes)"
          },
          "policy_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Policy Name"
          },
          "policy_version": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Policy Version"
          },
          "is_primary": {
            "type": "boolean",
            "title": "Is Primary",
            "description": "Produto/policy padrao do originador",
            "default": false
          },
          "monthly_rate_pct": {
            "$ref": "#/components/schemas/DecimalRange",
            "description": "Faixa permitida de juros mensal (a.m.)"
          },
          "term_days": {
            "$ref": "#/components/schemas/IntRange",
            "description": "Faixa permitida de prazo (dias)"
          },
          "operation_value_brl": {
            "$ref": "#/components/schemas/DecimalRange",
            "description": "Faixa permitida de valor da operacao (BRL)"
          },
          "assigned_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assigned At",
            "description": "Quando a policy foi atribuida (ISO-8601)"
          }
        },
        "type": "object",
        "required": [
          "product_id",
          "monthly_rate_pct",
          "term_days",
          "operation_value_brl"
        ],
        "title": "Product"
      },
      "ProductsResponse": {
        "properties": {
          "products": {
            "items": {
              "$ref": "#/components/schemas/Product"
            },
            "type": "array",
            "title": "Products"
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total de produtos que casam com os filtros (antes da paginacao)"
          },
          "limit": {
            "type": "integer",
            "title": "Limit",
            "description": "Tamanho da pagina aplicado"
          },
          "offset": {
            "type": "integer",
            "title": "Offset",
            "description": "Deslocamento aplicado"
          }
        },
        "type": "object",
        "required": [
          "products",
          "total",
          "limit",
          "offset"
        ],
        "title": "ProductsResponse"
      },
      "Receivable": {
        "properties": {
          "external_id": {
            "type": "string",
            "title": "External Id",
            "description": "Identificador unico do recebivel no sistema do originador (ex: numero da NF). Deve ser unico por operacao.",
            "examples": [
              "NF-2026-001"
            ]
          },
          "identifier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Identifier",
            "description": "Identificador interno opcional para referencia cruzada (ex: ID no ERP do cedente).",
            "examples": [
              "REC-001"
            ]
          },
          "payer_name": {
            "type": "string",
            "title": "Payer Name",
            "description": "Nome ou razao social do sacado (devedor do recebivel)",
            "examples": [
              "Empresa XYZ Ltda"
            ]
          },
          "payer_document": {
            "type": "string",
            "title": "Payer Document",
            "description": "CPF (11 digitos) ou CNPJ (14 digitos) do sacado",
            "examples": [
              "12345678000199"
            ]
          },
          "gross_face_value": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gross Face Value",
            "description": "Valor bruto do lastro/recebivel (ex: valor total da NF-e antes de deducoes). Opcional — se omitido, assume o mesmo valor de net_face_value.",
            "examples": [
              12000.0
            ]
          },
          "net_face_value": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              }
            ],
            "title": "Net Face Value",
            "description": "Valor liquido do lastro/recebivel (ex: valor da NF-e apos deducoes). requested_advance_value nao pode exceder este valor.",
            "examples": [
              10000.0
            ]
          },
          "requested_advance_value": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              }
            ],
            "title": "Requested Advance Value",
            "description": "Valor que esta sendo antecipado deste recebivel (em BRL). Deve ser <= net_face_value. Se igual, antecipacao de 100%. Se menor, antecipacao parcial (restante permanece disponivel no estoque).",
            "examples": [
              10000.0
            ]
          },
          "due_date": {
            "type": "string",
            "title": "Due Date",
            "description": "Data de vencimento do recebivel (YYYY-MM-DD). Quanto mais distante, maior o desconto por antecipacao.",
            "examples": [
              "2026-08-15"
            ]
          },
          "monthly_rate_pct": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Monthly Rate Pct",
            "description": "Taxa de juros mensal (%), aplicada pro-rata aos dias ate o vencimento. Ex: 3.5 = 3.5% a.m. Um recebivel de R$10.000 com vencimento em 60 dias: desconto = 10000 * 3.5/100 * 60/365 = R$575,34. Pode ser combinada com discount_pct e fixed_discount_brl (cumulativo).",
            "examples": [
              3.5
            ]
          },
          "discount_pct": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Discount Pct",
            "description": "Desagio fixo (%) sobre o valor antecipado, independente do prazo. Ex: 2.0 = 2% de desconto. R$10.000 * 2% = R$200 de desconto. Util quando a taxa nao depende do tempo ate o vencimento.",
            "examples": [
              2.0
            ]
          },
          "fixed_discount_brl": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fixed Discount Brl",
            "description": "Desconto nominal fixo em reais, aplicado diretamente. Ex: 500.00 = R$500 de desconto, independente do valor ou prazo do recebivel.",
            "examples": [
              500.0
            ]
          },
          "liquid_value_brl": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Liquid Value Brl",
            "description": "Valor liquido que o cedente deve receber por este recebivel. O sistema calcula o desconto reverso: desconto = value - liquid_value_brl. MUTUAMENTE EXCLUSIVO com monthly_rate_pct, discount_pct e fixed_discount_brl. O CET resultante sera validado contra os limites da policy do originador.",
            "examples": [
              9500.0
            ]
          }
        },
        "type": "object",
        "required": [
          "external_id",
          "payer_name",
          "payer_document",
          "net_face_value",
          "requested_advance_value",
          "due_date"
        ],
        "title": "Receivable"
      },
      "RequestAnticipationFromStock": {
        "properties": {
          "stock_item_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "minItems": 1,
            "title": "Stock Item Ids",
            "description": "IDs dos itens de estoque a antecipar"
          },
          "requested_advance_value": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              }
            ],
            "title": "Requested Advance Value",
            "description": "Valor total a antecipar (BRL)"
          },
          "bank": {
            "$ref": "#/components/schemas/StockBankData",
            "description": "Dados de pagamento — obrigatorio"
          },
          "fees": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/StockAnticipationFees"
              },
              {
                "type": "null"
              }
            ],
            "description": "Taxas da operacao. Se omitido, usa hierarquia de taxas."
          },
          "taxes": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Taxes",
            "description": "Alias para 'fees' (backward compat)"
          },
          "product_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Id",
            "description": "ID do produto financeiro (opaco, definido pelo Backoffice). Filtra a policy de taxa por produto.",
            "examples": [
              "b3f1c2a4-5d6e-7f80-9a1b-2c3d4e5f6a7b"
            ]
          },
          "policy_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Policy Id",
            "description": "ID da policy do originador (override). Se informado, substitui a policy principal na resolucao.",
            "examples": [
              "01970dc5-1234-7000-8000-000000000000"
            ]
          }
        },
        "type": "object",
        "required": [
          "stock_item_ids",
          "requested_advance_value",
          "bank"
        ],
        "title": "RequestAnticipationFromStock"
      },
      "SimulateAnticipationFromStock": {
        "properties": {
          "stock_item_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "minItems": 1,
            "title": "Stock Item Ids",
            "description": "IDs dos itens de estoque a simular"
          },
          "requested_advance_value": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              }
            ],
            "title": "Requested Advance Value",
            "description": "Valor total a antecipar para simulacao (BRL)"
          },
          "fees": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/StockAnticipationFees"
              },
              {
                "type": "null"
              }
            ],
            "description": "Taxas para simulacao. Se omitido, usa hierarquia de taxas."
          },
          "taxes": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Taxes",
            "description": "Alias para 'fees' (backward compat)"
          },
          "product_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Id",
            "description": "ID do produto financeiro (opaco, definido pelo Backoffice). Filtra a policy de taxa por produto.",
            "examples": [
              "b3f1c2a4-5d6e-7f80-9a1b-2c3d4e5f6a7b"
            ]
          },
          "policy_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Policy Id",
            "description": "ID da policy do originador (override). Se informado, substitui a policy principal na resolucao.",
            "examples": [
              "01970dc5-1234-7000-8000-000000000000"
            ]
          }
        },
        "type": "object",
        "required": [
          "stock_item_ids",
          "requested_advance_value"
        ],
        "title": "SimulateAnticipationFromStock"
      },
      "SimulatedReceivable": {
        "properties": {
          "external_id": {
            "type": "string",
            "title": "External Id"
          },
          "identifier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Identifier"
          },
          "payer_name": {
            "type": "string",
            "title": "Payer Name"
          },
          "payer_document": {
            "type": "string",
            "title": "Payer Document"
          },
          "requested_advance_value": {
            "type": "string",
            "title": "Requested Advance Value"
          },
          "net_face_value": {
            "type": "string",
            "title": "Net Face Value"
          },
          "gross_face_value": {
            "type": "string",
            "title": "Gross Face Value"
          },
          "due_date": {
            "type": "string",
            "title": "Due Date"
          },
          "days_advanced": {
            "type": "integer",
            "title": "Days Advanced"
          },
          "monthly_rate_pct": {
            "type": "string",
            "title": "Monthly Rate Pct",
            "description": "Taxa mensal aplicada (%)"
          },
          "discount_pct": {
            "type": "string",
            "title": "Discount Pct",
            "description": "Desagio fixo aplicado (%)"
          },
          "fixed_discount_brl": {
            "type": "string",
            "title": "Fixed Discount Brl",
            "description": "Desconto fixo aplicado (R$)"
          },
          "floating_days": {
            "type": "integer",
            "title": "Floating Days"
          },
          "discounted_value": {
            "type": "string",
            "title": "Discounted Value",
            "description": "Desconto total cumulativo (R$)"
          },
          "liquid_value": {
            "type": "string",
            "title": "Liquid Value",
            "description": "Valor liquido do recebivel (R$)"
          },
          "fee_source": {
            "type": "string",
            "title": "Fee Source",
            "description": "Fonte da taxa na hierarquia"
          }
        },
        "type": "object",
        "required": [
          "external_id",
          "identifier",
          "payer_name",
          "payer_document",
          "requested_advance_value",
          "net_face_value",
          "gross_face_value",
          "due_date",
          "days_advanced",
          "monthly_rate_pct",
          "discount_pct",
          "fixed_discount_brl",
          "floating_days",
          "discounted_value",
          "liquid_value",
          "fee_source"
        ],
        "title": "SimulatedReceivable"
      },
      "SimulationFees": {
        "properties": {
          "monthly_rate_pct": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Monthly Rate Pct",
            "description": "Taxa mensal (%), pro-rata dias. Cumulativa.",
            "examples": [
              3.5
            ]
          },
          "discount_pct": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Discount Pct",
            "description": "Desagio fixo (%) sobre valor. Cumulativa.",
            "examples": [
              2.0
            ]
          },
          "fixed_discount_brl": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fixed Discount Brl",
            "description": "Desconto nominal fixo em reais por recebivel. Cumulativo.",
            "examples": [
              150.0
            ]
          },
          "floating_days": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Floating Days",
            "description": "Dias de carencia descontados do prazo antes de calcular monthly_rate_pct.",
            "examples": [
              2
            ]
          },
          "total_liquid_value_brl": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Liquid Value Brl",
            "description": "Valor liquido total desejado para toda a simulacao. Mutuamente exclusivo com fees."
          }
        },
        "type": "object",
        "title": "SimulationFees"
      },
      "SimulationReceivable": {
        "properties": {
          "external_id": {
            "type": "string",
            "title": "External Id",
            "description": "Identificador unico do recebivel (ex: numero da NF)",
            "examples": [
              "NF-2026-001"
            ]
          },
          "identifier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Identifier",
            "description": "Identificador interno opcional",
            "examples": [
              "REC001"
            ]
          },
          "payer_name": {
            "type": "string",
            "title": "Payer Name",
            "description": "Nome ou razao social do sacado (devedor)",
            "examples": [
              "Cliente XPTO Ltda"
            ]
          },
          "payer_document": {
            "type": "string",
            "title": "Payer Document",
            "description": "CPF (11 digitos) ou CNPJ (14 digitos) do sacado",
            "examples": [
              "12345678000199"
            ]
          },
          "gross_face_value": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gross Face Value",
            "description": "Valor bruto do lastro (NF antes de deducoes). Opcional.",
            "examples": [
              12000.0
            ]
          },
          "net_face_value": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              }
            ],
            "title": "Net Face Value",
            "description": "Valor liquido do lastro (NF apos deducoes).",
            "examples": [
              10000.0
            ]
          },
          "requested_advance_value": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              }
            ],
            "title": "Requested Advance Value",
            "description": "Valor sendo antecipado. Se < net_face_value, antecipacao parcial.",
            "examples": [
              10000.0
            ]
          },
          "due_date": {
            "type": "string",
            "title": "Due Date",
            "description": "Data de vencimento do recebivel (YYYY-MM-DD)",
            "examples": [
              "2026-08-15"
            ]
          },
          "monthly_rate_pct": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Monthly Rate Pct",
            "description": "Taxa mensal (%), pro-rata dias. Cumulativa.",
            "examples": [
              3.5
            ]
          },
          "discount_pct": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Discount Pct",
            "description": "Desagio fixo (%) sobre valor, independente do prazo.",
            "examples": [
              2.0
            ]
          },
          "fixed_discount_brl": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fixed Discount Brl",
            "description": "Desconto nominal fixo em reais.",
            "examples": [
              500.0
            ]
          },
          "liquid_value_brl": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Liquid Value Brl",
            "description": "Valor liquido desejado. Mutuamente exclusivo com fees.",
            "examples": [
              9500.0
            ]
          }
        },
        "type": "object",
        "required": [
          "external_id",
          "payer_name",
          "payer_document",
          "net_face_value",
          "requested_advance_value",
          "due_date"
        ],
        "title": "SimulationReceivable"
      },
      "SimulationRequest": {
        "properties": {
          "assignor_document": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assignor Document",
            "description": "CPF ou CNPJ do cedente (opcional). Se informado, o sistema busca a policy ativa para esse cedente e aplica na hierarquia (nivel 3).",
            "examples": [
              "12345678000199"
            ]
          },
          "receivables": {
            "items": {
              "$ref": "#/components/schemas/SimulationReceivable"
            },
            "type": "array",
            "minItems": 1,
            "title": "Receivables",
            "description": "Lista de recebiveis para simular"
          },
          "fees": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SimulationFees"
              },
              {
                "type": "null"
              }
            ],
            "description": "Taxas customizadas. Se null, usa taxas da policy."
          },
          "product_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Id",
            "description": "ID do produto (opaco, definido pelo BO). Filtra policies por produto."
          },
          "policy_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Policy Id",
            "description": "ID da policy do originador (override). Se informado, substitui a policy principal."
          },
          "taxes": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SimulationFees"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "receivables"
        ],
        "title": "SimulationRequest"
      },
      "SimulationResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id",
            "default": "simulation"
          },
          "status": {
            "type": "string",
            "title": "Status",
            "default": "SIMULATED"
          },
          "opr_gross_face_value": {
            "type": "string",
            "title": "Opr Gross Face Value"
          },
          "opr_net_face_value": {
            "type": "string",
            "title": "Opr Net Face Value"
          },
          "opr_discounted_value": {
            "type": "string",
            "title": "Opr Discounted Value"
          },
          "opr_liquid_value": {
            "type": "string",
            "title": "Opr Liquid Value"
          },
          "average_days_in_advance": {
            "type": "integer",
            "title": "Average Days In Advance"
          },
          "weighted_avg_days": {
            "type": "integer",
            "title": "Weighted Avg Days",
            "description": "Prazo medio ponderado (PMP) da operacao em dias"
          },
          "fee_hierarchy": {
            "type": "string",
            "title": "Fee Hierarchy"
          },
          "assignor_defaults_used": {
            "type": "boolean",
            "title": "Assignor Defaults Used",
            "description": "Se policy/defaults do cedente foram encontrados"
          },
          "payer_defaults_used": {
            "type": "boolean",
            "title": "Payer Defaults Used",
            "description": "Se policy/defaults de algum sacado foram encontrados"
          },
          "policy_used": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PolicyUsedResponse"
              },
              {
                "type": "null"
              }
            ],
            "description": "Detalhes da policy que forneceu as taxas predominantes"
          },
          "receivables": {
            "items": {
              "$ref": "#/components/schemas/SimulatedReceivable"
            },
            "type": "array",
            "title": "Receivables"
          }
        },
        "type": "object",
        "required": [
          "opr_gross_face_value",
          "opr_net_face_value",
          "opr_discounted_value",
          "opr_liquid_value",
          "average_days_in_advance",
          "weighted_avg_days",
          "fee_hierarchy",
          "assignor_defaults_used",
          "payer_defaults_used",
          "receivables"
        ],
        "title": "SimulationResponse"
      },
      "StockAnticipationFees": {
        "properties": {
          "monthly_rate_pct": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Monthly Rate Pct",
            "description": "Taxa mensal (%), pro-rata dias. Cumulativa."
          },
          "discount_pct": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Discount Pct",
            "description": "Desagio fixo (%) sobre valor."
          },
          "fixed_discount_brl": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fixed Discount Brl",
            "description": "Desconto nominal fixo em reais."
          },
          "floating_days": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Floating Days",
            "description": "Dias de carencia."
          },
          "total_liquid_value_brl": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Liquid Value Brl",
            "description": "Valor liquido total desejado. Mutuamente exclusivo com fees."
          }
        },
        "type": "object",
        "title": "StockAnticipationFees",
        "description": "Taxas para antecipacao do estoque (mesma logica do operations/direct)."
      },
      "StockBankData": {
        "properties": {
          "use_document_pix": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Use Document Pix",
            "description": "Pagamento via PIX em chave PIX do CPF/CNPJ do cedente"
          },
          "code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Code",
            "description": "Codigo do banco (3 digitos)"
          },
          "agency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Agency",
            "description": "Agencia"
          },
          "account": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account",
            "description": "Numero da conta com digito"
          },
          "type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Type",
            "description": "CC (corrente), CP (poupanca), SA (salario)"
          }
        },
        "type": "object",
        "title": "StockBankData",
        "description": "Dados de pagamento — obrigatorio em antecipacao."
      },
      "StockItemCreate": {
        "properties": {
          "assignor_id": {
            "type": "string",
            "title": "Assignor Id"
          },
          "payer_id": {
            "type": "string",
            "title": "Payer Id"
          },
          "external_id": {
            "type": "string",
            "maxLength": 80,
            "minLength": 1,
            "title": "External Id"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "backing_type": {
            "type": "string",
            "title": "Backing Type",
            "default": "NFE"
          },
          "gross_face_value": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,16}|(?=[\\d.]{1,19}0*$)\\d{0,16}\\.\\d{0,2}0*$)"
              }
            ],
            "title": "Gross Face Value"
          },
          "net_face_value": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0.0
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,16}|(?=[\\d.]{1,19}0*$)\\d{0,16}\\.\\d{0,2}0*$)"
              }
            ],
            "title": "Net Face Value"
          },
          "due_date": {
            "type": "string",
            "title": "Due Date"
          },
          "pre_authorized": {
            "type": "boolean",
            "title": "Pre Authorized",
            "description": "Indica se o recebivel ja esta pre-autorizado para antecipacao"
          },
          "nfe_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Nfe Number"
          },
          "nfe_serie": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Nfe Serie"
          },
          "nfe_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Nfe Key"
          },
          "nfe_issue_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Nfe Issue Date"
          },
          "nfe_total_value": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Nfe Total Value"
          }
        },
        "type": "object",
        "required": [
          "assignor_id",
          "payer_id",
          "external_id",
          "gross_face_value",
          "net_face_value",
          "due_date",
          "pre_authorized"
        ],
        "title": "StockItemCreate"
      },
      "StockItemCreateResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "external_id": {
            "type": "string",
            "title": "External Id"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "external_id",
          "status",
          "created_at"
        ],
        "title": "StockItemCreateResponse"
      },
      "StockItemDetail": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "external_id": {
            "type": "string",
            "title": "External Id"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "backing_type": {
            "type": "string",
            "title": "Backing Type"
          },
          "gross_face_value": {
            "type": "string",
            "title": "Gross Face Value"
          },
          "net_face_value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Net Face Value"
          },
          "due_date": {
            "type": "string",
            "format": "date",
            "title": "Due Date"
          },
          "pre_authorized": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pre Authorized"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "assignor_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assignor Id"
          },
          "payer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payer Id"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "originator_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Originator Id"
          },
          "internal_identifier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Internal Identifier"
          },
          "nfe_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Nfe Number"
          },
          "nfe_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Nfe Key"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "locked_by_proposal_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Locked By Proposal Id"
          },
          "consumed_by_operation_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Consumed By Operation Id"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "external_id",
          "backing_type",
          "gross_face_value",
          "due_date",
          "status"
        ],
        "title": "StockItemDetail"
      },
      "StockItemStatusResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "status"
        ],
        "title": "StockItemStatusResponse"
      },
      "StockItemSummary": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "external_id": {
            "type": "string",
            "title": "External Id"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "backing_type": {
            "type": "string",
            "title": "Backing Type"
          },
          "gross_face_value": {
            "type": "string",
            "title": "Gross Face Value"
          },
          "net_face_value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Net Face Value"
          },
          "due_date": {
            "type": "string",
            "format": "date",
            "title": "Due Date"
          },
          "pre_authorized": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pre Authorized"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "assignor_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assignor Id"
          },
          "payer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payer Id"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "external_id",
          "backing_type",
          "gross_face_value",
          "due_date",
          "status"
        ],
        "title": "StockItemSummary"
      },
      "StockItemUpdate": {
        "properties": {
          "assignor_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assignor Id"
          },
          "payer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payer Id"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "backing_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Backing Type"
          },
          "gross_face_value": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,16}|(?=[\\d.]{1,19}0*$)\\d{0,16}\\.\\d{0,2}0*$)"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gross Face Value"
          },
          "net_face_value": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0.0
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*(?:\\d{0,16}|(?=[\\d.]{1,19}0*$)\\d{0,16}\\.\\d{0,2}0*$)"
              },
              {
                "type": "null"
              }
            ],
            "title": "Net Face Value"
          },
          "due_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Due Date"
          },
          "pre_authorized": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pre Authorized"
          },
          "nfe_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Nfe Number"
          },
          "nfe_serie": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Nfe Serie"
          },
          "nfe_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Nfe Key"
          },
          "nfe_issue_date": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Nfe Issue Date"
          },
          "nfe_total_value": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string",
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Nfe Total Value"
          }
        },
        "type": "object",
        "title": "StockItemUpdate",
        "description": "Campos editaveis de um item do estoque. Todos opcionais — enviar apenas o que alterar."
      },
      "StockListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/StockItemSummary"
            },
            "type": "array",
            "title": "Items"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total"
        ],
        "title": "StockListResponse"
      },
      "StockSimulatedReceivable": {
        "properties": {
          "stock_item_id": {
            "type": "string",
            "title": "Stock Item Id"
          },
          "external_id": {
            "type": "string",
            "title": "External Id"
          },
          "gross_face_value": {
            "type": "string",
            "title": "Gross Face Value"
          },
          "net_face_value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Net Face Value"
          },
          "requested_advance_value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Requested Advance Value"
          },
          "due_date": {
            "type": "string",
            "title": "Due Date"
          },
          "days_advanced": {
            "type": "integer",
            "title": "Days Advanced"
          },
          "discount_brl": {
            "type": "string",
            "title": "Discount Brl"
          },
          "liquid_value": {
            "type": "string",
            "title": "Liquid Value"
          },
          "monthly_rate_pct": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Monthly Rate Pct"
          },
          "discount_pct": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Discount Pct"
          },
          "fixed_discount_brl": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fixed Discount Brl"
          },
          "fee_source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fee Source"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "stock_item_id",
          "external_id",
          "gross_face_value",
          "due_date",
          "days_advanced",
          "discount_brl",
          "liquid_value"
        ],
        "title": "StockSimulatedReceivable",
        "description": "Item simulado de uma antecipacao a partir do estoque."
      },
      "StockSimulationResponse": {
        "properties": {
          "status": {
            "type": "string",
            "title": "Status"
          },
          "opr_gross_face_value": {
            "type": "string",
            "title": "Opr Gross Face Value"
          },
          "opr_net_face_value": {
            "type": "string",
            "title": "Opr Net Face Value"
          },
          "opr_discounted_value": {
            "type": "string",
            "title": "Opr Discounted Value"
          },
          "opr_liquid_value": {
            "type": "string",
            "title": "Opr Liquid Value"
          },
          "average_days_in_advance": {
            "type": "integer",
            "title": "Average Days In Advance"
          },
          "floating_days": {
            "type": "integer",
            "title": "Floating Days"
          },
          "product_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Product Id"
          },
          "receivables": {
            "items": {
              "$ref": "#/components/schemas/StockSimulatedReceivable"
            },
            "type": "array",
            "title": "Receivables"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "status",
          "opr_gross_face_value",
          "opr_net_face_value",
          "opr_discounted_value",
          "opr_liquid_value",
          "average_days_in_advance",
          "floating_days",
          "receivables"
        ],
        "title": "StockSimulationResponse",
        "description": "Resposta de `POST /v1/stock/simulate-anticipation` (read-only)."
      },
      "TitleDetail": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "operation_id": {
            "type": "string",
            "title": "Operation Id"
          },
          "external_id": {
            "type": "string",
            "title": "External Id"
          },
          "backing_type": {
            "type": "string",
            "title": "Backing Type"
          },
          "gross_face_value": {
            "type": "string",
            "title": "Gross Face Value"
          },
          "liquid_value": {
            "type": "string",
            "title": "Liquid Value"
          },
          "due_date": {
            "type": "string",
            "format": "date",
            "title": "Due Date"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "current_outstanding_balance_brl": {
            "type": "string",
            "title": "Current Outstanding Balance Brl"
          },
          "cumulative_payment_brl": {
            "type": "string",
            "title": "Cumulative Payment Brl"
          },
          "total_returned_value": {
            "type": "string",
            "title": "Total Returned Value"
          },
          "payer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payer Id"
          },
          "assignor_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assignor Id"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          },
          "net_face_value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Net Face Value"
          },
          "discounted_value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Discounted Value"
          },
          "effective_cost_pct": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Effective Cost Pct"
          },
          "applied_monthly_rate_pct": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Applied Monthly Rate Pct"
          },
          "applied_discount_pct": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Applied Discount Pct"
          },
          "applied_floating_days": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Applied Floating Days"
          },
          "applied_late_fee_pct": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Applied Late Fee Pct"
          },
          "applied_default_interest_pct_monthly": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Applied Default Interest Pct Monthly"
          },
          "qty_days_advanced": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Qty Days Advanced"
          },
          "principal_value_brl": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Principal Value Brl"
          },
          "accrued_interest_brl": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Accrued Interest Brl"
          },
          "accrued_late_fee_brl": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Accrued Late Fee Brl"
          },
          "accrued_default_interest_brl": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Accrued Default Interest Brl"
          },
          "fully_returned_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fully Returned At"
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "operation_id",
          "external_id",
          "backing_type",
          "gross_face_value",
          "liquid_value",
          "due_date",
          "status",
          "current_outstanding_balance_brl",
          "cumulative_payment_brl",
          "total_returned_value"
        ],
        "title": "TitleDetail"
      },
      "TitleListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/TitleSummary"
            },
            "type": "array",
            "title": "Items"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total"
        ],
        "title": "TitleListResponse"
      },
      "TitleSummary": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "operation_id": {
            "type": "string",
            "title": "Operation Id"
          },
          "external_id": {
            "type": "string",
            "title": "External Id"
          },
          "backing_type": {
            "type": "string",
            "title": "Backing Type"
          },
          "gross_face_value": {
            "type": "string",
            "title": "Gross Face Value"
          },
          "liquid_value": {
            "type": "string",
            "title": "Liquid Value"
          },
          "due_date": {
            "type": "string",
            "format": "date",
            "title": "Due Date"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "current_outstanding_balance_brl": {
            "type": "string",
            "title": "Current Outstanding Balance Brl"
          },
          "cumulative_payment_brl": {
            "type": "string",
            "title": "Cumulative Payment Brl"
          },
          "total_returned_value": {
            "type": "string",
            "title": "Total Returned Value"
          },
          "payer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payer Id"
          },
          "assignor_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Assignor Id"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "operation_id",
          "external_id",
          "backing_type",
          "gross_face_value",
          "liquid_value",
          "due_date",
          "status",
          "current_outstanding_balance_brl",
          "cumulative_payment_brl",
          "total_returned_value"
        ],
        "title": "TitleSummary"
      },
      "TokenRequest": {
        "properties": {
          "client_id": {
            "type": "string",
            "minLength": 5,
            "title": "Client Id",
            "description": "M2M credential X-Client-Id"
          },
          "client_secret": {
            "type": "string",
            "minLength": 8,
            "title": "Client Secret",
            "description": "M2M credential X-Client-Secret"
          },
          "scopes": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Scopes",
            "description": "Requested scopes. If omitted, uses all scopes of the credential."
          }
        },
        "type": "object",
        "required": [
          "client_id",
          "client_secret"
        ],
        "title": "TokenRequest"
      },
      "TokenResponse": {
        "properties": {
          "access_token": {
            "type": "string",
            "title": "Access Token"
          },
          "token_type": {
            "type": "string",
            "title": "Token Type",
            "default": "bearer"
          },
          "expires_in": {
            "type": "integer",
            "title": "Expires In",
            "description": "Token lifetime in seconds"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Scopes",
            "description": "Granted scopes"
          }
        },
        "type": "object",
        "required": [
          "access_token",
          "expires_in",
          "scopes"
        ],
        "title": "TokenResponse"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "WebhookCreate": {
        "properties": {
          "url": {
            "type": "string",
            "minLength": 10,
            "pattern": "^https://",
            "title": "Url"
          },
          "events": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "minItems": 1,
            "title": "Events"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          }
        },
        "type": "object",
        "required": [
          "url",
          "events"
        ],
        "title": "WebhookCreate"
      },
      "WebhookCreateResponse": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "url": {
            "type": "string",
            "title": "Url"
          },
          "event_types": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Event Types"
          },
          "hmac_secret": {
            "type": "string",
            "title": "Hmac Secret"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "url",
          "hmac_secret"
        ],
        "title": "WebhookCreateResponse"
      },
      "WebhookDelivery": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "event_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Event Type"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          },
          "response_status_code": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Response Status Code"
          },
          "duration_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Ms"
          },
          "attempt_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Attempt Number"
          },
          "delivered_successfully": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Delivered Successfully"
          },
          "next_retry_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Retry At"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id"
        ],
        "title": "WebhookDelivery"
      },
      "WebhookDeliveryListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/WebhookDelivery"
            },
            "type": "array",
            "title": "Items"
          }
        },
        "type": "object",
        "required": [
          "items"
        ],
        "title": "WebhookDeliveryListResponse"
      },
      "WebhookListResponse": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/WebhookSummary"
            },
            "type": "array",
            "title": "Items"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          }
        },
        "type": "object",
        "required": [
          "items",
          "total"
        ],
        "title": "WebhookListResponse"
      },
      "WebhookSummary": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "url": {
            "type": "string",
            "title": "Url"
          },
          "event_types": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Event Types"
          },
          "active": {
            "type": "boolean",
            "title": "Active"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "created_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "url",
          "active"
        ],
        "title": "WebhookSummary"
      }
    },
    "securitySchemes": {
      "ClientId": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Client-Id"
      },
      "ClientSecret": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Client-Secret"
      },
      "BearerJWT": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      },
      "OAuth2": {
        "type": "oauth2",
        "description": "JWT RS256 via Client Credentials (POST /v1/auth/token).",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://receivables-api.zemocapital.com/v1/auth/token",
            "scopes": {
              "assignor:read": "Permite read em assignor",
              "assignor:write": "Permite write em assignor",
              "bank-account:read": "Permite read em bank account",
              "operation:cancel": "Permite cancel em operation",
              "operation:create": "Permite create em operation",
              "operation:read": "Permite read em operation",
              "originator:read": "Permite read em originator",
              "payer:read": "Permite read em payer",
              "payer:write": "Permite write em payer",
              "simulation:create": "Permite create em simulation",
              "stock:read": "Permite read em stock",
              "stock:write": "Permite write em stock",
              "title:read": "Permite read em title",
              "webhook:read": "Permite read em webhook",
              "webhook:write": "Permite write em webhook"
            }
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "health",
      "description": "Health checks"
    },
    {
      "name": "auth",
      "description": "Autenticação JWT e M2M"
    },
    {
      "name": "stock",
      "description": "Estoque de recebíveis"
    },
    {
      "name": "simulation",
      "description": "Simulação de antecipação"
    },
    {
      "name": "products",
      "description": "Catálogo de produtos financeiros (product_id)"
    },
    {
      "name": "operations",
      "description": "Operações de antecipação"
    },
    {
      "name": "operations-direct",
      "description": "Criação direta de operação"
    },
    {
      "name": "titles",
      "description": "Títulos e saldo devedor"
    },
    {
      "name": "payers",
      "description": "Sacados"
    },
    {
      "name": "assignors",
      "description": "Cedentes"
    },
    {
      "name": "bank-accounts",
      "description": "Contas bancárias"
    },
    {
      "name": "originators",
      "description": "Dados do originador"
    },
    {
      "name": "assignor-payables",
      "description": "Payables pós-antecipação"
    },
    {
      "name": "discount-credits",
      "description": "Créditos de desconto"
    },
    {
      "name": "webhooks",
      "description": "Webhooks outbound"
    }
  ],
  "servers": [
    {
      "url": "https://receivables-api.zemocapital.com",
      "description": "Producao"
    }
  ],
  "security": [
    {
      "ClientId": [],
      "ClientSecret": []
    },
    {
      "BearerJWT": []
    }
  ]
}
