{
  "components": {
    "schemas": {
      "AccountCreate": {
        "properties": {
          "address": {
            "anyOf": [
              {
                "maxLength": 128,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Address"
          },
          "chain": {
            "anyOf": [
              {
                "maxLength": 24,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Chain"
          },
          "color": {
            "anyOf": [
              {
                "maxLength": 9,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Color"
          },
          "currency": {
            "maxLength": 12,
            "minLength": 2,
            "title": "Currency",
            "type": "string"
          },
          "details": {
            "default": "",
            "maxLength": 2000,
            "title": "Details",
            "type": "string"
          },
          "external_signer": {
            "default": false,
            "title": "External Signer",
            "type": "boolean"
          },
          "kind": {
            "$ref": "#/components/schemas/AccountKind"
          },
          "name": {
            "maxLength": 120,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "network": {
            "anyOf": [
              {
                "maxLength": 24,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Network"
          },
          "opening_acquired_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Opening Acquired On"
          },
          "opening_balance": {
            "anyOf": [
              {
                "maximum": 1e+16,
                "minimum": -1e+16,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "default": "0",
            "title": "Opening Balance"
          },
          "opening_cost": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "maximum": 1e+16,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Opening Cost"
          }
        },
        "required": [
          "kind",
          "name",
          "currency"
        ],
        "title": "AccountCreate",
        "type": "object"
      },
      "AccountKind": {
        "enum": [
          "bank",
          "card",
          "cash",
          "crypto",
          "platform"
        ],
        "title": "AccountKind",
        "type": "string"
      },
      "AgentChainPaymentIn": {
        "description": "An on-chain send an agent puts forward for a person to sign.",
        "properties": {
          "account_id": {
            "format": "uuid",
            "title": "Account Id",
            "type": "string"
          },
          "amount": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "maximum": 1e+16,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "title": "Amount"
          },
          "chain": {
            "maxLength": 24,
            "minLength": 2,
            "title": "Chain",
            "type": "string"
          },
          "currency": {
            "maxLength": 12,
            "minLength": 2,
            "title": "Currency",
            "type": "string"
          },
          "destination": {
            "maxLength": 256,
            "minLength": 8,
            "title": "Destination",
            "type": "string"
          },
          "note": {
            "default": "",
            "maxLength": 500,
            "title": "Note",
            "type": "string"
          },
          "occurred_on": {
            "format": "date",
            "title": "Occurred On",
            "type": "string"
          },
          "payee": {
            "maxLength": 200,
            "minLength": 1,
            "title": "Payee",
            "type": "string"
          }
        },
        "required": [
          "account_id",
          "amount",
          "chain",
          "destination",
          "currency",
          "occurred_on",
          "payee"
        ],
        "title": "AgentChainPaymentIn",
        "type": "object"
      },
      "AgentGrantChangeIn": {
        "description": "What an agent may ASK about its own fence.",
        "properties": {
          "allowed_merchants": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "maxItems": 20,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Allowed Merchants"
          },
          "daily_amount_cap_usd": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "maximum": 1e+16,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Daily Amount Cap Usd"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "reason": {
            "default": "",
            "maxLength": 200,
            "title": "Reason",
            "type": "string"
          },
          "x402_hosts": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "maxItems": 20,
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "X402 Hosts"
          }
        },
        "title": "AgentGrantChangeIn",
        "type": "object"
      },
      "AgentMeOut": {
        "description": "Who the agent is and what it may do.",
        "properties": {
          "agent_id": {
            "format": "uuid",
            "title": "Agent Id",
            "type": "string"
          },
          "masked": {
            "default": true,
            "title": "Masked",
            "type": "boolean"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "observing": {
            "title": "Observing",
            "type": "boolean"
          },
          "owner_name": {
            "title": "Owner Name",
            "type": "string"
          },
          "spaces": {
            "default": [],
            "items": {
              "$ref": "#/components/schemas/AgentSpaceOut"
            },
            "title": "Spaces",
            "type": "array"
          },
          "status": {
            "$ref": "#/components/schemas/AgentStatus"
          }
        },
        "required": [
          "agent_id",
          "name",
          "status",
          "observing",
          "owner_name"
        ],
        "title": "AgentMeOut",
        "type": "object"
      },
      "AgentPaymentIn": {
        "properties": {
          "account_id": {
            "format": "uuid",
            "title": "Account Id",
            "type": "string"
          },
          "amount": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "maximum": 1e+16,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "title": "Amount"
          },
          "category_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category Id"
          },
          "currency": {
            "anyOf": [
              {
                "maxLength": 12,
                "minLength": 2,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Currency"
          },
          "note": {
            "default": "",
            "maxLength": 500,
            "title": "Note",
            "type": "string"
          },
          "occurred_on": {
            "format": "date",
            "title": "Occurred On",
            "type": "string"
          },
          "payee": {
            "maxLength": 200,
            "minLength": 1,
            "title": "Payee",
            "type": "string"
          }
        },
        "required": [
          "account_id",
          "amount",
          "payee",
          "occurred_on"
        ],
        "title": "AgentPaymentIn",
        "type": "object"
      },
      "AgentSpaceOut": {
        "properties": {
          "account_ids": {
            "default": [],
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "title": "Account Ids",
            "type": "array"
          },
          "accounts_restricted": {
            "default": false,
            "title": "Accounts Restricted",
            "type": "boolean"
          },
          "base_currency": {
            "title": "Base Currency",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "number_format": {
            "default": "dot_comma",
            "title": "Number Format",
            "type": "string"
          },
          "perms": {
            "items": {
              "type": "string"
            },
            "title": "Perms",
            "type": "array"
          },
          "preset": {
            "title": "Preset",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "kind",
          "base_currency",
          "preset",
          "perms"
        ],
        "title": "AgentSpaceOut",
        "type": "object"
      },
      "AgentStatus": {
        "enum": [
          "observing",
          "active",
          "frozen"
        ],
        "title": "AgentStatus",
        "type": "string"
      },
      "AgentTxIn": {
        "properties": {
          "account_id": {
            "format": "uuid",
            "title": "Account Id",
            "type": "string"
          },
          "amount": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "maximum": 1e+16,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "title": "Amount"
          },
          "category_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category Id"
          },
          "kind": {
            "$ref": "#/components/schemas/TxKind"
          },
          "note": {
            "default": "",
            "maxLength": 500,
            "title": "Note",
            "type": "string"
          },
          "occurred_on": {
            "format": "date",
            "title": "Occurred On",
            "type": "string"
          },
          "payee": {
            "default": "",
            "maxLength": 200,
            "title": "Payee",
            "type": "string"
          }
        },
        "required": [
          "account_id",
          "kind",
          "amount",
          "occurred_on"
        ],
        "title": "AgentTxIn",
        "type": "object"
      },
      "AgentTxPatch": {
        "description": "What an agent may correct on a booked row.",
        "properties": {
          "category_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category Id"
          },
          "clear_category": {
            "default": false,
            "title": "Clear Category",
            "type": "boolean"
          },
          "note": {
            "anyOf": [
              {
                "maxLength": 500,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Note"
          },
          "payee": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payee"
          }
        },
        "title": "AgentTxPatch",
        "type": "object"
      },
      "AgentWalletTransferIn": {
        "description": "A spend from the agent's own hot wallet.",
        "properties": {
          "amount": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "maximum": 1e+16,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "title": "Amount"
          },
          "asset": {
            "maxLength": 12,
            "minLength": 3,
            "title": "Asset",
            "type": "string"
          },
          "chain": {
            "maxLength": 12,
            "minLength": 3,
            "title": "Chain",
            "type": "string"
          },
          "destination": {
            "maxLength": 128,
            "minLength": 8,
            "title": "Destination",
            "type": "string"
          },
          "network": {
            "default": "base",
            "maxLength": 24,
            "title": "Network",
            "type": "string"
          },
          "payee": {
            "default": "",
            "maxLength": 200,
            "title": "Payee",
            "type": "string"
          }
        },
        "required": [
          "chain",
          "asset",
          "amount",
          "destination"
        ],
        "title": "AgentWalletTransferIn",
        "type": "object"
      },
      "AgentWriteOut": {
        "description": "The answer to every mutating agent call.",
        "properties": {
          "applied": {
            "title": "Applied",
            "type": "boolean"
          },
          "message": {
            "default": "",
            "title": "Message",
            "type": "string"
          },
          "proposal_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Proposal Id"
          },
          "result": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Result"
          }
        },
        "required": [
          "applied"
        ],
        "title": "AgentWriteOut",
        "type": "object"
      },
      "AgentX402In": {
        "description": "Fetch a URL, paying its 402 from the agent's float if it asks for one.",
        "properties": {
          "url": {
            "maxLength": 2000,
            "minLength": 8,
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "url"
        ],
        "title": "AgentX402In",
        "type": "object"
      },
      "ChargeCreate": {
        "description": "One call of the seller's service, charged to a named client.",
        "properties": {
          "account_id": {
            "format": "uuid",
            "title": "Account Id",
            "type": "string"
          },
          "amount": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "maximum": 1e+16,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "title": "Amount"
          },
          "client_ref": {
            "maxLength": 120,
            "minLength": 1,
            "title": "Client Ref",
            "type": "string"
          },
          "currency": {
            "default": "USD",
            "maxLength": 8,
            "title": "Currency",
            "type": "string"
          },
          "memo": {
            "default": "",
            "maxLength": 200,
            "title": "Memo",
            "type": "string"
          },
          "resource": {
            "default": "",
            "maxLength": 300,
            "title": "Resource",
            "type": "string"
          },
          "top_up_amount": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "maximum": 1e+16,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Top Up Amount"
          }
        },
        "required": [
          "client_ref",
          "account_id",
          "amount"
        ],
        "title": "ChargeCreate",
        "type": "object"
      },
      "ChargeOut": {
        "description": "Either the call is paid from credit, or here is what to pay to go on.",
        "properties": {
          "balance_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Balance Url"
          },
          "balance_usd": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Balance Usd",
            "type": "string"
          },
          "charged_usd": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Charged Usd"
          },
          "client_ref": {
            "title": "Client Ref",
            "type": "string"
          },
          "entry_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Entry Id"
          },
          "paid": {
            "title": "Paid",
            "type": "boolean"
          },
          "top_up": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaymentRequestOut"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "paid",
          "client_ref",
          "balance_usd"
        ],
        "title": "ChargeOut",
        "type": "object"
      },
      "ChatLinkOut": {
        "description": "What an operator needs to wire one client group: add the bot, then paste the /linkclient command.",
        "properties": {
          "bot_username": {
            "title": "Bot Username",
            "type": "string"
          },
          "code": {
            "title": "Code",
            "type": "string"
          },
          "command": {
            "title": "Command",
            "type": "string"
          }
        },
        "required": [
          "code",
          "bot_username",
          "command"
        ],
        "title": "ChatLinkOut",
        "type": "object"
      },
      "ClientOverride": {
        "description": "Client requisites for one mirrored invoice.",
        "properties": {
          "address": {
            "default": "",
            "maxLength": 2000,
            "title": "Address",
            "type": "string"
          },
          "country": {
            "default": "",
            "maxLength": 80,
            "title": "Country",
            "type": "string"
          },
          "email": {
            "default": "",
            "maxLength": 200,
            "title": "Email",
            "type": "string"
          },
          "name": {
            "default": "",
            "maxLength": 200,
            "title": "Name",
            "type": "string"
          },
          "phone": {
            "default": "",
            "maxLength": 40,
            "title": "Phone",
            "type": "string"
          },
          "reg_number": {
            "default": "",
            "maxLength": 64,
            "title": "Reg Number",
            "type": "string"
          },
          "tax_id": {
            "default": "",
            "maxLength": 64,
            "title": "Tax Id",
            "type": "string"
          }
        },
        "title": "ClientOverride",
        "type": "object"
      },
      "ContactAddressIn": {
        "properties": {
          "address": {
            "default": "",
            "maxLength": 256,
            "title": "Address",
            "type": "string"
          },
          "chain": {
            "anyOf": [
              {
                "maxLength": 24,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Chain"
          },
          "details": {
            "default": "",
            "maxLength": 2000,
            "title": "Details",
            "type": "string"
          },
          "is_primary": {
            "default": false,
            "title": "Is Primary",
            "type": "boolean"
          },
          "label": {
            "default": "",
            "maxLength": 80,
            "title": "Label",
            "type": "string"
          },
          "network": {
            "anyOf": [
              {
                "maxLength": 24,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Network"
          },
          "requisites": {
            "anyOf": [
              {
                "discriminator": {
                  "mapping": {
                    "sepa": "#/components/schemas/SepaRequisites",
                    "swift": "#/components/schemas/SwiftRequisites",
                    "uk": "#/components/schemas/UkRequisites",
                    "us_ach": "#/components/schemas/UsAchRequisites"
                  },
                  "propertyName": "scheme"
                },
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/SepaRequisites"
                  },
                  {
                    "$ref": "#/components/schemas/UkRequisites"
                  },
                  {
                    "$ref": "#/components/schemas/UsAchRequisites"
                  },
                  {
                    "$ref": "#/components/schemas/SwiftRequisites"
                  }
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Requisites"
          }
        },
        "title": "ContactAddressIn",
        "type": "object"
      },
      "ContactAddressOut": {
        "properties": {
          "address": {
            "title": "Address",
            "type": "string"
          },
          "chain": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Chain"
          },
          "details": {
            "default": "",
            "title": "Details",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "is_primary": {
            "default": false,
            "title": "Is Primary",
            "type": "boolean"
          },
          "label": {
            "title": "Label",
            "type": "string"
          },
          "network": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Network"
          },
          "requisites": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Requisites"
          }
        },
        "required": [
          "id",
          "label",
          "address",
          "chain"
        ],
        "title": "ContactAddressOut",
        "type": "object"
      },
      "ContactCreate": {
        "properties": {
          "address": {
            "default": "",
            "maxLength": 2000,
            "title": "Address",
            "type": "string"
          },
          "addresses": {
            "items": {
              "$ref": "#/components/schemas/ContactAddressIn"
            },
            "maxItems": 20,
            "title": "Addresses",
            "type": "array"
          },
          "compliance": {
            "default": "",
            "maxLength": 120,
            "title": "Compliance",
            "type": "string"
          },
          "country": {
            "default": "",
            "maxLength": 80,
            "title": "Country",
            "type": "string"
          },
          "email": {
            "default": "",
            "maxLength": 200,
            "title": "Email",
            "type": "string"
          },
          "identity_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Identity Id"
          },
          "kind": {
            "default": "person",
            "maxLength": 16,
            "title": "Kind",
            "type": "string"
          },
          "name": {
            "maxLength": 120,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "note": {
            "default": "",
            "maxLength": 2000,
            "title": "Note",
            "type": "string"
          },
          "phone": {
            "default": "",
            "maxLength": 40,
            "title": "Phone",
            "type": "string"
          },
          "reg_number": {
            "default": "",
            "maxLength": 64,
            "title": "Reg Number",
            "type": "string"
          },
          "save_to_book": {
            "default": false,
            "title": "Save To Book",
            "type": "boolean"
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "maxItems": 20,
            "title": "Tags",
            "type": "array"
          },
          "tax_id": {
            "default": "",
            "maxLength": 64,
            "title": "Tax Id",
            "type": "string"
          },
          "whitelisted": {
            "default": false,
            "title": "Whitelisted",
            "type": "boolean"
          }
        },
        "required": [
          "name"
        ],
        "title": "ContactCreate",
        "type": "object"
      },
      "ContactOut": {
        "properties": {
          "address": {
            "default": "",
            "title": "Address",
            "type": "string"
          },
          "addresses": {
            "items": {
              "$ref": "#/components/schemas/ContactAddressOut"
            },
            "title": "Addresses",
            "type": "array"
          },
          "compliance": {
            "title": "Compliance",
            "type": "string"
          },
          "country": {
            "default": "",
            "title": "Country",
            "type": "string"
          },
          "email": {
            "default": "",
            "title": "Email",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "identity_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Identity Id"
          },
          "kind": {
            "title": "Kind",
            "type": "string"
          },
          "last_paid_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Paid On"
          },
          "last_paid_usd": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Paid Usd"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "note": {
            "title": "Note",
            "type": "string"
          },
          "phone": {
            "default": "",
            "title": "Phone",
            "type": "string"
          },
          "reg_number": {
            "default": "",
            "title": "Reg Number",
            "type": "string"
          },
          "screening": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CounterpartyScreeningSummary"
              },
              {
                "type": "null"
              }
            ]
          },
          "tags": {
            "items": {
              "type": "string"
            },
            "title": "Tags",
            "type": "array"
          },
          "tax_id": {
            "default": "",
            "title": "Tax Id",
            "type": "string"
          },
          "tax_id_expected_format": {
            "default": "",
            "title": "Tax Id Expected Format",
            "type": "string"
          },
          "whitelist_reset": {
            "default": false,
            "title": "Whitelist Reset",
            "type": "boolean"
          },
          "whitelisted": {
            "title": "Whitelisted",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name",
          "note",
          "kind",
          "whitelisted",
          "compliance",
          "addresses"
        ],
        "title": "ContactOut",
        "type": "object"
      },
      "CounterpartyScreeningSummary": {
        "description": "The one-line verdict that rides on `ContactOut` for the card and the phone: enough to draw the traffic light, not the whole record.",
        "properties": {
          "checked_at": {
            "format": "date-time",
            "title": "Checked At",
            "type": "string"
          },
          "hits_more": {
            "default": 0,
            "title": "Hits More",
            "type": "integer"
          },
          "hits_open": {
            "title": "Hits Open",
            "type": "integer"
          },
          "registry_checked": {
            "title": "Registry Checked",
            "type": "boolean"
          },
          "registry_found": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Registry Found"
          },
          "verdict": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Verdict"
          }
        },
        "required": [
          "verdict",
          "checked_at",
          "hits_open",
          "registry_checked"
        ],
        "title": "CounterpartyScreeningSummary",
        "type": "object"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "title": "Detail",
            "type": "array"
          }
        },
        "title": "HTTPValidationError",
        "type": "object"
      },
      "IntegrationInvoiceCreate": {
        "properties": {
          "account_id": {
            "format": "uuid",
            "title": "Account Id",
            "type": "string"
          },
          "client_address": {
            "default": "",
            "maxLength": 2000,
            "title": "Client Address",
            "type": "string"
          },
          "client_country": {
            "default": "",
            "maxLength": 80,
            "title": "Client Country",
            "type": "string"
          },
          "client_country_code": {
            "default": "",
            "maxLength": 2,
            "title": "Client Country Code",
            "type": "string"
          },
          "client_email": {
            "anyOf": [
              {
                "format": "email",
                "type": "string"
              },
              {
                "const": "",
                "type": "string"
              }
            ],
            "default": "",
            "title": "Client Email"
          },
          "client_name": {
            "maxLength": 200,
            "minLength": 1,
            "title": "Client Name",
            "type": "string"
          },
          "client_phone": {
            "default": "",
            "maxLength": 40,
            "title": "Client Phone",
            "type": "string"
          },
          "client_reg_number": {
            "default": "",
            "maxLength": 64,
            "title": "Client Reg Number",
            "type": "string"
          },
          "client_tax_id": {
            "default": "",
            "maxLength": 64,
            "title": "Client Tax Id",
            "type": "string"
          },
          "contact_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Id"
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Currency"
          },
          "due_on": {
            "format": "date",
            "title": "Due On",
            "type": "string"
          },
          "issued_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Issued On"
          },
          "line_items": {
            "items": {
              "$ref": "#/components/schemas/LineItem"
            },
            "maxItems": 200,
            "minItems": 1,
            "title": "Line Items",
            "type": "array"
          },
          "notes": {
            "default": "",
            "maxLength": 4000,
            "title": "Notes",
            "type": "string"
          },
          "number": {
            "anyOf": [
              {
                "maxLength": 40,
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Number"
          },
          "prices_include_tax": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prices Include Tax"
          },
          "project_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "purchase_order": {
            "default": "",
            "maxLength": 64,
            "title": "Purchase Order",
            "type": "string"
          },
          "save_contact": {
            "default": false,
            "title": "Save Contact",
            "type": "boolean"
          },
          "seller": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SellerOverride"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_authority_number": {
            "default": "",
            "maxLength": 64,
            "title": "Tax Authority Number",
            "type": "string"
          },
          "tax_exempt_reason": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tax Exempt Reason"
          },
          "tax_zero_reason": {
            "anyOf": [
              {
                "maxLength": 200,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tax Zero Reason"
          }
        },
        "required": [
          "account_id",
          "client_name",
          "line_items",
          "due_on"
        ],
        "title": "IntegrationInvoiceCreate",
        "type": "object"
      },
      "InvoiceDocKind": {
        "description": "A document that asks for money, or one that gives it back.",
        "enum": [
          "invoice",
          "credit_note",
          "quote"
        ],
        "title": "InvoiceDocKind",
        "type": "string"
      },
      "InvoiceOut": {
        "properties": {
          "account_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Id"
          },
          "auto_remind": {
            "default": true,
            "title": "Auto Remind",
            "type": "boolean"
          },
          "card_payments_enabled": {
            "default": true,
            "title": "Card Payments Enabled",
            "type": "boolean"
          },
          "card_payments_live": {
            "default": false,
            "title": "Card Payments Live",
            "type": "boolean"
          },
          "client_address": {
            "default": "",
            "title": "Client Address",
            "type": "string"
          },
          "client_country": {
            "default": "",
            "title": "Client Country",
            "type": "string"
          },
          "client_country_code": {
            "default": "",
            "title": "Client Country Code",
            "type": "string"
          },
          "client_email": {
            "title": "Client Email",
            "type": "string"
          },
          "client_name": {
            "title": "Client Name",
            "type": "string"
          },
          "client_phone": {
            "default": "",
            "title": "Client Phone",
            "type": "string"
          },
          "client_reg_number": {
            "default": "",
            "title": "Client Reg Number",
            "type": "string"
          },
          "client_tax_id": {
            "default": "",
            "title": "Client Tax Id",
            "type": "string"
          },
          "contact_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Contact Id"
          },
          "corrects_invoice_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Corrects Invoice Id"
          },
          "credited_amount": {
            "default": "0",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Credited Amount",
            "type": "string"
          },
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "delivered_in_app": {
            "default": false,
            "title": "Delivered In App",
            "type": "boolean"
          },
          "due_on": {
            "format": "date",
            "title": "Due On",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "issued_on": {
            "format": "date",
            "title": "Issued On",
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/InvoiceDocKind",
            "default": "invoice"
          },
          "last_paid_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Paid On"
          },
          "line_items": {
            "items": {},
            "title": "Line Items",
            "type": "array"
          },
          "notes": {
            "title": "Notes",
            "type": "string"
          },
          "number": {
            "title": "Number",
            "type": "string"
          },
          "paid_amount": {
            "default": "0",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Paid Amount",
            "type": "string"
          },
          "payer_marked_paid_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payer Marked Paid At"
          },
          "payment_withdrawn_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Payment Withdrawn At"
          },
          "prices_include_tax": {
            "default": false,
            "title": "Prices Include Tax",
            "type": "boolean"
          },
          "project_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Project Id"
          },
          "purchase_order": {
            "default": "",
            "title": "Purchase Order",
            "type": "string"
          },
          "seller_address": {
            "default": "",
            "title": "Seller Address",
            "type": "string"
          },
          "seller_country": {
            "default": "",
            "title": "Seller Country",
            "type": "string"
          },
          "seller_email": {
            "default": "",
            "title": "Seller Email",
            "type": "string"
          },
          "seller_name": {
            "default": "",
            "title": "Seller Name",
            "type": "string"
          },
          "seller_phone": {
            "default": "",
            "title": "Seller Phone",
            "type": "string"
          },
          "seller_reg_number": {
            "default": "",
            "title": "Seller Reg Number",
            "type": "string"
          },
          "seller_tax_id": {
            "default": "",
            "title": "Seller Tax Id",
            "type": "string"
          },
          "seller_website": {
            "default": "",
            "title": "Seller Website",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/InvoiceStatus"
          },
          "subtotal": {
            "default": "0",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Subtotal",
            "type": "string"
          },
          "tax_authority_number": {
            "default": "",
            "title": "Tax Authority Number",
            "type": "string"
          },
          "tax_breakdown": {
            "items": {},
            "title": "Tax Breakdown",
            "type": "array"
          },
          "tax_label": {
            "default": "",
            "title": "Tax Label",
            "type": "string"
          },
          "tax_total": {
            "default": "0",
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Tax Total",
            "type": "string"
          },
          "token": {
            "title": "Token",
            "type": "string"
          },
          "total": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Total",
            "type": "string"
          }
        },
        "required": [
          "id",
          "number",
          "client_name",
          "client_email",
          "line_items",
          "total",
          "currency",
          "issued_on",
          "due_on",
          "notes",
          "token",
          "status"
        ],
        "title": "InvoiceOut",
        "type": "object"
      },
      "InvoicePaymentCreate": {
        "description": "A hand-recorded payment against a sent/partial invoice, in the invoice's own currency.",
        "properties": {
          "account_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Id"
          },
          "amount": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "maximum": 1e+16,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "title": "Amount"
          },
          "note": {
            "default": "",
            "maxLength": 500,
            "title": "Note",
            "type": "string"
          },
          "occurred_on": {
            "anyOf": [
              {
                "format": "date",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Occurred On"
          },
          "tx_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tx Id"
          }
        },
        "required": [
          "amount"
        ],
        "title": "InvoicePaymentCreate",
        "type": "object"
      },
      "InvoiceStatus": {
        "enum": [
          "draft",
          "sent",
          "partial",
          "paid",
          "issued",
          "void",
          "quote_draft",
          "quote_sent",
          "quote_accepted",
          "quote_declined",
          "quote_expired"
        ],
        "title": "InvoiceStatus",
        "type": "string"
      },
      "LineItem": {
        "properties": {
          "description": {
            "maxLength": 300,
            "minLength": 1,
            "title": "Description",
            "type": "string"
          },
          "quantity": {
            "default": "1",
            "maxLength": 32,
            "title": "Quantity",
            "type": "string"
          },
          "tax_kind": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TaxKind"
              },
              {
                "type": "null"
              }
            ]
          },
          "tax_rate": {
            "default": "",
            "maxLength": 16,
            "title": "Tax Rate",
            "type": "string"
          },
          "unit": {
            "default": "",
            "maxLength": 16,
            "title": "Unit",
            "type": "string"
          },
          "unit_price": {
            "maxLength": 32,
            "title": "Unit Price",
            "type": "string"
          }
        },
        "required": [
          "description",
          "unit_price"
        ],
        "title": "LineItem",
        "type": "object"
      },
      "PaymentRequestCreate": {
        "description": "A price for one call, asked for by the seller's own server.",
        "properties": {
          "account_id": {
            "format": "uuid",
            "title": "Account Id",
            "type": "string"
          },
          "amount": {
            "anyOf": [
              {
                "exclusiveMinimum": 0.0,
                "type": "number"
              },
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              }
            ],
            "title": "Amount"
          },
          "currency": {
            "anyOf": [
              {
                "maxLength": 12,
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Currency"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "memo": {
            "default": "",
            "maxLength": 2000,
            "title": "Memo",
            "type": "string"
          },
          "resource": {
            "default": "",
            "maxLength": 500,
            "title": "Resource",
            "type": "string"
          }
        },
        "required": [
          "account_id",
          "amount"
        ],
        "title": "PaymentRequestCreate",
        "type": "object"
      },
      "PaymentRequestOut": {
        "description": "What the server puts in its own 402, and reads back to see if it was paid.",
        "properties": {
          "amount": {
            "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
            "title": "Amount",
            "type": "string"
          },
          "amount_received": {
            "anyOf": [
              {
                "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Amount Received"
          },
          "created_at": {
            "format": "date-time",
            "title": "Created At",
            "type": "string"
          },
          "currency": {
            "title": "Currency",
            "type": "string"
          },
          "expires_at": {
            "anyOf": [
              {
                "format": "date-time",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Expires At"
          },
          "id": {
            "format": "uuid",
            "title": "Id",
            "type": "string"
          },
          "memo": {
            "default": "",
            "title": "Memo",
            "type": "string"
          },
          "resource_id": {
            "anyOf": [
              {
                "format": "uuid",
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resource Id"
          },
          "status": {
            "title": "Status",
            "type": "string"
          },
          "token": {
            "title": "Token",
            "type": "string"
          },
          "url": {
            "title": "Url",
            "type": "string"
          }
        },
        "required": [
          "id",
          "token",
          "url",
          "amount",
          "currency",
          "status",
          "created_at"
        ],
        "title": "PaymentRequestOut",
        "type": "object"
      },
      "PingOut": {
        "properties": {
          "scopes": {
            "items": {
              "type": "string"
            },
            "title": "Scopes",
            "type": "array"
          },
          "space_id": {
            "format": "uuid",
            "title": "Space Id",
            "type": "string"
          }
        },
        "required": [
          "space_id",
          "scopes"
        ],
        "title": "PingOut",
        "type": "object"
      },
      "SellerOverride": {
        "description": "Issuer requisites for one mirrored invoice, when the integration issues on behalf of more than one legal entity (the space profile fits only one).",
        "properties": {
          "address": {
            "default": "",
            "maxLength": 2000,
            "title": "Address",
            "type": "string"
          },
          "country": {
            "default": "",
            "maxLength": 80,
            "title": "Country",
            "type": "string"
          },
          "email": {
            "default": "",
            "maxLength": 200,
            "title": "Email",
            "type": "string"
          },
          "logo": {
            "default": "",
            "maxLength": 300000,
            "title": "Logo",
            "type": "string"
          },
          "name": {
            "maxLength": 200,
            "minLength": 1,
            "title": "Name",
            "type": "string"
          },
          "phone": {
            "default": "",
            "maxLength": 40,
            "title": "Phone",
            "type": "string"
          },
          "reg_number": {
            "default": "",
            "maxLength": 64,
            "title": "Reg Number",
            "type": "string"
          },
          "tax_id": {
            "default": "",
            "maxLength": 64,
            "title": "Tax Id",
            "type": "string"
          },
          "website": {
            "default": "",
            "maxLength": 200,
            "title": "Website",
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "title": "SellerOverride",
        "type": "object"
      },
      "SepaRequisites": {
        "properties": {
          "bank_country": {
            "default": "",
            "maxLength": 2,
            "title": "Bank Country",
            "type": "string"
          },
          "bic": {
            "default": "",
            "maxLength": 11,
            "title": "Bic",
            "type": "string"
          },
          "city": {
            "default": "",
            "maxLength": 100,
            "title": "City",
            "type": "string"
          },
          "country": {
            "default": "",
            "maxLength": 2,
            "title": "Country",
            "type": "string"
          },
          "holder": {
            "maxLength": 140,
            "minLength": 1,
            "title": "Holder",
            "type": "string"
          },
          "holder_kind": {
            "default": "company",
            "enum": [
              "company",
              "individual"
            ],
            "title": "Holder Kind",
            "type": "string"
          },
          "iban": {
            "maxLength": 42,
            "minLength": 15,
            "title": "Iban",
            "type": "string"
          },
          "postcode": {
            "default": "",
            "maxLength": 20,
            "title": "Postcode",
            "type": "string"
          },
          "scheme": {
            "const": "sepa",
            "title": "Scheme",
            "type": "string"
          },
          "street": {
            "default": "",
            "maxLength": 200,
            "title": "Street",
            "type": "string"
          }
        },
        "required": [
          "holder",
          "scheme",
          "iban"
        ],
        "title": "SepaRequisites",
        "type": "object"
      },
      "SwiftRequisites": {
        "description": "The catch-all corridor: everything that is neither SEPA, UK nor US ACH.",
        "properties": {
          "account_no": {
            "maxLength": 42,
            "minLength": 4,
            "title": "Account No",
            "type": "string"
          },
          "bank_country": {
            "default": "",
            "maxLength": 2,
            "title": "Bank Country",
            "type": "string"
          },
          "bank_name": {
            "default": "",
            "maxLength": 140,
            "title": "Bank Name",
            "type": "string"
          },
          "bic": {
            "maxLength": 11,
            "minLength": 8,
            "title": "Bic",
            "type": "string"
          },
          "city": {
            "default": "",
            "maxLength": 100,
            "title": "City",
            "type": "string"
          },
          "country": {
            "default": "",
            "maxLength": 2,
            "title": "Country",
            "type": "string"
          },
          "holder": {
            "maxLength": 140,
            "minLength": 1,
            "title": "Holder",
            "type": "string"
          },
          "holder_kind": {
            "default": "company",
            "enum": [
              "company",
              "individual"
            ],
            "title": "Holder Kind",
            "type": "string"
          },
          "postcode": {
            "default": "",
            "maxLength": 20,
            "title": "Postcode",
            "type": "string"
          },
          "scheme": {
            "const": "swift",
            "title": "Scheme",
            "type": "string"
          },
          "street": {
            "default": "",
            "maxLength": 200,
            "title": "Street",
            "type": "string"
          }
        },
        "required": [
          "holder",
          "scheme",
          "bic",
          "account_no"
        ],
        "title": "SwiftRequisites",
        "type": "object"
      },
      "TaxKind": {
        "description": "What a line item is, for tax purposes.",
        "enum": [
          "standard",
          "zero",
          "exempt",
          "reverse_charge"
        ],
        "title": "TaxKind",
        "type": "string"
      },
      "TxKind": {
        "enum": [
          "income",
          "expense",
          "transfer"
        ],
        "title": "TxKind",
        "type": "string"
      },
      "UkRequisites": {
        "properties": {
          "account_no": {
            "maxLength": 8,
            "minLength": 8,
            "title": "Account No",
            "type": "string"
          },
          "bank_country": {
            "default": "",
            "maxLength": 2,
            "title": "Bank Country",
            "type": "string"
          },
          "city": {
            "default": "",
            "maxLength": 100,
            "title": "City",
            "type": "string"
          },
          "country": {
            "default": "",
            "maxLength": 2,
            "title": "Country",
            "type": "string"
          },
          "holder": {
            "maxLength": 140,
            "minLength": 1,
            "title": "Holder",
            "type": "string"
          },
          "holder_kind": {
            "default": "company",
            "enum": [
              "company",
              "individual"
            ],
            "title": "Holder Kind",
            "type": "string"
          },
          "postcode": {
            "default": "",
            "maxLength": 20,
            "title": "Postcode",
            "type": "string"
          },
          "scheme": {
            "const": "uk",
            "title": "Scheme",
            "type": "string"
          },
          "sort_code": {
            "maxLength": 8,
            "minLength": 6,
            "title": "Sort Code",
            "type": "string"
          },
          "street": {
            "default": "",
            "maxLength": 200,
            "title": "Street",
            "type": "string"
          }
        },
        "required": [
          "holder",
          "scheme",
          "sort_code",
          "account_no"
        ],
        "title": "UkRequisites",
        "type": "object"
      },
      "UsAchRequisites": {
        "properties": {
          "account_no": {
            "maxLength": 34,
            "minLength": 4,
            "title": "Account No",
            "type": "string"
          },
          "account_type": {
            "default": "checking",
            "enum": [
              "checking",
              "savings"
            ],
            "title": "Account Type",
            "type": "string"
          },
          "bank_country": {
            "default": "",
            "maxLength": 2,
            "title": "Bank Country",
            "type": "string"
          },
          "city": {
            "default": "",
            "maxLength": 100,
            "title": "City",
            "type": "string"
          },
          "country": {
            "default": "",
            "maxLength": 2,
            "title": "Country",
            "type": "string"
          },
          "holder": {
            "maxLength": 140,
            "minLength": 1,
            "title": "Holder",
            "type": "string"
          },
          "holder_kind": {
            "default": "company",
            "enum": [
              "company",
              "individual"
            ],
            "title": "Holder Kind",
            "type": "string"
          },
          "postcode": {
            "default": "",
            "maxLength": 20,
            "title": "Postcode",
            "type": "string"
          },
          "routing_number": {
            "maxLength": 11,
            "minLength": 9,
            "title": "Routing Number",
            "type": "string"
          },
          "scheme": {
            "const": "us_ach",
            "title": "Scheme",
            "type": "string"
          },
          "street": {
            "default": "",
            "maxLength": 200,
            "title": "Street",
            "type": "string"
          }
        },
        "required": [
          "holder",
          "scheme",
          "routing_number",
          "account_no"
        ],
        "title": "UsAchRequisites",
        "type": "object"
      },
      "ValidationError": {
        "properties": {
          "ctx": {
            "title": "Context",
            "type": "object"
          },
          "input": {
            "title": "Input"
          },
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "title": "Location",
            "type": "array"
          },
          "msg": {
            "title": "Message",
            "type": "string"
          },
          "type": {
            "title": "Error Type",
            "type": "string"
          }
        },
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError",
        "type": "object"
      }
    },
    "securitySchemes": {
      "HTTPBearer": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "The two doors of the Orla API that are meant for code you write: the agent door (/agent/*, authorised with an agent key) and the integration API (/integration/*, authorised with an integration token). Both take the credential as a Bearer token. Everything else in Orla is reached through the app or through the MCP server, see https://orla.finance/.well-known/ai-catalog.json.",
    "title": "Orla API: agent and integration doors",
    "version": "0.1.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/agent/me": {
      "get": {
        "description": "Who am I, where may I work, and what may I do there.",
        "operationId": "whoami_agent_me_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentMeOut"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Whoami",
        "tags": [
          "agent"
        ]
      }
    },
    "/agent/spaces/{space_id}/accounts": {
      "get": {
        "operationId": "list_accounts_agent_spaces__space_id__accounts_get",
        "parameters": [
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Space Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "title": "Response List Accounts Agent Spaces  Space Id  Accounts Get"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List Accounts",
        "tags": [
          "agent"
        ]
      }
    },
    "/agent/spaces/{space_id}/allowance": {
      "get": {
        "description": "How much room the agent has left today before a refusal: the same figures every spending door holds it to (plan 2026-09-16-ai-teams-coverage).",
        "operationId": "allowance_left_agent_spaces__space_id__allowance_get",
        "parameters": [
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Space Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "title": "Response Allowance Left Agent Spaces  Space Id  Allowance Get"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Allowance Left",
        "tags": [
          "agent"
        ]
      }
    },
    "/agent/spaces/{space_id}/card": {
      "get": {
        "operationId": "agent_card_agent_spaces__space_id__card_get",
        "parameters": [
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Space Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "title": "Response Agent Card Agent Spaces  Space Id  Card Get"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Agent Card",
        "tags": [
          "agent"
        ]
      }
    },
    "/agent/spaces/{space_id}/card/code": {
      "post": {
        "description": "The card's latest one-time code.",
        "operationId": "agent_card_code_agent_spaces__space_id__card_code_post",
        "parameters": [
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Space Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "title": "Response Agent Card Code Agent Spaces  Space Id  Card Code Post"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Agent Card Code",
        "tags": [
          "agent"
        ]
      }
    },
    "/agent/spaces/{space_id}/card/details": {
      "post": {
        "description": "The numbers themselves, once per arming, on a card whose owner armed it.",
        "operationId": "agent_card_details_agent_spaces__space_id__card_details_post",
        "parameters": [
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Space Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "title": "Response Agent Card Details Agent Spaces  Space Id  Card Details Post"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Agent Card Details",
        "tags": [
          "agent"
        ]
      }
    },
    "/agent/spaces/{space_id}/card/reveal": {
      "post": {
        "description": "A link to the issuer's own page.",
        "operationId": "agent_card_reveal_agent_spaces__space_id__card_reveal_post",
        "parameters": [
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Space Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "title": "Response Agent Card Reveal Agent Spaces  Space Id  Card Reveal Post"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Agent Card Reveal",
        "tags": [
          "agent"
        ]
      }
    },
    "/agent/spaces/{space_id}/categories": {
      "get": {
        "operationId": "list_categories_agent_spaces__space_id__categories_get",
        "parameters": [
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Space Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "title": "Response List Categories Agent Spaces  Space Id  Categories Get"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List Categories",
        "tags": [
          "agent"
        ]
      }
    },
    "/agent/spaces/{space_id}/chain-payments": {
      "post": {
        "operationId": "propose_chain_payment_agent_spaces__space_id__chain_payments_post",
        "parameters": [
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Space Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentChainPaymentIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentWriteOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Propose Chain Payment",
        "tags": [
          "agent"
        ]
      }
    },
    "/agent/spaces/{space_id}/grant-change": {
      "post": {
        "description": "Ask for a change to this agent's own fence in this space: the daily cap, the expiry, the hosts the wallet may pay, the merchants the card may pay.",
        "operationId": "request_grant_change_agent_spaces__space_id__grant_change_post",
        "parameters": [
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Space Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentGrantChangeIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentWriteOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Request Grant Change",
        "tags": [
          "agent"
        ]
      }
    },
    "/agent/spaces/{space_id}/payments": {
      "get": {
        "operationId": "list_payments_agent_spaces__space_id__payments_get",
        "parameters": [
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Space Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "title": "Response List Payments Agent Spaces  Space Id  Payments Get"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List Payments",
        "tags": [
          "agent"
        ]
      },
      "post": {
        "operationId": "propose_payment_agent_spaces__space_id__payments_post",
        "parameters": [
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Space Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentPaymentIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentWriteOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Propose Payment",
        "tags": [
          "agent"
        ]
      }
    },
    "/agent/spaces/{space_id}/transactions": {
      "get": {
        "operationId": "list_transactions_agent_spaces__space_id__transactions_get",
        "parameters": [
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Space Id",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "date_from",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Date From"
            }
          },
          {
            "in": "query",
            "name": "date_to",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "date",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Date To"
            }
          },
          {
            "in": "query",
            "name": "account_id",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "format": "uuid",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Account Id"
            }
          },
          {
            "in": "query",
            "name": "search",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "maxLength": 120,
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Search"
            }
          },
          {
            "in": "query",
            "name": "uncategorized",
            "required": false,
            "schema": {
              "default": false,
              "title": "Uncategorized",
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "title": "Limit",
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "offset",
            "required": false,
            "schema": {
              "default": 0,
              "minimum": 0,
              "title": "Offset",
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "title": "Response List Transactions Agent Spaces  Space Id  Transactions Get"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List Transactions",
        "tags": [
          "agent"
        ]
      },
      "post": {
        "operationId": "book_transaction_agent_spaces__space_id__transactions_post",
        "parameters": [
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Space Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentTxIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentWriteOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Book Transaction",
        "tags": [
          "agent"
        ]
      }
    },
    "/agent/spaces/{space_id}/transactions/{tx_id}": {
      "patch": {
        "operationId": "amend_transaction_agent_spaces__space_id__transactions__tx_id__patch",
        "parameters": [
          {
            "in": "path",
            "name": "tx_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Tx Id",
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Space Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentTxPatch"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentWriteOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Amend Transaction",
        "tags": [
          "agent"
        ]
      }
    },
    "/agent/spaces/{space_id}/wallet": {
      "get": {
        "description": "The agent's own hot wallet: addresses and live balances.",
        "operationId": "agent_wallet_agent_spaces__space_id__wallet_get",
        "parameters": [
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Space Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "title": "Response Agent Wallet Agent Spaces  Space Id  Wallet Get"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Agent Wallet",
        "tags": [
          "agent"
        ]
      }
    },
    "/agent/spaces/{space_id}/wallet/transfers": {
      "post": {
        "description": "Spend from the agent's float.",
        "operationId": "wallet_transfer_agent_spaces__space_id__wallet_transfers_post",
        "parameters": [
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Space Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentWalletTransferIn"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentWriteOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Wallet Transfer",
        "tags": [
          "agent"
        ]
      }
    },
    "/agent/spaces/{space_id}/x402": {
      "post": {
        "description": "Fetch a URL, paying its 402 from the agent's own float.",
        "operationId": "pay_for_resource_agent_spaces__space_id__x402_post",
        "parameters": [
          {
            "in": "path",
            "name": "space_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Space Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentX402In"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentWriteOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Pay For Resource",
        "tags": [
          "agent"
        ]
      }
    },
    "/integration/accounts": {
      "get": {
        "operationId": "list_accounts_integration_accounts_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "title": "Response List Accounts Integration Accounts Get"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "List Accounts",
        "tags": [
          "integration"
        ]
      },
      "post": {
        "description": "A mirror account: where a mirrored invoice says money should land, and whose `details` become the requisites on the public page.",
        "operationId": "create_account_integration_accounts_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "title": "Response Create Account Integration Accounts Post"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Create Account",
        "tags": [
          "integration"
        ]
      }
    },
    "/integration/charges": {
      "post": {
        "description": "Charge one call to a client's prepaid balance, or say what to pay first.",
        "operationId": "charge_a_client_integration_charges_post",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Idempotency-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChargeCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChargeOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Charge A Client",
        "tags": [
          "integration"
        ]
      }
    },
    "/integration/contacts": {
      "post": {
        "operationId": "create_contact_integration_contacts_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ContactOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Create Contact",
        "tags": [
          "integration"
        ]
      }
    },
    "/integration/contacts/{contact_id}/chats": {
      "get": {
        "description": "Whether the client group is already wired (the bridge polls this after handing the operator a /linkclient code).",
        "operationId": "contact_chats_integration_contacts__contact_id__chats_get",
        "parameters": [
          {
            "in": "path",
            "name": "contact_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Contact Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "title": "Response Contact Chats Integration Contacts  Contact Id  Chats Get"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Contact Chats",
        "tags": [
          "integration"
        ]
      }
    },
    "/integration/contacts/{contact_id}/telegram-link": {
      "post": {
        "description": "Mint the /linkclient code for one client group: the same code the in-app card mints, so the chat that redeems it receives only THIS contact's invoices.",
        "operationId": "mint_client_link_integration_contacts__contact_id__telegram_link_post",
        "parameters": [
          {
            "in": "path",
            "name": "contact_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Contact Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatLinkOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Mint Client Link",
        "tags": [
          "integration"
        ]
      }
    },
    "/integration/invoices": {
      "post": {
        "operationId": "create_invoice_integration_invoices_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IntegrationInvoiceCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Create Invoice",
        "tags": [
          "integration"
        ]
      }
    },
    "/integration/invoices/{invoice_id}": {
      "get": {
        "operationId": "get_invoice_integration_invoices__invoice_id__get",
        "parameters": [
          {
            "in": "path",
            "name": "invoice_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Invoice Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Get Invoice",
        "tags": [
          "integration"
        ]
      }
    },
    "/integration/invoices/{invoice_id}/client": {
      "post": {
        "description": "Fill in the client requisites of an invoice the integration already mirrored.",
        "operationId": "set_invoice_client_integration_invoices__invoice_id__client_post",
        "parameters": [
          {
            "in": "path",
            "name": "invoice_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Invoice Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClientOverride"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Set Invoice Client",
        "tags": [
          "integration"
        ]
      }
    },
    "/integration/invoices/{invoice_id}/payments": {
      "post": {
        "description": "Mirror of a payment the external system reconciled, partial or full.",
        "operationId": "record_payment_integration_invoices__invoice_id__payments_post",
        "parameters": [
          {
            "in": "path",
            "name": "invoice_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Invoice Id",
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Idempotency-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvoicePaymentCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Record Payment",
        "tags": [
          "integration"
        ]
      }
    },
    "/integration/invoices/{invoice_id}/remind": {
      "post": {
        "description": "Nudge the client chat about this invoice (the external system's own dunning schedule decides when).",
        "operationId": "remind_invoice_integration_invoices__invoice_id__remind_post",
        "parameters": [
          {
            "in": "path",
            "name": "invoice_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Invoice Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Remind Invoice",
        "tags": [
          "integration"
        ]
      }
    },
    "/integration/invoices/{invoice_id}/seller": {
      "post": {
        "description": "Re-stamp the seller of an invoice the integration already mirrored.",
        "operationId": "set_invoice_seller_integration_invoices__invoice_id__seller_post",
        "parameters": [
          {
            "in": "path",
            "name": "invoice_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Invoice Id",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SellerOverride"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Set Invoice Seller",
        "tags": [
          "integration"
        ]
      }
    },
    "/integration/invoices/{invoice_id}/send": {
      "post": {
        "operationId": "send_invoice_integration_invoices__invoice_id__send_post",
        "parameters": [
          {
            "in": "path",
            "name": "invoice_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Invoice Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Send Invoice",
        "tags": [
          "integration"
        ]
      }
    },
    "/integration/invoices/{invoice_id}/void": {
      "post": {
        "operationId": "void_invoice_integration_invoices__invoice_id__void_post",
        "parameters": [
          {
            "in": "path",
            "name": "invoice_id",
            "required": true,
            "schema": {
              "format": "uuid",
              "title": "Invoice Id",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Void Invoice",
        "tags": [
          "integration"
        ]
      }
    },
    "/integration/payment-requests": {
      "post": {
        "description": "Price one call of the seller's own service, so a machine can pay for it.",
        "operationId": "create_payment_request_integration_payment_requests_post",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Idempotency-Key"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentRequestCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequestOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Create Payment Request",
        "tags": [
          "integration"
        ]
      }
    },
    "/integration/payment-requests/{token}": {
      "get": {
        "description": "Was it paid, and how much of it.",
        "operationId": "read_payment_request_integration_payment_requests__token__get",
        "parameters": [
          {
            "in": "path",
            "name": "token",
            "required": true,
            "schema": {
              "title": "Token",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequestOut"
                }
              }
            },
            "description": "Successful Response"
          },
          "422": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            },
            "description": "Validation Error"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Read Payment Request",
        "tags": [
          "integration"
        ]
      }
    },
    "/integration/ping": {
      "get": {
        "description": "Connectivity check for a freshly configured bridge.",
        "operationId": "ping_integration_ping_get",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PingOut"
                }
              }
            },
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "summary": "Ping",
        "tags": [
          "integration"
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://app.orla.finance/api"
    }
  ]
}
