{
  "openapi": "3.1.0",
  "info": {
    "title": "Ospree Directory API",
    "description": "This API provides endpoints for managing accounts and Virtual Asset Service Providers (VASPs). It includes functionalities for creating, retrieving, updating, and deleting accounts, as well as listing and searching for VASPs. The API is designed to support both individual and commercial account types, with appropriate authentication and authorization mechanisms in place.",
    "contact": {
      "name": "Ospree",
      "url": "https://www.ospree.io/",
      "email": "support@ospree.io"
    },
    "version": "2.0.0",
    "x-ospree-baseline": {
      "legacy_repo": "oapp-directory",
      "legacy_ref": "main",
      "legacy_sha": "4c751e2089c9e91729e9af9c2d82ab1867445235",
      "rendered_by": "scripts/export_openapi.py @ develop (blob 60203b2b1ba3dfebb36b5a760ba2d2e12a601f9f)",
      "api_prefix": "unset \u2014 the routers carry the full path",
      "surface": "/api/v2/ only \u2014 see scripts/legacy_baseline.py",
      "adr": "ADR-0035"
    }
  },
  "paths": {
    "/api/v2/directory/accounts/search": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Search Account",
        "description": "This endpoint allows users to search for accounts based on a search term and optional filters such as account category and account type.",
        "operationId": "Search_Account_api_v2_directory_accounts_search_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "search_term",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "title": "Search Term"
            }
          },
          {
            "name": "account_category",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/AccountCategoryString"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Account Category"
            }
          },
          {
            "name": "account_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/AccountTypeString"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Account Type"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchAccountResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/directory/accounts": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Create Account",
        "description": "This endpoint is used to create a new account within the directory module. It can create 'individual' or 'entity' accounts.",
        "operationId": "Create_Account_api_v2_directory_accounts_post",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAccountRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateAccountResponse"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "List Accounts",
        "description": "This endpoint retrieves a list of all accounts within the directory.",
        "operationId": "List_Accounts_api_v2_directory_accounts_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "start_range",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Start Range"
            }
          },
          {
            "name": "end_range",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "date"
                },
                {
                  "type": "null"
                }
              ],
              "title": "End Range"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "title": "Page"
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 50,
              "title": "Size"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Criteria for result sorting.",
              "default": "-created",
              "title": "Sort"
            },
            "description": "Criteria for result sorting.",
            "example": "-last_modified"
          },
          {
            "name": "account_category",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/AccountCategoryString"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Account Category"
            }
          },
          {
            "name": "account_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/AccountTypeString"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Account Type"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListAccountsResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/directory/accounts/{reference_id}": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Retrieve Account",
        "description": "This endpoint retrieves the details of a specific account identified by {reference_id}.",
        "operationId": "Retrieve_Account_api_v2_directory_accounts__reference_id__get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Unique identifier for the account, previously external_id.",
              "title": "Reference Id"
            },
            "description": "Unique identifier for the account, previously external_id."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RetrieveAccountResponse"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Account"
        ],
        "summary": "Update Account",
        "description": "This endpoint is utilized to modify/update the details of a specific account identified by {reference_id}. All body inputs are optional. Only provided inputs will be updated in the account record, while all others will maintain their current values.",
        "operationId": "Update_Account_api_v2_directory_accounts__reference_id__patch",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Unique identifier for the account, previously external_id.",
              "title": "Reference Id"
            },
            "description": "Unique identifier for the account, previously external_id."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAccountRequest"
              },
              "example": [
                {
                  "fields": [
                    {
                      "field": [
                        "individual",
                        "individual_name",
                        "name_first"
                      ],
                      "value": "John"
                    },
                    {
                      "field": [
                        "individual",
                        "individual_name",
                        "name_last"
                      ],
                      "value": "Doe"
                    },
                    {
                      "field": [
                        "email"
                      ],
                      "value": "you@company.com"
                    }
                  ]
                }
              ]
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateAccountResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Account"
        ],
        "summary": "Remove Account",
        "description": "This endpoint is used to remove/delete a specific account identified by {reference_id} from the directory.",
        "operationId": "Remove_Account_api_v2_directory_accounts__reference_id__delete",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "reference_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Unique identifier for the account, previously external_id.",
              "title": "Reference Id"
            },
            "description": "Unique identifier for the account, previously external_id."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RemoveAccountResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/directory/vasps": {
      "get": {
        "tags": [
          "VASP"
        ],
        "summary": "List Vasps",
        "description": "This endpoint retrieves a list of VASPs (Virtual Asset Service Providers) based on various filter criteria. The results can be paginated, sorted, and filtered according to the specified parameters.",
        "operationId": "List_VASPs_api_v2_directory_vasps_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1,
              "title": "Page"
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 50,
              "title": "Size"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Sort"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiSuccessResponse_PaginatedResponse_VASPResponse__"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/directory/vasps/search": {
      "get": {
        "tags": [
          "VASP"
        ],
        "summary": "Search Vasp",
        "description": "This endpoint facilitates the retrieval of a VASP record using various lookup values, such as business and legal name representations. If the provided lookup value does not match any VASP record, the endpoint will return no results.",
        "operationId": "Search_VASP_api_v2_directory_vasps_search_get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "search_term",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "description": "The parameter 'search_term' specifies the VASP (Virtual Asset Service Provider) name that the user wishes to search for in the lookup API endpoint.",
              "title": "Search Term"
            },
            "description": "The parameter 'search_term' specifies the VASP (Virtual Asset Service Provider) name that the user wishes to search for in the lookup API endpoint.",
            "example": "ARCHAX"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiSuccessResponse_List_VASPResponse__"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/directory/vasps/{vasp_id}": {
      "get": {
        "tags": [
          "VASP"
        ],
        "summary": "Retrieve Vasp",
        "description": "Get specific VASP using id",
        "operationId": "Retrieve_VASP_api_v2_directory_vasps__vasp_id__get",
        "security": [
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "vasp_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Vasp Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiSuccessResponse_VASPResponse_"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AccountCategoryString": {
        "type": "string",
        "enum": [
          "customer",
          "non-customer"
        ],
        "title": "AccountCategoryString"
      },
      "AccountDetails-Output": {
        "properties": {
          "reference_id": {
            "type": "string",
            "maxLength": 50,
            "minLength": 4,
            "title": "Reference Id",
            "description": "Unique identifier for the account.",
            "examples": [
              "johndoe"
            ]
          },
          "account_type": {
            "$ref": "#/components/schemas/AccountTypeString",
            "description": "Type of account, either 'individual' or 'entity'.",
            "examples": [
              "individual",
              "entity"
            ]
          },
          "account_category": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AccountCategoryString"
              },
              {
                "type": "null"
              }
            ],
            "default": "customer"
          },
          "email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email",
            "description": "Email address associated with the account.",
            "example": "you@company.com"
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 50
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "Customer ID associated with the account.",
            "example": "customer123"
          },
          "individual": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AccountIndividual-Output"
              },
              {
                "type": "null"
              }
            ],
            "description": "The object that contains the fields specific for an individual account"
          },
          "entity": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AccountEntity-Output"
              },
              {
                "type": "null"
              }
            ],
            "description": "The object that contains the fields specific for an entity account"
          },
          "address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Address"
              },
              {
                "type": "null"
              }
            ],
            "description": "The object that contains the fields specific for the address of the account"
          },
          "national_id": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/NationalId"
              },
              {
                "type": "null"
              }
            ],
            "description": "The object that contains the fields specific for the national id of the account"
          },
          "created": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created"
          },
          "last_modified": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Modified"
          }
        },
        "type": "object",
        "required": [
          "reference_id",
          "account_type"
        ],
        "title": "AccountDetails"
      },
      "AccountEntity-Input": {
        "properties": {
          "entity_name": {
            "$ref": "#/components/schemas/EntityName",
            "description": "The object that contains the entity name fields."
          },
          "entity_localname": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EntityName"
              },
              {
                "type": "null"
              }
            ],
            "description": "The object that contains the entity local name fields."
          },
          "registration_country": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2
              },
              {
                "type": "null"
              }
            ],
            "title": "Registration Country",
            "description": "Country code of incorporation for the business.",
            "examples": [
              "SG"
            ]
          }
        },
        "type": "object",
        "required": [
          "entity_name"
        ],
        "title": "AccountEntity"
      },
      "AccountEntity-Output": {
        "properties": {
          "entity_name": {
            "$ref": "#/components/schemas/EntityName",
            "description": "The object that contains the entity name fields."
          },
          "entity_localname": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EntityName"
              },
              {
                "type": "null"
              }
            ],
            "description": "The object that contains the entity local name fields."
          },
          "registration_country": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2
              },
              {
                "type": "null"
              }
            ],
            "title": "Registration Country",
            "description": "Country code of incorporation for the business.",
            "examples": [
              "SG"
            ]
          }
        },
        "type": "object",
        "required": [
          "entity_name"
        ],
        "title": "AccountEntity"
      },
      "AccountFieldUpdate": {
        "properties": {
          "field": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "minItems": 1,
            "title": "Field",
            "description": "The name of the field to be updated."
          },
          "value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "integer"
              },
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Value",
            "description": "The value of the field to be updated to.",
            "examples": [
              "Mark"
            ]
          }
        },
        "type": "object",
        "required": [
          "field",
          "value"
        ],
        "title": "AccountFieldUpdate"
      },
      "AccountIndividual-Input": {
        "properties": {
          "individual_name": {
            "$ref": "#/components/schemas/IndividualName",
            "description": "Object that contains the individual name fields"
          },
          "individual_localname": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/IndividualName"
              },
              {
                "type": "null"
              }
            ],
            "description": "Object that contains the individual local name fields"
          },
          "date_of_birth": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Date Of Birth",
            "description": "Date of birth of the account holder.",
            "examples": [
              "1990-01-01"
            ]
          },
          "place_of_birth": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 50
              },
              {
                "type": "null"
              }
            ],
            "title": "Place Of Birth",
            "description": "Place of birth of the account holder.",
            "examples": [
              "Singapore, Singapore"
            ]
          },
          "nationality_country": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2
              },
              {
                "type": "null"
              }
            ],
            "title": "Nationality Country",
            "description": "Country code of the nationality of the account holder.",
            "examples": [
              "SG"
            ]
          },
          "residence_country": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2
              },
              {
                "type": "null"
              }
            ],
            "title": "Residence Country",
            "description": "Country code of the place of residence of the account holder.",
            "examples": [
              "US"
            ]
          }
        },
        "type": "object",
        "required": [
          "individual_name"
        ],
        "title": "AccountIndividual"
      },
      "AccountIndividual-Output": {
        "properties": {
          "individual_name": {
            "$ref": "#/components/schemas/IndividualName",
            "description": "Object that contains the individual name fields"
          },
          "individual_localname": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/IndividualName"
              },
              {
                "type": "null"
              }
            ],
            "description": "Object that contains the individual local name fields"
          },
          "date_of_birth": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "title": "Date Of Birth",
            "description": "Date of birth of the account holder.",
            "examples": [
              "1990-01-01"
            ]
          },
          "place_of_birth": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 50
              },
              {
                "type": "null"
              }
            ],
            "title": "Place Of Birth",
            "description": "Place of birth of the account holder.",
            "examples": [
              "Singapore, Singapore"
            ]
          },
          "nationality_country": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2
              },
              {
                "type": "null"
              }
            ],
            "title": "Nationality Country",
            "description": "Country code of the nationality of the account holder.",
            "examples": [
              "SG"
            ]
          },
          "residence_country": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2
              },
              {
                "type": "null"
              }
            ],
            "title": "Residence Country",
            "description": "Country code of the place of residence of the account holder.",
            "examples": [
              "US"
            ]
          }
        },
        "type": "object",
        "required": [
          "individual_name"
        ],
        "title": "AccountIndividual"
      },
      "AccountResponse": {
        "properties": {
          "reference_id": {
            "type": "string",
            "title": "Reference Id"
          },
          "account_type": {
            "type": "string",
            "title": "Account Type"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "account_category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Account Category"
          },
          "email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "created": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created"
          },
          "last_modified": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Modified"
          }
        },
        "type": "object",
        "required": [
          "reference_id",
          "account_type"
        ],
        "title": "AccountResponse"
      },
      "AccountTypeString": {
        "type": "string",
        "enum": [
          "individual",
          "entity"
        ],
        "title": "AccountTypeString"
      },
      "Address": {
        "properties": {
          "address_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AddressTypeString"
              },
              {
                "type": "null"
              }
            ],
            "description": "Required if address object is specified. Type of the address.",
            "examples": [
              "GEOG"
            ]
          },
          "address_line": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 256
              },
              {
                "type": "null"
              }
            ],
            "title": "Address Line",
            "description": "Either providing an address_line or including a combination of address_street_no or address_building_name along with address_street_name is required.",
            "examples": [
              "Apt 123"
            ]
          },
          "address_street_no": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 10
              },
              {
                "type": "null"
              }
            ],
            "title": "Address Street No",
            "description": "Either providing an address_line or including a combination of address_street_no or address_building_name along with address_street_name is required",
            "examples": [
              "456"
            ]
          },
          "address_street_name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ],
            "title": "Address Street Name",
            "description": "Either providing an address_line or including a combination of address_street_no or address_building_name along with address_street_name is required.",
            "examples": [
              "Elm Street"
            ]
          },
          "address_building_name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ],
            "title": "Address Building Name",
            "description": "Either providing an address_line or including a combination of address_street_no or address_building_name along with address_street_name is required.",
            "examples": [
              "Building A"
            ]
          },
          "address_floor": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 20
              },
              {
                "type": "null"
              }
            ],
            "title": "Address Floor",
            "description": "Floor number in the building.",
            "examples": [
              "15"
            ]
          },
          "address_room": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 20
              },
              {
                "type": "null"
              }
            ],
            "title": "Address Room",
            "description": "Room number in the building.",
            "examples": [
              "1503"
            ]
          },
          "address_department": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 20
              },
              {
                "type": "null"
              }
            ],
            "title": "Address Department",
            "description": "Department within the address."
          },
          "address_subdepartment": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 20
              },
              {
                "type": "null"
              }
            ],
            "title": "Address Subdepartment",
            "description": "Sub-department within the address."
          },
          "address_postbox": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 20
              },
              {
                "type": "null"
              }
            ],
            "title": "Address Postbox",
            "description": "Post office box number.",
            "examples": [
              "PO Box 789"
            ]
          },
          "address_city_location": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 50
              },
              {
                "type": "null"
              }
            ],
            "title": "Address City Location",
            "description": "Geographical location of the city.",
            "examples": [
              "Downtown"
            ]
          },
          "address_city": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 50
              },
              {
                "type": "null"
              }
            ],
            "title": "Address City",
            "description": "City of the account holder's address.",
            "examples": [
              "New York"
            ]
          },
          "address_region": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 50
              },
              {
                "type": "null"
              }
            ],
            "title": "Address Region",
            "description": "Region or state of the account holder's address.",
            "examples": [
              "New York"
            ]
          },
          "address_district": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 50
              },
              {
                "type": "null"
              }
            ],
            "title": "Address District",
            "description": "District of the account holder's address.",
            "examples": [
              "Manhattan"
            ]
          },
          "address_postcode": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 25
              },
              {
                "type": "null"
              }
            ],
            "title": "Address Postcode",
            "description": "Postal code of the account holder's address.",
            "examples": [
              "08012"
            ]
          },
          "address_country_code": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2
              },
              {
                "type": "null"
              }
            ],
            "title": "Address Country Code",
            "description": "Country code of the account holder's address.",
            "examples": [
              "US"
            ]
          }
        },
        "type": "object",
        "required": [
          "address_type"
        ],
        "title": "Address"
      },
      "AddressTypeString": {
        "type": "string",
        "enum": [
          "GEOG"
        ],
        "title": "AddressTypeString"
      },
      "ApiSuccessResponse_List_VASPResponse__": {
        "properties": {
          "status": {
            "type": "string",
            "title": "Status",
            "default": "success"
          },
          "data": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/VASPResponse"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Data"
          }
        },
        "type": "object",
        "title": "ApiSuccessResponse[List[VASPResponse]]"
      },
      "ApiSuccessResponse_PaginatedResponse_VASPResponse__": {
        "properties": {
          "status": {
            "type": "string",
            "title": "Status",
            "default": "success"
          },
          "data": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PaginatedResponse_VASPResponse_"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "title": "ApiSuccessResponse[PaginatedResponse[VASPResponse]]"
      },
      "ApiSuccessResponse_VASPResponse_": {
        "properties": {
          "status": {
            "type": "string",
            "title": "Status",
            "default": "success"
          },
          "data": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/VASPResponse"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "title": "ApiSuccessResponse[VASPResponse]"
      },
      "CreateAccountRequest": {
        "properties": {
          "reference_id": {
            "type": "string",
            "maxLength": 50,
            "minLength": 4,
            "title": "Reference Id",
            "description": "Unique identifier for the account.",
            "examples": [
              "johndoe"
            ]
          },
          "account_type": {
            "$ref": "#/components/schemas/AccountTypeString",
            "description": "Type of account, either 'individual' or 'entity'.",
            "examples": [
              "individual",
              "entity"
            ]
          },
          "account_category": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AccountCategoryString"
              },
              {
                "type": "null"
              }
            ],
            "default": "customer"
          },
          "email": {
            "anyOf": [
              {
                "type": "string",
                "format": "email"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email",
            "description": "Email address associated with the account.",
            "example": "you@company.com"
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 50
              },
              {
                "type": "null"
              }
            ],
            "title": "Customer Id",
            "description": "Customer ID associated with the account.",
            "example": "customer123"
          },
          "individual": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AccountIndividual-Input"
              },
              {
                "type": "null"
              }
            ],
            "description": "The object that contains the fields specific for an individual account"
          },
          "entity": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AccountEntity-Input"
              },
              {
                "type": "null"
              }
            ],
            "description": "The object that contains the fields specific for an entity account"
          },
          "address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Address"
              },
              {
                "type": "null"
              }
            ],
            "description": "The object that contains the fields specific for the address of the account"
          },
          "national_id": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/NationalId"
              },
              {
                "type": "null"
              }
            ],
            "description": "The object that contains the fields specific for the national id of the account"
          },
          "created": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Created"
          },
          "last_modified": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Modified"
          }
        },
        "type": "object",
        "required": [
          "reference_id",
          "account_type"
        ],
        "title": "CreateAccountRequest"
      },
      "CreateAccountResponse": {
        "properties": {
          "status": {
            "type": "string",
            "title": "Status",
            "default": "success",
            "examples": [
              "success"
            ]
          },
          "data": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AccountDetails-Output"
              },
              {
                "type": "null"
              }
            ],
            "examples": [
              {
                "account_type": "individual",
                "address": {
                  "address_building_name": "Elmwood Apartments",
                  "address_city": "New York",
                  "address_country_code": "US",
                  "address_district": "Manhattan",
                  "address_floor": "15",
                  "address_line": "Apt 123",
                  "address_postbox": "PO Box 789",
                  "address_postcode": "10001",
                  "address_region": "New York",
                  "address_room": "1503",
                  "address_street_name": "Elm Street",
                  "address_street_no": "456",
                  "address_type": "GEOG"
                },
                "created": "2024-02-26 21:57:18.000 +0800",
                "email": "you@company.com",
                "individual": {
                  "date_of_birth": "1988-06-27",
                  "individual_localname": {
                    "name_first": "John",
                    "name_last": "Doe",
                    "name_middle": "Mark",
                    "name_type": "LEGL"
                  },
                  "individual_name": {
                    "name_first": "John",
                    "name_last": "Doe",
                    "name_middle": "Mark",
                    "name_type": "LEGL"
                  },
                  "place_of_birth": "Singapore, Singapore"
                },
                "last_modified": "2024-02-27 10:37:20.000 +0800",
                "reference_id": "johndoe"
              }
            ]
          }
        },
        "type": "object",
        "title": "CreateAccountResponse"
      },
      "EntityName": {
        "properties": {
          "name_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/NameTypeString"
              },
              {
                "type": "null"
              }
            ],
            "description": "Type of the name. Required if entity_name or entity_localname or individual_name or individual_local_name is specified",
            "examples": [
              "LEGL"
            ]
          },
          "name_legal": {
            "type": "string",
            "maxLength": 100,
            "title": "Name Legal",
            "description": "Name of the business. Required if account_type is entity.",
            "examples": [
              "Digital Capital"
            ]
          },
          "name_business": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100
              },
              {
                "type": "null"
              }
            ],
            "title": "Name Business",
            "description": "Legal name of the business.",
            "examples": [
              "Digital Capital Pte. Ltd."
            ]
          }
        },
        "type": "object",
        "required": [
          "name_type",
          "name_legal"
        ],
        "title": "EntityName"
      },
      "IndividualName": {
        "properties": {
          "name_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/NameTypeString"
              },
              {
                "type": "null"
              }
            ],
            "description": "Type of the name. Required if entity_name or entity_localname or individual_name or individual_local_name is specified",
            "examples": [
              "LEGL"
            ]
          },
          "name_first": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 50
              },
              {
                "type": "null"
              }
            ],
            "title": "Name First",
            "description": "First name of the account holder.",
            "examples": [
              "John"
            ]
          },
          "name_middle": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 50
              },
              {
                "type": "null"
              }
            ],
            "title": "Name Middle",
            "description": "Middle name of the account holder.",
            "examples": [
              "Robert"
            ]
          },
          "name_last": {
            "type": "string",
            "maxLength": 50,
            "title": "Name Last",
            "description": "Last name of the account holder. Required if account_type is individual.",
            "examples": [
              "Doe"
            ]
          }
        },
        "type": "object",
        "required": [
          "name_type",
          "name_last"
        ],
        "title": "IndividualName"
      },
      "ListAccountsData": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AccountResponse"
            },
            "type": "array",
            "title": "Items",
            "description": "Contains the fields specific for the address of the account"
          },
          "pagination": {
            "$ref": "#/components/schemas/Pagination"
          }
        },
        "type": "object",
        "required": [
          "items",
          "pagination"
        ],
        "title": "ListAccountsData"
      },
      "ListAccountsResponse": {
        "properties": {
          "status": {
            "type": "string",
            "title": "Status",
            "default": "success",
            "examples": [
              "success"
            ]
          },
          "data": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ListAccountsData"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "title": "ListAccountsResponse"
      },
      "NameTypeString": {
        "type": "string",
        "enum": [
          "LEGL"
        ],
        "title": "NameTypeString"
      },
      "NationalId": {
        "properties": {
          "national_id_type": {
            "$ref": "#/components/schemas/NationalIdTypeString",
            "description": "Required when national_id object is specified. Type of national identification."
          },
          "national_id": {
            "type": "string",
            "maxLength": 35,
            "title": "National Id",
            "description": "National identification number.",
            "examples": [
              "ABC123456"
            ]
          },
          "issue_country": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2
              },
              {
                "type": "null"
              }
            ],
            "title": "Issue Country",
            "description": "Country that issued the national identification.",
            "examples": [
              "US"
            ]
          },
          "registration_authority": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 50
              },
              {
                "type": "null"
              }
            ],
            "title": "Registration Authority",
            "description": "Authority that issued the national identification."
          }
        },
        "type": "object",
        "required": [
          "national_id_type",
          "national_id"
        ],
        "title": "NationalId"
      },
      "NationalIdTypeString": {
        "type": "string",
        "enum": [
          "ARNU",
          "CCPT",
          "RAID",
          "DRLC",
          "FIIN",
          "TXID",
          "SOCS",
          "IDCD",
          "LEIX",
          "MISC"
        ],
        "title": "NationalIdTypeString"
      },
      "PaginatedResponse_VASPResponse_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/VASPResponse"
            },
            "type": "array",
            "title": "Items"
          },
          "pagination": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Pagination"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "title": "PaginatedResponse[VASPResponse]"
      },
      "Pagination": {
        "properties": {
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "The total number of records.",
            "example": 4
          },
          "size": {
            "type": "integer",
            "title": "Size",
            "description": "The size or number of records per page.",
            "example": 10
          },
          "page": {
            "type": "integer",
            "title": "Page",
            "description": "The current page number in pagination.",
            "example": 1
          }
        },
        "type": "object",
        "required": [
          "total",
          "size",
          "page"
        ],
        "title": "Pagination"
      },
      "RemoveAccountResponse": {
        "properties": {
          "status": {
            "type": "string",
            "title": "Status",
            "default": "success",
            "examples": [
              "success"
            ]
          },
          "data": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Data",
            "examples": [
              "Successfully deleted account with reference id of: johndoe"
            ]
          }
        },
        "type": "object",
        "title": "RemoveAccountResponse"
      },
      "RetrieveAccountResponse": {
        "properties": {
          "status": {
            "type": "string",
            "title": "Status",
            "default": "success",
            "examples": [
              "success"
            ]
          },
          "data": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AccountDetails-Output"
              },
              {
                "type": "null"
              }
            ],
            "examples": [
              {
                "account_type": "individual",
                "address": {
                  "address_building_name": "Elmwood Apartments",
                  "address_city": "New York",
                  "address_country_code": "US",
                  "address_district": "Manhattan",
                  "address_floor": "15",
                  "address_line": "Apt 123",
                  "address_postbox": "PO Box 789",
                  "address_postcode": "10001",
                  "address_region": "New York",
                  "address_room": "1503",
                  "address_street_name": "Elm Street",
                  "address_street_no": "456",
                  "address_type": "GEOG"
                },
                "created": "2024-02-26 21:57:18.000 +0800",
                "email": "you@company.com",
                "individual": {
                  "date_of_birth": "1988-06-27",
                  "individual_localname": {
                    "name_first": "John",
                    "name_last": "Doe",
                    "name_middle": "Mark",
                    "name_type": "LEGL"
                  },
                  "individual_name": {
                    "name_first": "John",
                    "name_last": "Doe",
                    "name_middle": "Mark",
                    "name_type": "LEGL"
                  },
                  "place_of_birth": "Singapore, Singapore"
                },
                "last_modified": "2024-02-27 10:37:20.000 +0800",
                "reference_id": "johndoe"
              }
            ]
          }
        },
        "type": "object",
        "title": "RetrieveAccountResponse"
      },
      "SearchAccountResponse": {
        "properties": {
          "status": {
            "type": "string",
            "title": "Status",
            "default": "success",
            "examples": [
              "success"
            ]
          },
          "data": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/AccountResponse"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Data"
          }
        },
        "type": "object",
        "title": "SearchAccountResponse"
      },
      "UpdateAccountRequest": {
        "properties": {
          "fields": {
            "items": {
              "$ref": "#/components/schemas/AccountFieldUpdate"
            },
            "type": "array",
            "title": "Fields",
            "description": "An array of the fields to be updated."
          }
        },
        "type": "object",
        "required": [
          "fields"
        ],
        "title": "UpdateAccountRequest"
      },
      "UpdateAccountResponse": {
        "properties": {
          "status": {
            "type": "string",
            "title": "Status",
            "default": "success",
            "examples": [
              "success"
            ]
          },
          "data": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AccountDetails-Output"
              },
              {
                "type": "null"
              }
            ],
            "examples": [
              {
                "account_type": "individual",
                "address": {
                  "address_building_name": "Elmwood Apartments",
                  "address_city": "New York",
                  "address_country_code": "US",
                  "address_district": "Manhattan",
                  "address_floor": "15",
                  "address_line": "Apt 123",
                  "address_postbox": "PO Box 789",
                  "address_postcode": "10001",
                  "address_region": "New York",
                  "address_room": "1503",
                  "address_street_name": "Elm Street",
                  "address_street_no": "456",
                  "address_type": "GEOG"
                },
                "created": "2024-02-26 21:57:18.000 +0800",
                "email": "you@company.com",
                "individual": {
                  "date_of_birth": "1988-06-27",
                  "individual_localname": {
                    "name_first": "John",
                    "name_last": "Doe",
                    "name_middle": "Mark",
                    "name_type": "LEGL"
                  },
                  "individual_name": {
                    "name_first": "John",
                    "name_last": "Doe",
                    "name_middle": "Mark",
                    "name_type": "LEGL"
                  },
                  "place_of_birth": "Singapore, Singapore"
                },
                "last_modified": "2024-02-27 10:37:20.000 +0800",
                "reference_id": "johndoe"
              }
            ]
          }
        },
        "type": "object",
        "title": "UpdateAccountResponse"
      },
      "VASPResponse": {
        "properties": {
          "vasp_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Vasp Id"
          },
          "name_legal": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name Legal"
          },
          "name_business": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name Business"
          },
          "address_country_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Address Country Code"
          },
          "address_street_no": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Address Street No"
          },
          "address_street_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Address Street Name"
          },
          "address_city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Address City"
          },
          "address_region": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Address Region"
          },
          "address_postcode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Address Postcode"
          },
          "address_line": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Address Line"
          },
          "website": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Website"
          },
          "summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Summary"
          },
          "supported_protocols": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Supported Protocols"
          },
          "national_id_type_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "National Id Type Code"
          },
          "national_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "National Id"
          },
          "national_id_issue_country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "National Id Issue Country"
          },
          "national_id_registration_authority": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "National Id Registration Authority"
          }
        },
        "type": "object",
        "title": "VASPResponse"
      }
    },
    "securitySchemes": {
      "HTTPBearer": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  }
}
