{
  "openapi": "3.0.1",
  "info": {
    "title": "Finuse API Comercial",
    "description": "Consulte os contratos abaixo. Para comecar, acesse o [guia de integracao](/redoc)\nou o [portal de desenvolvedores](/portal).\n\n- **Acesso:** token Bearer obtido com suas credenciais de integracao.\n- **Ambientes:** sandbox e producao possuem acessos e dados independentes.\n- **Retentativas:** use `Idempotency-Key` na criacao de cotacoes, checkouts e vendas; veja as regras no guia.\n- **On-ramp:** USDT em producao usa checkout assincrono quando habilitado e homologado; BRL e sandbox nao movimentam dinheiro.\n\nUse somente dados ficticios no sandbox e mantenha os segredos no seu backend.",
    "version": "v1"
  },
  "servers": [
    {
      "url": "/"
    }
  ],
  "paths": {
    "/v1/auth/login": {
      "post": {
        "tags": [
          "00 - Autenticação"
        ],
        "summary": "Obter token de acesso",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "required": [
                  "clientId",
                  "clientSecret"
                ],
                "type": "object",
                "properties": {
                  "clientId": {
                    "type": "string"
                  },
                  "clientSecret": {
                    "type": "string",
                    "format": "password"
                  }
                }
              }
            },
            "application/x-www-form-urlencoded": {
              "schema": {
                "required": [
                  "grant_type",
                  "client_id",
                  "client_secret"
                ],
                "type": "object",
                "properties": {
                  "grant_type": {
                    "enum": [
                      "client_credentials"
                    ],
                    "type": "string"
                  },
                  "client_id": {
                    "type": "string"
                  },
                  "client_secret": {
                    "type": "string",
                    "format": "password"
                  }
                }
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Limite de uso atingido. Respeite Retry-After."
          }
        }
      }
    },
    "/v1/vendas": {
      "post": {
        "tags": [
          "01 - Vendas"
        ],
        "summary": "Criar registro",
        "description": "Permissao necessaria: `vendas.write`.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "UUID por operacao. Repita com os mesmos dados por ate 24 horas.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CriarVendaRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CriarVendaRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CriarVendaRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CriarVendaResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Limite de uso atingido. Respeite Retry-After."
          },
          "409": {
            "description": "Chave em processamento, expirada ou utilizada com dados diferentes."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "get": {
        "tags": [
          "01 - Vendas"
        ],
        "summary": "Listar registros",
        "description": "Permissao necessaria: `vendas.read`.",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "take",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedResponseOfVendaDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Limite de uso atingido. Respeite Retry-After."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/v1/vendas/{id}": {
      "get": {
        "tags": [
          "01 - Vendas"
        ],
        "summary": "Consultar registro",
        "description": "Permissao necessaria: `vendas.read`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VendaDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Limite de uso atingido. Respeite Retry-After."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/v1/vendas/{id}/cancelar": {
      "post": {
        "tags": [
          "01 - Vendas"
        ],
        "summary": "Cancelar venda",
        "description": "Permissao necessaria: `vendas.write`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Limite de uso atingido. Respeite Retry-After."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/v1/quotes": {
      "post": {
        "tags": [
          "02 - Checkout"
        ],
        "summary": "Calcular cotacao",
        "description": "Permissao necessaria: `vendas.write`.\n\nPrimeira etapa do fluxo recomendado. Calcula os valores BRL e USDT estimado com validade explicita. Envie um `Idempotency-Key` novo e reutilize a mesma chave somente ao repetir exatamente esta solicitacao.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "UUID obrigatorio e exclusivo desta operacao. Reutilize somente com o mesmo body.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CriarCotacaoRequest"
              },
              "example": {
                "valor": 100,
                "moeda": "BRL"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CriarCotacaoRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CriarCotacaoRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CotacaoResponse"
                }
              }
            }
          },
          "429": {
            "description": "Limite de uso atingido. Respeite Retry-After."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/v1/checkouts": {
      "post": {
        "tags": [
          "02 - Checkout"
        ],
        "summary": "Criar link de pagamento",
        "description": "Permissao necessaria: `vendas.write`.\n\nCria o link hospedado de KYC/KYB usando uma cotacao ainda valida. Nenhuma venda ou operacao financeira e criada nesta etapa. A venda nasce somente depois da aprovacao manual e dos gates do provedor financeiro.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "UUID obrigatorio e exclusivo desta operacao. Reutilize somente com o mesmo body.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CriarCheckoutRequest"
              },
              "example": {
                "cotacaoId": "11111111-1111-1111-1111-111111111111",
                "tipoPessoa": "PF",
                "titulo": "Pedido 1042",
                "descricao": "Cobranca hospedada",
                "produtoId": 123,
                "quantidade": 1,
                "chaveExterna": "pedido-1042"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CriarCheckoutRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CriarCheckoutRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutResponse"
                }
              }
            }
          },
          "429": {
            "description": "Limite de uso atingido. Respeite Retry-After."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/v1/checkouts/{id}": {
      "get": {
        "tags": [
          "02 - Checkout"
        ],
        "summary": "Consultar checkout",
        "description": "Permissao necessaria: `vendas.read`.\n\nConsulta o estado do checkout da conta autenticada. `vendaId` permanece nulo ate a aprovacao cadastral e a materializacao assincrona da venda.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckoutResponse"
                }
              }
            }
          },
          "429": {
            "description": "Limite de uso atingido. Respeite Retry-After."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/v1/checkouts/public": {
      "get": {
        "tags": [
          "02 - Checkout"
        ],
        "summary": "Acompanhar checkout",
        "description": "\n\nConsulta publica limitada ao portador do token do link. Nao retorna dados cadastrais do comprador.",
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicCheckoutResponse"
                }
              }
            }
          },
          "429": {
            "description": "Limite de uso atingido. Respeite Retry-After."
          }
        }
      }
    },
    "/v1/produtos": {
      "post": {
        "tags": [
          "02 - Produtos"
        ],
        "summary": "Criar registro",
        "description": "Permissao necessaria: `produtos.write`.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CriarProdutoRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CriarProdutoRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CriarProdutoRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CriarProdutoResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Limite de uso atingido. Respeite Retry-After."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "get": {
        "tags": [
          "02 - Produtos"
        ],
        "summary": "Listar registros",
        "description": "Permissao necessaria: `produtos.read`.",
        "parameters": [
          {
            "name": "apenasAtivos",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "take",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedResponseOfProdutoDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Limite de uso atingido. Respeite Retry-After."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/v1/produtos/{id}": {
      "put": {
        "tags": [
          "02 - Produtos"
        ],
        "description": "Permissao necessaria: `produtos.write`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AtualizarProdutoRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AtualizarProdutoRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AtualizarProdutoRequest"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Limite de uso atingido. Respeite Retry-After."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "get": {
        "tags": [
          "02 - Produtos"
        ],
        "summary": "Consultar registro",
        "description": "Permissao necessaria: `produtos.read`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProdutoDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Limite de uso atingido. Respeite Retry-After."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "delete": {
        "tags": [
          "02 - Produtos"
        ],
        "description": "Permissao necessaria: `produtos.write`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Limite de uso atingido. Respeite Retry-After."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/v1/clientes": {
      "post": {
        "tags": [
          "03 - Clientes"
        ],
        "summary": "Criar registro",
        "description": "Permissao necessaria: `clientes.write`.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CriarClienteRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CriarClienteRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CriarClienteRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CriarClienteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Limite de uso atingido. Respeite Retry-After."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "get": {
        "tags": [
          "03 - Clientes"
        ],
        "summary": "Listar registros",
        "description": "Permissao necessaria: `clientes.read`.",
        "parameters": [
          {
            "name": "apenasAtivos",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "take",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedResponseOfClienteDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Limite de uso atingido. Respeite Retry-After."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/v1/clientes/{id}": {
      "put": {
        "tags": [
          "03 - Clientes"
        ],
        "description": "Permissao necessaria: `clientes.write`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AtualizarClienteRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AtualizarClienteRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AtualizarClienteRequest"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Limite de uso atingido. Respeite Retry-After."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "get": {
        "tags": [
          "03 - Clientes"
        ],
        "summary": "Consultar registro",
        "description": "Permissao necessaria: `clientes.read`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClienteDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Limite de uso atingido. Respeite Retry-After."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "delete": {
        "tags": [
          "03 - Clientes"
        ],
        "description": "Permissao necessaria: `clientes.write`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Limite de uso atingido. Respeite Retry-After."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/v1/webhooks/subscriptions": {
      "post": {
        "tags": [
          "04 - Webhooks"
        ],
        "summary": "Criar registro",
        "description": "Permissao necessaria: `webhooks.write`.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CriarWebhookSubscriptionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CriarWebhookSubscriptionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CriarWebhookSubscriptionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CriarWebhookSubscriptionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Limite de uso atingido. Respeite Retry-After."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "get": {
        "tags": [
          "04 - Webhooks"
        ],
        "summary": "Listar registros",
        "description": "Permissao necessaria: `webhooks.read`.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedResponseOfWebhookSubscriptionDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Limite de uso atingido. Respeite Retry-After."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/v1/webhooks/subscriptions/{id}": {
      "patch": {
        "tags": [
          "04 - Webhooks"
        ],
        "description": "Permissao necessaria: `webhooks.write`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AtualizarWebhookSubscriptionRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AtualizarWebhookSubscriptionRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AtualizarWebhookSubscriptionRequest"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Limite de uso atingido. Respeite Retry-After."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "get": {
        "tags": [
          "04 - Webhooks"
        ],
        "summary": "Consultar registro",
        "description": "Permissao necessaria: `webhooks.read`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookSubscriptionDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Limite de uso atingido. Respeite Retry-After."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "delete": {
        "tags": [
          "04 - Webhooks"
        ],
        "description": "Permissao necessaria: `webhooks.write`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Limite de uso atingido. Respeite Retry-After."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/v1/webhooks/subscriptions/{id}/events": {
      "get": {
        "tags": [
          "04 - Webhooks"
        ],
        "description": "Permissao necessaria: `webhooks.read`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedResponseOfWebhookEventoEnviadoDto"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Limite de uso atingido. Respeite Retry-After."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/v1/webhooks/supported-events": {
      "get": {
        "tags": [
          "04 - Webhooks"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "429": {
            "description": "Limite de uso atingido. Respeite Retry-After."
          }
        }
      }
    },
    "/v1/health": {
      "get": {
        "tags": [
          "05 - Health"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": { }
              }
            }
          },
          "429": {
            "description": "Limite de uso atingido. Respeite Retry-After."
          }
        }
      }
    },
    "/v1/developer/context": {
      "get": {
        "tags": [
          "06 - Credenciais"
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "429": {
            "description": "Limite de uso atingido. Respeite Retry-After."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/v1/developer/credentials": {
      "get": {
        "tags": [
          "06 - Credenciais"
        ],
        "summary": "Listar registros",
        "description": "Permissao necessaria: `credentials.read`.",
        "responses": {
          "200": {
            "description": "OK"
          },
          "429": {
            "description": "Limite de uso atingido. Respeite Retry-After."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "post": {
        "tags": [
          "06 - Credenciais"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDeveloperCredential"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDeveloperCredential"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDeveloperCredential"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "429": {
            "description": "Limite de uso atingido. Respeite Retry-After."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/v1/developer/credentials/{id}": {
      "delete": {
        "tags": [
          "06 - Credenciais"
        ],
        "summary": "Revogar credencial",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "429": {
            "description": "Limite de uso atingido. Respeite Retry-After."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/v1/developer/credentials/{id}/rotate": {
      "post": {
        "tags": [
          "06 - Credenciais"
        ],
        "summary": "Rotacionar segredo",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "429": {
            "description": "Limite de uso atingido. Respeite Retry-After."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/v1/kyc": {
      "post": {
        "tags": [
          "07 - KYC"
        ],
        "summary": "Enviar cliente para analise",
        "description": "Permissao necessaria: `compliance.write`.\n\nAbre o caso de um cliente previamente cadastrado, so com os dados (`clienteId` da mesma conta). O caso fica `AguardandoDocumentos` e a resposta traz `linkCompletar` (`token` e `path`): envie o cliente para `{portal}{path}?token={token}` para ele mandar documento e selfie (no KYB, os do responsavel legal, contrato social e cartao CNPJ). A analise so comeca depois disso. O link vale 72 horas; renove em `POST /v1/kyc/{id}/link` ou `POST /v1/kyb/{id}/link`. Para o cadastro completo pelo formulario, use `POST /v1/kyc/sessions` ou `POST /v1/kyb/sessions`. Envie `Idempotency-Key` como UUID; repetir a chave com o mesmo cliente retorna o caso existente, enquanto reutiliza-la com outro cliente retorna `409 Conflict`. A resposta `202 Accepted` confirma a abertura do caso, nao a aprovacao.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "UUID obrigatorio. Repetir a mesma chave e cliente retorna o caso atual; outra solicitacao retorna 409.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Identificador (`clienteId`) de um cliente previamente cadastrado na mesma conta. Esta rota nao recebe os dados do cadastro.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnviarComplianceRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/EnviarComplianceRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnviarComplianceRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ComplianceCaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComplianceCaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComplianceCaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Consulte campos, permissoes, conta e versao do recurso."
          },
          "401": {
            "description": "Consulte campos, permissoes, conta e versao do recurso."
          },
          "403": {
            "description": "Consulte campos, permissoes, conta e versao do recurso."
          },
          "404": {
            "description": "Consulte campos, permissoes, conta e versao do recurso."
          },
          "409": {
            "description": "Consulte campos, permissoes, conta e versao do recurso."
          },
          "429": {
            "description": "Limite de uso atingido. Respeite Retry-After."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "get": {
        "tags": [
          "07 - KYC"
        ],
        "summary": "Listar solicitacoes de analise",
        "description": "Permissao necessaria: `compliance.read`.\n\nLista casos de compliance da conta para acompanhamento. O status retornado nao representa, por si so, aprovacao para realizar operacoes financeiras. `take` padrao 25 (limite de 1 a 100), `skip` padrao 0 e `status` opcional. A resposta contem `items` e `hasMore`; o total nao e informado.",
        "parameters": [
          {
            "name": "take",
            "in": "query",
            "description": "Quantidade de casos. Padrao 25; valor efetivo limitado ao intervalo de 1 a 100.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 25
            }
          },
          {
            "name": "skip",
            "in": "query",
            "description": "Quantidade de casos a ignorar. Padrao 0; valores negativos sao tratados como 0.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Filtra pelo status do caso; parametro opcional.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CompliancePageResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompliancePageResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompliancePageResponse"
                }
              }
            }
          },
          "400": {
            "description": "Consulte campos, permissoes, conta e versao do recurso."
          },
          "401": {
            "description": "Consulte campos, permissoes, conta e versao do recurso."
          },
          "403": {
            "description": "Consulte campos, permissoes, conta e versao do recurso."
          },
          "404": {
            "description": "Consulte campos, permissoes, conta e versao do recurso."
          },
          "409": {
            "description": "Consulte campos, permissoes, conta e versao do recurso."
          },
          "429": {
            "description": "Limite de uso atingido. Respeite Retry-After."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/v1/kyc/{id}/link": {
      "post": {
        "tags": [
          "07 - KYC"
        ],
        "description": "Permissao necessaria: `compliance.write`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PublicComplianceSession"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicComplianceSession"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicComplianceSession"
                }
              }
            }
          },
          "429": {
            "description": "Limite de uso atingido. Respeite Retry-After."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/v1/kyc/{id}": {
      "get": {
        "tags": [
          "07 - KYC"
        ],
        "summary": "Consultar status e historico",
        "description": "Permissao necessaria: `compliance.read`.\n\nRetorna o caso, seu historico e metadados dos documentos associados. Esta consulta nao disponibiliza o conteudo dos arquivos nem representa aprovacao para realizar operacoes financeiras.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ComplianceDetailResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComplianceDetailResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComplianceDetailResponse"
                }
              }
            }
          },
          "400": {
            "description": "Consulte campos, permissoes, conta e versao do recurso."
          },
          "401": {
            "description": "Consulte campos, permissoes, conta e versao do recurso."
          },
          "403": {
            "description": "Consulte campos, permissoes, conta e versao do recurso."
          },
          "404": {
            "description": "Consulte campos, permissoes, conta e versao do recurso."
          },
          "409": {
            "description": "Consulte campos, permissoes, conta e versao do recurso."
          },
          "429": {
            "description": "Limite de uso atingido. Respeite Retry-After."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/v1/kyc/sessions": {
      "post": {
        "tags": [
          "07 - KYC"
        ],
        "summary": "Gerar link de verificacao KYC/KYB",
        "description": "Permissao necessaria: `compliance.write`.\n\nGera um link publico para o cliente final preencher o wizard de KYC/KYB. O token vale por 72 horas e identifica apenas a sua conta. Nenhum dado do cliente e enviado nesta chamada. Trate o link e o token como credenciais temporarias e evite registra-los em logs.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PublicComplianceSession"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicComplianceSession"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicComplianceSession"
                }
              }
            }
          },
          "401": {
            "description": "Token de integracao ausente, invalido ou expirado."
          },
          "403": {
            "description": "A credencial precisa do scope `compliance.write`."
          },
          "429": {
            "description": "Limite de uso atingido. Respeite Retry-After."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "get": {
        "tags": [
          "07 - KYC"
        ],
        "summary": "Validar sessao publica",
        "description": "Valida anonimamente o token temporario recebido no link. O token deve ser enviado na query string; nao inclua dados pessoais no link e evite registrar a URL completa em logs. A resposta informa o tipo de fluxo e a expiracao, sem expor dados cadastrais.",
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PublicSessionInfo"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicSessionInfo"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicSessionInfo"
                }
              }
            }
          },
          "400": {
            "description": "Token ausente, invalido, expirado ou incompativel com o fluxo."
          },
          "429": {
            "description": "Limite de uso atingido. Respeite Retry-After."
          }
        }
      }
    },
    "/v1/kyc/submit": {
      "post": {
        "tags": [
          "07 - KYC"
        ],
        "summary": "Enviar formulario de verificacao",
        "description": "\n\nEndpoint publico usado pelo wizard hospedado para Pessoa Fisica (PF). O token da sessao e o `requisicaoId` devem ser enviados no corpo. Documentos usam base64, com limite de 5 MB por arquivo e 25 MB por requisicao HTTP. Apenas as categorias documentais publicadas no fluxo sao aceitas. Os arquivos e dados sao protegidos antes da persistencia; a resposta 202 confirma recebimento, nao aprovacao.",
        "requestBody": {
          "description": "Dados cadastrais e documentos do wizard hospedado. Envie o token recebido na criacao da sessao.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicKycSubmission"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ComplianceCaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComplianceCaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComplianceCaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Sessao, cadastro, categoria documental ou arquivo invalido."
          },
          "413": {
            "description": "Corpo da requisicao acima do limite de 25 MB."
          },
          "429": {
            "description": "Limite de uso atingido. Respeite Retry-After."
          }
        }
      }
    },
    "/v1/kyb": {
      "post": {
        "tags": [
          "08 - KYB"
        ],
        "summary": "Enviar cliente para analise",
        "description": "Permissao necessaria: `compliance.write`.\n\nAbre o caso de um cliente previamente cadastrado, so com os dados (`clienteId` da mesma conta). O caso fica `AguardandoDocumentos` e a resposta traz `linkCompletar` (`token` e `path`): envie o cliente para `{portal}{path}?token={token}` para ele mandar documento e selfie (no KYB, os do responsavel legal, contrato social e cartao CNPJ). A analise so comeca depois disso. O link vale 72 horas; renove em `POST /v1/kyc/{id}/link` ou `POST /v1/kyb/{id}/link`. Para o cadastro completo pelo formulario, use `POST /v1/kyc/sessions` ou `POST /v1/kyb/sessions`. Envie `Idempotency-Key` como UUID; repetir a chave com o mesmo cliente retorna o caso existente, enquanto reutiliza-la com outro cliente retorna `409 Conflict`. A resposta `202 Accepted` confirma a abertura do caso, nao a aprovacao.",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "description": "UUID obrigatorio. Repetir a mesma chave e cliente retorna o caso atual; outra solicitacao retorna 409.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "Identificador (`clienteId`) de um cliente previamente cadastrado na mesma conta. Esta rota nao recebe os dados do cadastro.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnviarComplianceRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/EnviarComplianceRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnviarComplianceRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ComplianceCaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComplianceCaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComplianceCaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Consulte campos, permissoes, conta e versao do recurso."
          },
          "401": {
            "description": "Consulte campos, permissoes, conta e versao do recurso."
          },
          "403": {
            "description": "Consulte campos, permissoes, conta e versao do recurso."
          },
          "404": {
            "description": "Consulte campos, permissoes, conta e versao do recurso."
          },
          "409": {
            "description": "Consulte campos, permissoes, conta e versao do recurso."
          },
          "429": {
            "description": "Limite de uso atingido. Respeite Retry-After."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "get": {
        "tags": [
          "08 - KYB"
        ],
        "summary": "Listar solicitacoes de analise",
        "description": "Permissao necessaria: `compliance.read`.\n\nLista casos de compliance da conta para acompanhamento. O status retornado nao representa, por si so, aprovacao para realizar operacoes financeiras. `take` padrao 25 (limite de 1 a 100), `skip` padrao 0 e `status` opcional. A resposta contem `items` e `hasMore`; o total nao e informado.",
        "parameters": [
          {
            "name": "take",
            "in": "query",
            "description": "Quantidade de casos. Padrao 25; valor efetivo limitado ao intervalo de 1 a 100.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 25
            }
          },
          {
            "name": "skip",
            "in": "query",
            "description": "Quantidade de casos a ignorar. Padrao 0; valores negativos sao tratados como 0.",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Filtra pelo status do caso; parametro opcional.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/CompliancePageResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompliancePageResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompliancePageResponse"
                }
              }
            }
          },
          "400": {
            "description": "Consulte campos, permissoes, conta e versao do recurso."
          },
          "401": {
            "description": "Consulte campos, permissoes, conta e versao do recurso."
          },
          "403": {
            "description": "Consulte campos, permissoes, conta e versao do recurso."
          },
          "404": {
            "description": "Consulte campos, permissoes, conta e versao do recurso."
          },
          "409": {
            "description": "Consulte campos, permissoes, conta e versao do recurso."
          },
          "429": {
            "description": "Limite de uso atingido. Respeite Retry-After."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/v1/kyb/{id}/link": {
      "post": {
        "tags": [
          "08 - KYB"
        ],
        "description": "Permissao necessaria: `compliance.write`.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PublicComplianceSession"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicComplianceSession"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicComplianceSession"
                }
              }
            }
          },
          "429": {
            "description": "Limite de uso atingido. Respeite Retry-After."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/v1/kyb/{id}": {
      "get": {
        "tags": [
          "08 - KYB"
        ],
        "summary": "Consultar status e historico",
        "description": "Permissao necessaria: `compliance.read`.\n\nRetorna o caso, seu historico e metadados dos documentos associados. Esta consulta nao disponibiliza o conteudo dos arquivos nem representa aprovacao para realizar operacoes financeiras.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ComplianceDetailResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComplianceDetailResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComplianceDetailResponse"
                }
              }
            }
          },
          "400": {
            "description": "Consulte campos, permissoes, conta e versao do recurso."
          },
          "401": {
            "description": "Consulte campos, permissoes, conta e versao do recurso."
          },
          "403": {
            "description": "Consulte campos, permissoes, conta e versao do recurso."
          },
          "404": {
            "description": "Consulte campos, permissoes, conta e versao do recurso."
          },
          "409": {
            "description": "Consulte campos, permissoes, conta e versao do recurso."
          },
          "429": {
            "description": "Limite de uso atingido. Respeite Retry-After."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      }
    },
    "/v1/kyb/sessions": {
      "post": {
        "tags": [
          "08 - KYB"
        ],
        "summary": "Gerar link de verificacao KYC/KYB",
        "description": "Permissao necessaria: `compliance.write`.\n\nGera um link publico para o cliente final preencher o wizard de KYC/KYB. O token vale por 72 horas e identifica apenas a sua conta. Nenhum dado do cliente e enviado nesta chamada. Trate o link e o token como credenciais temporarias e evite registra-los em logs.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PublicComplianceSession"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicComplianceSession"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicComplianceSession"
                }
              }
            }
          },
          "401": {
            "description": "Token de integracao ausente, invalido ou expirado."
          },
          "403": {
            "description": "A credencial precisa do scope `compliance.write`."
          },
          "429": {
            "description": "Limite de uso atingido. Respeite Retry-After."
          }
        },
        "security": [
          {
            "Bearer": [ ]
          }
        ]
      },
      "get": {
        "tags": [
          "08 - KYB"
        ],
        "summary": "Validar sessao publica",
        "description": "Valida anonimamente o token temporario recebido no link. O token deve ser enviado na query string; nao inclua dados pessoais no link e evite registrar a URL completa em logs. A resposta informa o tipo de fluxo e a expiracao, sem expor dados cadastrais.",
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/PublicSessionInfo"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicSessionInfo"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicSessionInfo"
                }
              }
            }
          },
          "400": {
            "description": "Token ausente, invalido, expirado ou incompativel com o fluxo."
          },
          "429": {
            "description": "Limite de uso atingido. Respeite Retry-After."
          }
        }
      }
    },
    "/v1/kyb/submit": {
      "post": {
        "tags": [
          "08 - KYB"
        ],
        "summary": "Enviar formulario de verificacao",
        "description": "\n\nEndpoint publico usado pelo wizard hospedado para Pessoa Juridica (PJ). O token da sessao e o `requisicaoId` devem ser enviados no corpo. Documentos usam base64, com limite de 5 MB por arquivo e 25 MB por requisicao HTTP. Apenas as categorias documentais publicadas no fluxo sao aceitas. Os arquivos e dados sao protegidos antes da persistencia; a resposta 202 confirma recebimento, nao aprovacao.",
        "requestBody": {
          "description": "Dados cadastrais e documentos do wizard hospedado. Envie o token recebido na criacao da sessao.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicKybSubmission"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ComplianceCaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComplianceCaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ComplianceCaseResponse"
                }
              }
            }
          },
          "400": {
            "description": "Sessao, cadastro, categoria documental ou arquivo invalido."
          },
          "413": {
            "description": "Corpo da requisicao acima do limite de 25 MB."
          },
          "429": {
            "description": "Limite de uso atingido. Respeite Retry-After."
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AlertasAnalise": {
        "type": "object",
        "properties": {
          "sancao": {
            "type": "boolean"
          },
          "mandadoPrisao": {
            "type": "boolean"
          },
          "pep": {
            "type": "boolean"
          },
          "obito": {
            "type": "boolean"
          },
          "cpfIrregular": {
            "type": "boolean"
          },
          "documentoAdulterado": {
            "type": "boolean"
          },
          "verificacaoIncompleta": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "AnaliseKycResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "nullable": true
          },
          "tentativas": {
            "type": "integer",
            "format": "int32"
          },
          "semPendencias": {
            "type": "boolean",
            "nullable": true
          },
          "exigeJustificativaReforcada": {
            "type": "boolean"
          },
          "alertaMandadoPrisao": {
            "type": "boolean"
          },
          "resumo": {
            "type": "string",
            "nullable": true
          },
          "scoreGeral": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "verificacoes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VerificacaoKyc"
            },
            "nullable": true
          },
          "pendencias": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "informacoes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "alertas": {
            "$ref": "#/components/schemas/AlertasAnalise"
          },
          "ultimoErro": {
            "type": "string",
            "nullable": true
          },
          "concluidaEmUtc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "AtualizarClienteRequest": {
        "type": "object",
        "properties": {
          "nomeCompleto": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "documento": {
            "type": "string",
            "nullable": true
          },
          "tipoDocumento": {
            "type": "string",
            "nullable": true
          },
          "telefone": {
            "type": "string",
            "nullable": true
          },
          "enderecoLogradouro": {
            "type": "string",
            "nullable": true
          },
          "enderecoNumero": {
            "type": "string",
            "nullable": true
          },
          "enderecoComplemento": {
            "type": "string",
            "nullable": true
          },
          "enderecoBairro": {
            "type": "string",
            "nullable": true
          },
          "enderecoCidade": {
            "type": "string",
            "nullable": true
          },
          "enderecoEstado": {
            "type": "string",
            "nullable": true
          },
          "enderecoPais": {
            "type": "string",
            "nullable": true
          },
          "enderecoCep": {
            "type": "string",
            "nullable": true
          },
          "observacoes": {
            "type": "string",
            "nullable": true
          },
          "chaveExterna": {
            "type": "string",
            "nullable": true
          },
          "ativo": {
            "type": "boolean",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "AtualizarProdutoRequest": {
        "type": "object",
        "properties": {
          "sku": {
            "type": "string",
            "nullable": true
          },
          "nome": {
            "type": "string",
            "nullable": true
          },
          "descricao": {
            "type": "string",
            "nullable": true
          },
          "precoBrl": {
            "type": "number",
            "format": "double"
          },
          "moeda": {
            "type": "string",
            "nullable": true
          },
          "categoria": {
            "type": "string",
            "nullable": true
          },
          "imagemUrl": {
            "type": "string",
            "nullable": true
          },
          "urlExterna": {
            "type": "string",
            "nullable": true
          },
          "estoque": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "estoqueInfinito": {
            "type": "boolean",
            "nullable": true
          },
          "ativo": {
            "type": "boolean",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "AtualizarWebhookSubscriptionRequest": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "nullable": true
          },
          "secret": {
            "type": "string",
            "nullable": true
          },
          "eventos": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "descricao": {
            "type": "string",
            "nullable": true
          },
          "ativo": {
            "type": "boolean",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CheckoutResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "tipoPessoa": {
            "type": "string",
            "nullable": true
          },
          "valorBrl": {
            "type": "number",
            "format": "double"
          },
          "valorUsdtEstimado": {
            "type": "number",
            "format": "double"
          },
          "expiraEmUtc": {
            "type": "string",
            "format": "date-time"
          },
          "urlPagamento": {
            "type": "string",
            "nullable": true
          },
          "casoComplianceId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "vendaId": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "falhaCodigo": {
            "type": "string",
            "nullable": true
          },
          "redeCarteiraUsdt": {
            "type": "string",
            "nullable": true
          },
          "enderecoCarteiraDestino": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ClienteDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "nomeCompleto": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "documento": {
            "type": "string",
            "nullable": true
          },
          "tipoDocumento": {
            "type": "string",
            "nullable": true
          },
          "telefone": {
            "type": "string",
            "nullable": true
          },
          "enderecoLogradouro": {
            "type": "string",
            "nullable": true
          },
          "enderecoNumero": {
            "type": "string",
            "nullable": true
          },
          "enderecoComplemento": {
            "type": "string",
            "nullable": true
          },
          "enderecoBairro": {
            "type": "string",
            "nullable": true
          },
          "enderecoCidade": {
            "type": "string",
            "nullable": true
          },
          "enderecoEstado": {
            "type": "string",
            "nullable": true
          },
          "enderecoPais": {
            "type": "string",
            "nullable": true
          },
          "enderecoCep": {
            "type": "string",
            "nullable": true
          },
          "observacoes": {
            "type": "string",
            "nullable": true
          },
          "chaveExterna": {
            "type": "string",
            "nullable": true
          },
          "ativo": {
            "type": "boolean"
          },
          "criadoEm": {
            "type": "string",
            "format": "date-time"
          },
          "atualizadoEm": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ComplianceCaseResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "masterInstanceId": {
            "type": "integer",
            "format": "int64"
          },
          "clienteId": {
            "type": "integer",
            "format": "int64"
          },
          "ambiente": {
            "type": "string",
            "nullable": true
          },
          "tipo": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "motivoPublico": {
            "type": "string",
            "nullable": true
          },
          "versao": {
            "type": "string",
            "format": "uuid"
          },
          "criadoEmUtc": {
            "type": "string",
            "format": "date-time"
          },
          "atualizadoEmUtc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "aprovacaoFinanceira": {
            "type": "boolean"
          },
          "cadastro": {
            "type": "string",
            "nullable": true
          },
          "linkCompletar": {
            "$ref": "#/components/schemas/PublicComplianceSession"
          }
        },
        "additionalProperties": false
      },
      "ComplianceDetailResponse": {
        "type": "object",
        "properties": {
          "caso": {
            "$ref": "#/components/schemas/ComplianceCaseResponse"
          },
          "historico": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ComplianceHistoryResponse"
            },
            "nullable": true
          },
          "documentos": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ComplianceDocumentoResponse"
            },
            "nullable": true
          },
          "analise": {
            "$ref": "#/components/schemas/AnaliseKycResponse"
          }
        },
        "additionalProperties": false
      },
      "ComplianceDocumentoResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "categoria": {
            "type": "string",
            "nullable": true
          },
          "nomeArquivo": {
            "type": "string",
            "nullable": true
          },
          "contentType": {
            "type": "string",
            "nullable": true
          },
          "tamanhoBytes": {
            "type": "integer",
            "format": "int64"
          },
          "criadoEmUtc": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "ComplianceHistoryResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "nullable": true
          },
          "motivoPublico": {
            "type": "string",
            "nullable": true
          },
          "criadoEmUtc": {
            "type": "string",
            "format": "date-time"
          },
          "ator": {
            "type": "string",
            "nullable": true
          },
          "justificativa": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CompliancePageResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ComplianceCaseResponse"
            },
            "nullable": true
          },
          "hasMore": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "CotacaoResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "moedaEntrada": {
            "type": "string",
            "nullable": true
          },
          "valorEntrada": {
            "type": "number",
            "format": "double"
          },
          "valorBrl": {
            "type": "number",
            "format": "double"
          },
          "valorUsdtEstimado": {
            "type": "number",
            "format": "double"
          },
          "taxaBrlUsdtBase": {
            "type": "number",
            "format": "double"
          },
          "spreadPercentual": {
            "type": "number",
            "format": "double"
          },
          "expiraEmUtc": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "CreateDeveloperCredential": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CriarCheckoutRequest": {
        "type": "object",
        "properties": {
          "cotacaoId": {
            "type": "string",
            "format": "uuid"
          },
          "tipoPessoa": {
            "type": "string",
            "nullable": true
          },
          "titulo": {
            "type": "string",
            "nullable": true
          },
          "descricao": {
            "type": "string",
            "nullable": true
          },
          "produtoId": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "quantidade": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "chaveExterna": {
            "type": "string",
            "nullable": true
          },
          "enderecoCarteiraDestino": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CriarClienteRequest": {
        "type": "object",
        "properties": {
          "nomeCompleto": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "documento": {
            "type": "string",
            "nullable": true
          },
          "tipoDocumento": {
            "type": "string",
            "nullable": true
          },
          "telefone": {
            "type": "string",
            "nullable": true
          },
          "enderecoLogradouro": {
            "type": "string",
            "nullable": true
          },
          "enderecoNumero": {
            "type": "string",
            "nullable": true
          },
          "enderecoComplemento": {
            "type": "string",
            "nullable": true
          },
          "enderecoBairro": {
            "type": "string",
            "nullable": true
          },
          "enderecoCidade": {
            "type": "string",
            "nullable": true
          },
          "enderecoEstado": {
            "type": "string",
            "nullable": true
          },
          "enderecoPais": {
            "type": "string",
            "nullable": true
          },
          "enderecoCep": {
            "type": "string",
            "nullable": true
          },
          "observacoes": {
            "type": "string",
            "nullable": true
          },
          "chaveExterna": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CriarClienteResponse": {
        "type": "object",
        "properties": {
          "clienteId": {
            "type": "integer",
            "format": "int64"
          },
          "nomeCompleto": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CriarCotacaoRequest": {
        "type": "object",
        "properties": {
          "valor": {
            "type": "number",
            "format": "double"
          },
          "moeda": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CriarProdutoRequest": {
        "type": "object",
        "properties": {
          "sku": {
            "type": "string",
            "nullable": true
          },
          "nome": {
            "type": "string",
            "nullable": true
          },
          "descricao": {
            "type": "string",
            "nullable": true
          },
          "precoBrl": {
            "type": "number",
            "format": "double"
          },
          "moeda": {
            "type": "string",
            "nullable": true
          },
          "categoria": {
            "type": "string",
            "nullable": true
          },
          "imagemUrl": {
            "type": "string",
            "nullable": true
          },
          "urlExterna": {
            "type": "string",
            "nullable": true
          },
          "estoque": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "estoqueInfinito": {
            "type": "boolean",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CriarProdutoResponse": {
        "type": "object",
        "properties": {
          "produtoId": {
            "type": "integer",
            "format": "int64"
          },
          "sku": {
            "type": "string",
            "nullable": true
          },
          "nome": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CriarVendaRequest": {
        "type": "object",
        "properties": {
          "titulo": {
            "type": "string",
            "nullable": true
          },
          "descricao": {
            "type": "string",
            "nullable": true
          },
          "valorBrl": {
            "type": "number",
            "format": "double"
          },
          "moedaRecebimento": {
            "type": "string",
            "nullable": true
          },
          "produtoId": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "clienteId": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "quantidade": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "chaveExterna": {
            "type": "string",
            "nullable": true
          },
          "enderecoCarteiraDestino": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CriarVendaResponse": {
        "type": "object",
        "properties": {
          "vendaId": {
            "type": "integer",
            "format": "int64"
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "criadoEm": {
            "type": "string",
            "format": "date-time"
          },
          "valorUsdt": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "cotacaoUsdBrl": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "taxaSpreadPercentualAplicada": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "qrCodeEmv": {
            "type": "string",
            "nullable": true
          },
          "qrCodeBase64Png": {
            "type": "string",
            "nullable": true
          },
          "expiraEm": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "redeCarteiraUsdtAplicada": {
            "type": "string",
            "nullable": true
          },
          "enderecoCarteiraDestino": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CriarWebhookSubscriptionRequest": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "nullable": true
          },
          "secret": {
            "type": "string",
            "nullable": true
          },
          "eventos": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "descricao": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CriarWebhookSubscriptionResponse": {
        "type": "object",
        "properties": {
          "subscriptionId": {
            "type": "integer",
            "format": "int64"
          },
          "ativo": {
            "type": "boolean"
          },
          "eventos": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "EnviarComplianceRequest": {
        "type": "object",
        "properties": {
          "clienteId": {
            "type": "integer",
            "format": "int64"
          }
        },
        "additionalProperties": false
      },
      "LoginResponse": {
        "type": "object",
        "properties": {
          "accessToken": {
            "type": "string",
            "nullable": true
          },
          "expiresAtUtc": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "PagedResponseOfClienteDto": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClienteDto"
            },
            "nullable": true
          },
          "totalCount": {
            "type": "integer",
            "format": "int64"
          },
          "skip": {
            "type": "integer",
            "format": "int32"
          },
          "take": {
            "type": "integer",
            "format": "int32"
          },
          "hasMore": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "PagedResponseOfProdutoDto": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProdutoDto"
            },
            "nullable": true
          },
          "totalCount": {
            "type": "integer",
            "format": "int64"
          },
          "skip": {
            "type": "integer",
            "format": "int32"
          },
          "take": {
            "type": "integer",
            "format": "int32"
          },
          "hasMore": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "PagedResponseOfVendaDto": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VendaDto"
            },
            "nullable": true
          },
          "totalCount": {
            "type": "integer",
            "format": "int64"
          },
          "skip": {
            "type": "integer",
            "format": "int32"
          },
          "take": {
            "type": "integer",
            "format": "int32"
          },
          "hasMore": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "PagedResponseOfWebhookEventoEnviadoDto": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookEventoEnviadoDto"
            },
            "nullable": true
          },
          "totalCount": {
            "type": "integer",
            "format": "int64"
          },
          "skip": {
            "type": "integer",
            "format": "int32"
          },
          "take": {
            "type": "integer",
            "format": "int32"
          },
          "hasMore": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "PagedResponseOfWebhookSubscriptionDto": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookSubscriptionDto"
            },
            "nullable": true
          },
          "totalCount": {
            "type": "integer",
            "format": "int64"
          },
          "skip": {
            "type": "integer",
            "format": "int32"
          },
          "take": {
            "type": "integer",
            "format": "int32"
          },
          "hasMore": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "ProdutoDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "sku": {
            "type": "string",
            "nullable": true
          },
          "nome": {
            "type": "string",
            "nullable": true
          },
          "descricao": {
            "type": "string",
            "nullable": true
          },
          "precoBrl": {
            "type": "number",
            "format": "double"
          },
          "moeda": {
            "type": "string",
            "nullable": true
          },
          "categoria": {
            "type": "string",
            "nullable": true
          },
          "imagemUrl": {
            "type": "string",
            "nullable": true
          },
          "urlExterna": {
            "type": "string",
            "nullable": true
          },
          "estoque": {
            "type": "integer",
            "format": "int32"
          },
          "estoqueInfinito": {
            "type": "boolean"
          },
          "ativo": {
            "type": "boolean"
          },
          "criadoEm": {
            "type": "string",
            "format": "date-time"
          },
          "atualizadoEm": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PublicCheckoutResponse": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "titulo": {
            "type": "string",
            "nullable": true
          },
          "descricao": {
            "type": "string",
            "nullable": true
          },
          "tipoPessoa": {
            "type": "string",
            "nullable": true
          },
          "valorBrl": {
            "type": "number",
            "format": "double"
          },
          "valorUsdtEstimado": {
            "type": "number",
            "format": "double"
          },
          "expiraEmUtc": {
            "type": "string",
            "format": "date-time"
          },
          "vendaId": {
            "type": "integer",
            "format": "int64",
            "nullable": true
          },
          "qrCodeEmv": {
            "type": "string",
            "nullable": true
          },
          "pixExpiraEmUtc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "redeCarteiraUsdt": {
            "type": "string",
            "nullable": true
          },
          "enderecoCarteiraDestino": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PublicComplianceSession": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "nullable": true
          },
          "path": {
            "type": "string",
            "nullable": true
          },
          "expiresAtUtc": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "PublicDocumento": {
        "type": "object",
        "properties": {
          "categoria": {
            "enum": [
              "documento_frente",
              "documento_verso",
              "selfie",
              "comprovante_endereco",
              "contrato_social",
              "cartao_cnpj",
              "alteracao_contratual"
            ],
            "type": "string",
            "description": "Categoria do arquivo enviado.",
            "nullable": true
          },
          "nomeArquivo": {
            "type": "string",
            "nullable": true
          },
          "contentType": {
            "type": "string",
            "nullable": true
          },
          "conteudoBase64": {
            "type": "string",
            "description": "Conteudo binario do arquivo codificado em Base64. Limite de 5 MB apos decodificacao.",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PublicKybSubmission": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "description": "Token temporario recebido na criacao da sessao. Trate como credencial.",
            "nullable": true
          },
          "requisicaoId": {
            "type": "string",
            "description": "UUID para identificar esta submissao e permitir repeticao idempotente.",
            "format": "uuid"
          },
          "razaoSocial": {
            "type": "string",
            "nullable": true
          },
          "documento": {
            "type": "string",
            "nullable": true
          },
          "nomeFantasia": {
            "type": "string",
            "nullable": true
          },
          "cnae": {
            "type": "string",
            "nullable": true
          },
          "capitalSocial": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "naturezaJuridica": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "telefone": {
            "type": "string",
            "nullable": true
          },
          "cep": {
            "type": "string",
            "nullable": true
          },
          "logradouro": {
            "type": "string",
            "nullable": true
          },
          "numero": {
            "type": "string",
            "nullable": true
          },
          "complemento": {
            "type": "string",
            "nullable": true
          },
          "bairro": {
            "type": "string",
            "nullable": true
          },
          "cidade": {
            "type": "string",
            "nullable": true
          },
          "estado": {
            "type": "string",
            "nullable": true
          },
          "responsavelLegal": {
            "$ref": "#/components/schemas/PublicResponsavelLegal"
          },
          "socios": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicSocio"
            },
            "nullable": true
          },
          "documentos": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicDocumento"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PublicKycSubmission": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "description": "Token temporario recebido na criacao da sessao. Trate como credencial.",
            "nullable": true
          },
          "requisicaoId": {
            "type": "string",
            "description": "UUID para identificar esta submissao e permitir repeticao idempotente.",
            "format": "uuid"
          },
          "nomeCompleto": {
            "type": "string",
            "nullable": true
          },
          "documento": {
            "type": "string",
            "nullable": true
          },
          "dataNascimento": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "telefone": {
            "type": "string",
            "nullable": true
          },
          "cep": {
            "type": "string",
            "nullable": true
          },
          "logradouro": {
            "type": "string",
            "nullable": true
          },
          "numero": {
            "type": "string",
            "nullable": true
          },
          "complemento": {
            "type": "string",
            "nullable": true
          },
          "bairro": {
            "type": "string",
            "nullable": true
          },
          "cidade": {
            "type": "string",
            "nullable": true
          },
          "estado": {
            "type": "string",
            "nullable": true
          },
          "renda": {
            "type": "string",
            "nullable": true
          },
          "profissao": {
            "type": "string",
            "nullable": true
          },
          "origemFundos": {
            "type": "string",
            "nullable": true
          },
          "pep": {
            "type": "boolean"
          },
          "documentos": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicDocumento"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PublicResponsavelLegal": {
        "type": "object",
        "properties": {
          "nomeCompleto": {
            "type": "string",
            "nullable": true
          },
          "documento": {
            "type": "string",
            "nullable": true
          },
          "dataNascimento": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "telefone": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PublicSessionInfo": {
        "type": "object",
        "properties": {
          "tipo": {
            "type": "string",
            "nullable": true
          },
          "expiresAtUtc": {
            "type": "string",
            "format": "date-time"
          },
          "modo": {
            "type": "string",
            "nullable": true
          },
          "nome": {
            "type": "string",
            "nullable": true
          },
          "documentoMascarado": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "PublicSocio": {
        "type": "object",
        "properties": {
          "nome": {
            "type": "string",
            "nullable": true
          },
          "documento": {
            "type": "string",
            "nullable": true
          },
          "participacao": {
            "type": "number",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "VendaClienteResumoDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "nomeCompleto": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "VendaDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "titulo": {
            "type": "string",
            "nullable": true
          },
          "descricao": {
            "type": "string",
            "nullable": true
          },
          "valorBrl": {
            "type": "number",
            "format": "double"
          },
          "moedaRecebimento": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "quantidade": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "chaveExterna": {
            "type": "string",
            "nullable": true
          },
          "criadoEm": {
            "type": "string",
            "format": "date-time"
          },
          "atualizadoEm": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "dataPagamento": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "dataCancelamento": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "produto": {
            "$ref": "#/components/schemas/VendaProdutoResumoDto"
          },
          "cliente": {
            "$ref": "#/components/schemas/VendaClienteResumoDto"
          },
          "valorUsdt": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "cotacaoUsdBrl": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "taxaSpreadPercentualAplicada": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "qrCodeEmv": {
            "type": "string",
            "nullable": true
          },
          "expiraEm": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "redeCarteiraUsdtAplicada": {
            "type": "string",
            "nullable": true
          },
          "enderecoCarteiraDestino": {
            "type": "string",
            "nullable": true
          },
          "txIdBlockchain": {
            "type": "string",
            "nullable": true
          },
          "valorUsdtRecebido": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "monitoradoPagoEm": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "requisicaoCriacao": {
            "$ref": "#/components/schemas/CriarVendaRequest"
          }
        },
        "additionalProperties": false
      },
      "VendaProdutoResumoDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "sku": {
            "type": "string",
            "nullable": true
          },
          "nome": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "VerificacaoKyc": {
        "type": "object",
        "properties": {
          "chave": {
            "type": "string",
            "nullable": true
          },
          "rotulo": {
            "type": "string",
            "nullable": true
          },
          "situacao": {
            "type": "string",
            "nullable": true
          },
          "score": {
            "type": "number",
            "format": "double"
          },
          "motivos": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "WebhookEventoEnviadoDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "eventId": {
            "type": "string",
            "nullable": true
          },
          "eventType": {
            "type": "string",
            "nullable": true
          },
          "subjectType": {
            "type": "string",
            "nullable": true
          },
          "subjectId": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "attemptCount": {
            "type": "integer",
            "format": "int32"
          },
          "maxAttempts": {
            "type": "integer",
            "format": "int32"
          },
          "createdAtUtc": {
            "type": "string",
            "format": "date-time"
          },
          "nextAttemptAtUtc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "deliveredAtUtc": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "lastHttpStatus": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "lastError": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "WebhookSubscriptionDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "url": {
            "type": "string",
            "nullable": true
          },
          "eventos": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "ativo": {
            "type": "boolean"
          },
          "criadoEm": {
            "type": "string",
            "format": "date-time"
          },
          "descricao": {
            "type": "string",
            "nullable": true
          },
          "atualizadoEm": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  }
}