{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/memo-bank/main/json-schema/memo-bank-create-wire-transfer-schema.json", "title": "CreateWireTransfer", "x-generated": "2026-10-12", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/memo-bank-wire-transfers-api-openapi.yml#/components/schemas/CreateWireTransfer", "required": [ "beneficiary", "instructed_amount", "instructed_currency", "local_iban", "message", "purpose" ], "type": "object", "properties": { "instructed_amount": { "minimum": 1, "type": "integer", "description": "Amount of the wire transfer, in the smallest unit of the instructed currency.", "format": "int64" }, "instructed_currency": { "pattern": "^[A-Z]{3}$", "type": "string", "description": "Currency of the wire transfer. An exchange rate will be applied if the currency differs from the currency of the local account." }, "local_iban": { "pattern": "^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{1,30}$", "type": "string", "description": "Existing IBAN to be used as the source of the wire transfer. Can be the main IBAN of an account or a virtual IBAN." }, "beneficiary": { "$ref": "#/$defs/TransferBeneficiary" }, "purpose": { "type": "string", "description": "Purpose of this wire transfer.", "enum": [ "goods_purchase", "services_purchase" ] }, "message": { "maxLength": 140, "minLength": 10, "type": "string", "description": "Message attached to this wire transfer, visible to all involved parties." }, "internal_note": { "maxLength": 3000, "minLength": 1, "type": "string", "description": "Internal note attached to this wire transfer, visible only in your Memo Bank workspace." }, "custom_id": { "maxLength": 256, "minLength": 1, "type": "string", "description": "Custom identifier that will be attached to the transaction resulting from this wire transfer. It will not be transmitted nor visible in your Memo Bank workspace. It can only be retrieved or used to search for transactions via Memo Bank API." }, "custom_metadata": { "maxLength": 2048, "minLength": 1, "type": "string", "description": "Custom metadata that will be attached to the transaction resulting from this wire transfer. It will not be transmitted nor visible in your Memo Bank workspace and can only be retrieved via API." } }, "$defs": { "AccountIdentifier": { "type": "object", "description": "Account identifier of the beneficiary.", "oneOf": [ { "$ref": "#/$defs/IbanAndBic" }, { "$ref": "#/$defs/AccountNumberAndBic" }, { "$ref": "#/$defs/AccountNumberAndRoutingCode" } ] }, "AccountIdentifierDiscriminator": { "required": [ "type" ], "type": "object", "properties": { "type": { "type": "string", "enum": [ "iban_and_bic", "account_number_and_bic", "account_number_and_routing_code" ] } } }, "AccountNumberAndBic": { "required": [ "account_number", "bic", "type" ], "type": "object", "allOf": [ { "$ref": "#/$defs/AccountIdentifierDiscriminator" }, { "type": "object", "properties": { "account_number": { "type": "string" }, "bic": { "pattern": "^[A-Z0-9]{4}[A-Z]{2}[A-Z0-9]{2}([A-Z0-9]{3})?$", "type": "string" } } } ] }, "AccountNumberAndRoutingCode": { "required": [ "account_number", "routing_code", "type" ], "type": "object", "allOf": [ { "$ref": "#/$defs/AccountIdentifierDiscriminator" }, { "type": "object", "properties": { "account_number": { "type": "string" }, "routing_code": { "type": "string" } } } ] }, "IbanAndBic": { "required": [ "bic", "iban", "type" ], "type": "object", "allOf": [ { "$ref": "#/$defs/AccountIdentifierDiscriminator" }, { "type": "object", "properties": { "iban": { "pattern": "^[A-Z]{2}[0-9]{2}[a-zA-Z0-9]{1,30}$", "type": "string" }, "bic": { "pattern": "^[A-Z0-9]{4}[A-Z]{2}[A-Z0-9]{2}([A-Z0-9]{3})?$", "type": "string" } } } ] }, "TransferBeneficiary": { "required": [ "account_identifier", "address", "bank_country", "name", "type" ], "type": "object", "properties": { "name": { "type": "string", "description": "Name of the beneficiary. Will be used to create the beneficiary if one doesn't already exist with the same `account_identifier`, will be ignored otherwise." }, "account_identifier": { "$ref": "#/$defs/AccountIdentifier" }, "bank_country": { "pattern": "^[A-Z]{2}$", "type": "string", "description": "Country of the beneficiary's bank. Will be used to create the beneficiary if one doesn't already exist with the same `account_identifier`, will be ignored otherwise." }, "address": { "$ref": "#/$defs/TransferBeneficiaryAddress" }, "type": { "type": "string", "description": "Type of the beneficiary. Will be used to create the beneficiary if one doesn't already exist with the same `account_identifier`, will be ignored otherwise.", "enum": [ "person", "company", "government" ] }, "lei": { "pattern": "^[0-9A-Z]{18}[0-9]{2}$", "type": "string", "description": "LEI of the beneficiary. Will be used to create the beneficiary if one doesn't already exist with the same `account_identifier`, will be ignored otherwise. This is only required if the selected `type` is `company`." } }, "description": "Information regarding the beneficiary of this wire transfer." }, "TransferBeneficiaryAddress": { "required": [ "city", "country", "postal_code", "street" ], "type": "object", "properties": { "street": { "maxLength": 256, "minLength": 1, "type": "string", "description": "Name of the street." }, "postal_code": { "maxLength": 256, "minLength": 1, "type": "string", "description": "Postal or zip code." }, "city": { "maxLength": 256, "minLength": 1, "type": "string", "description": "Name of the city." }, "country": { "pattern": "^[A-Z]{2}$", "type": "string", "description": "ISO3166-1 alpha-2 country code." } }, "description": "Address of the beneficiary. Will be used to create the beneficiary if one doesn't already exist with the same `account_identifier`, will be ignored otherwise." } } }