> For the complete documentation index, see [llms.txt](https://docs.ospree.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ospree.io/developers/accounts-directory/openapi/models.md).

# Models

## The AccountDetails object

```json
{"openapi":"3.1.0","info":{"title":"Ospree Directory API","version":"2.0.0"},"components":{"schemas":{"AccountDetails":{"properties":{"reference_id":{"type":"string","maxLength":50,"minLength":4,"title":"Reference Id","description":"Unique identifier for the account."},"account_type":{"type":"string","title":"Account Type","description":"Type of account, either 'individual' or 'entity'."},"account_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Category","default":"customer"},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email","description":"Email address associated with the account."},"customer_id":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Customer Id","description":"Customer ID associated with the account."},"individual":{"anyOf":[{"$ref":"#/components/schemas/AccountIndividual"},{"type":"null"}],"description":"The object that contains the fields specific for an individual account"},"entity":{"anyOf":[{"$ref":"#/components/schemas/AccountEntity"},{"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"},"AccountIndividual":{"properties":{"individual_name":{"anyOf":[{"$ref":"#/components/schemas/IndividualName"},{"type":"null"}],"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."},"place_of_birth":{"anyOf":[{"type":"string","maxLength":70},{"type":"null"}],"title":"Place Of Birth","description":"Place of birth of the account holder."},"nationality_country":{"anyOf":[{"type":"string","maxLength":2},{"type":"null"}],"title":"Nationality Country","description":"Country code of the nationality of the account holder."},"residence_country":{"anyOf":[{"type":"string","maxLength":2},{"type":"null"}],"title":"Residence Country","description":"Country code of the place of residence of the account holder."}},"type":"object","title":"AccountIndividual"},"IndividualName":{"properties":{"name_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name Type","description":"Type of the name. Required if entity_name or entity_localname or individual_name or individual_local_name is specified"},"name_first":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Name First","description":"First name of the account holder."},"name_middle":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Name Middle","description":"Middle name of the account holder."},"name_last":{"type":"string","maxLength":100,"title":"Name Last","description":"Last name of the account holder. Required if account_type is individual."}},"type":"object","required":["name_type","name_last"],"title":"IndividualName"},"AccountEntity":{"properties":{"entity_name":{"anyOf":[{"$ref":"#/components/schemas/EntityName"},{"type":"null"}],"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."}},"type":"object","title":"AccountEntity"},"EntityName":{"properties":{"name_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name Type","description":"Type of the name. Required if entity_name or entity_localname or individual_name or individual_local_name is specified"},"name_legal":{"type":"string","maxLength":100,"title":"Name Legal","description":"Name of the business. Required if account_type is entity."},"name_business":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Name Business","description":"Legal name of the business."}},"type":"object","required":["name_type","name_legal"],"title":"EntityName"},"Address":{"properties":{"address_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Type","description":"Required if address object is specified. Type of the address, as an IVMS101 addressType code: HOME (residential), BIZZ (business) or GEOG (unspecified). The code is sent verbatim on every outbound travel-rule payload for this account, so GEOG says only that the type was not stated."},"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."},"address_street_no":{"anyOf":[{"type":"string","maxLength":16},{"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"},"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."},"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."},"address_floor":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Address Floor","description":"Floor number in the building."},"address_room":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Address Room","description":"Room number in the building."},"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."},"address_city_location":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Address City Location","description":"Geographical location of the city."},"address_city":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Address City","description":"City of the account holder's address."},"address_region":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Address Region","description":"Region or state of the account holder's address."},"address_district":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Address District","description":"District of the account holder's address."},"address_postcode":{"anyOf":[{"type":"string","maxLength":25},{"type":"null"}],"title":"Address Postcode","description":"Postal code of the account holder's address."},"address_country_code":{"anyOf":[{"type":"string","maxLength":2},{"type":"null"}],"title":"Address Country Code","description":"Country code of the account holder's address."}},"type":"object","required":["address_type"],"title":"Address"},"NationalId":{"properties":{"national_id_type":{"type":"string","title":"National Id Type","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."},"issue_country":{"anyOf":[{"type":"string","maxLength":2},{"type":"null"}],"title":"Issue Country","description":"Country that issued the national identification."},"registration_authority":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Registration Authority","description":"GLEIF Registration Authority code of the register that issued the national identification: `RA` followed by six digits, e.g. `RA000583`. This is the register's code, not the authority's name. Required for entity national IDs other than `LEIX`, and must be omitted for `LEIX`. Case-insensitive; normalised to upper case."}},"type":"object","required":["national_id_type","national_id"],"title":"NationalId"}}}}
```

## The AccountEntity object

```json
{"openapi":"3.1.0","info":{"title":"Ospree Directory API","version":"2.0.0"},"components":{"schemas":{"AccountEntity":{"properties":{"entity_name":{"anyOf":[{"$ref":"#/components/schemas/EntityName"},{"type":"null"}],"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."}},"type":"object","title":"AccountEntity"},"EntityName":{"properties":{"name_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name Type","description":"Type of the name. Required if entity_name or entity_localname or individual_name or individual_local_name is specified"},"name_legal":{"type":"string","maxLength":100,"title":"Name Legal","description":"Name of the business. Required if account_type is entity."},"name_business":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Name Business","description":"Legal name of the business."}},"type":"object","required":["name_type","name_legal"],"title":"EntityName"}}}}
```

## The AccountFieldUpdate object

```json
{"openapi":"3.1.0","info":{"title":"Ospree Directory API","version":"2.0.0"},"components":{"schemas":{"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."}},"type":"object","required":["field","value"],"title":"AccountFieldUpdate"}}}}
```

## The AccountIndividual object

```json
{"openapi":"3.1.0","info":{"title":"Ospree Directory API","version":"2.0.0"},"components":{"schemas":{"AccountIndividual":{"properties":{"individual_name":{"anyOf":[{"$ref":"#/components/schemas/IndividualName"},{"type":"null"}],"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."},"place_of_birth":{"anyOf":[{"type":"string","maxLength":70},{"type":"null"}],"title":"Place Of Birth","description":"Place of birth of the account holder."},"nationality_country":{"anyOf":[{"type":"string","maxLength":2},{"type":"null"}],"title":"Nationality Country","description":"Country code of the nationality of the account holder."},"residence_country":{"anyOf":[{"type":"string","maxLength":2},{"type":"null"}],"title":"Residence Country","description":"Country code of the place of residence of the account holder."}},"type":"object","title":"AccountIndividual"},"IndividualName":{"properties":{"name_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name Type","description":"Type of the name. Required if entity_name or entity_localname or individual_name or individual_local_name is specified"},"name_first":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Name First","description":"First name of the account holder."},"name_middle":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Name Middle","description":"Middle name of the account holder."},"name_last":{"type":"string","maxLength":100,"title":"Name Last","description":"Last name of the account holder. Required if account_type is individual."}},"type":"object","required":["name_type","name_last"],"title":"IndividualName"}}}}
```

## The AccountTypeString object

```json
{"openapi":"3.1.0","info":{"title":"Ospree Directory API","version":"2.0.0"},"components":{"schemas":{"AccountTypeString":{"type":"string","enum":["individual","entity"],"title":"AccountTypeString"}}}}
```

## The Address object

```json
{"openapi":"3.1.0","info":{"title":"Ospree Directory API","version":"2.0.0"},"components":{"schemas":{"Address":{"properties":{"address_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Type","description":"Required if address object is specified. Type of the address, as an IVMS101 addressType code: HOME (residential), BIZZ (business) or GEOG (unspecified). The code is sent verbatim on every outbound travel-rule payload for this account, so GEOG says only that the type was not stated."},"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."},"address_street_no":{"anyOf":[{"type":"string","maxLength":16},{"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"},"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."},"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."},"address_floor":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Address Floor","description":"Floor number in the building."},"address_room":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Address Room","description":"Room number in the building."},"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."},"address_city_location":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Address City Location","description":"Geographical location of the city."},"address_city":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Address City","description":"City of the account holder's address."},"address_region":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Address Region","description":"Region or state of the account holder's address."},"address_district":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Address District","description":"District of the account holder's address."},"address_postcode":{"anyOf":[{"type":"string","maxLength":25},{"type":"null"}],"title":"Address Postcode","description":"Postal code of the account holder's address."},"address_country_code":{"anyOf":[{"type":"string","maxLength":2},{"type":"null"}],"title":"Address Country Code","description":"Country code of the account holder's address."}},"type":"object","required":["address_type"],"title":"Address"}}}}
```

## The ApiErrorResponse object

```json
{"openapi":"3.1.0","info":{"title":"Ospree Directory API","version":"2.0.0"},"components":{"schemas":{"ApiErrorResponse":{"properties":{"status":{"type":"string","title":"Status","default":"error"},"code":{"type":"integer","title":"Code","description":"Duplicates the HTTP status; use `error_code`. Removed in v3."},"message":{"type":"string","title":"Message"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code","description":"Stable, machine-readable error code, e.g. `auth.unauthenticated`. Additive-only."},"data":{"anyOf":[{},{"type":"null"}],"title":"Data"}},"type":"object","required":["code","message"],"title":"ApiErrorResponse","description":"*summary*: Api error response model"}}}}
```

## The ApiFailResponse object

```json
{"openapi":"3.1.0","info":{"title":"Ospree Directory API","version":"2.0.0"},"components":{"schemas":{"ApiFailResponse":{"properties":{"status":{"type":"string","title":"Status","default":"fail"},"message":{"type":"string","title":"Message"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code","description":"Stable, machine-readable error code, e.g. `auth.unauthenticated`. Additive-only."},"data":{"anyOf":[{},{"type":"null"}],"title":"Data"}},"type":"object","required":["message"],"title":"ApiFailResponse","description":"*summary*: Api fail response model"}}}}
```

## The CustomerFilterType object

```json
{"openapi":"3.1.0","info":{"title":"Ospree Directory API","version":"2.0.0"},"components":{"schemas":{"CustomerFilterType":{"type":"string","enum":["customer","non-customer","all"],"title":"CustomerFilterType","description":"Filter options for customer type"}}}}
```

## The EntityName object

```json
{"openapi":"3.1.0","info":{"title":"Ospree Directory API","version":"2.0.0"},"components":{"schemas":{"EntityName":{"properties":{"name_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name Type","description":"Type of the name. Required if entity_name or entity_localname or individual_name or individual_local_name is specified"},"name_legal":{"type":"string","maxLength":100,"title":"Name Legal","description":"Name of the business. Required if account_type is entity."},"name_business":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Name Business","description":"Legal name of the business."}},"type":"object","required":["name_type","name_legal"],"title":"EntityName"}}}}
```

## The IndividualName object

```json
{"openapi":"3.1.0","info":{"title":"Ospree Directory API","version":"2.0.0"},"components":{"schemas":{"IndividualName":{"properties":{"name_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name Type","description":"Type of the name. Required if entity_name or entity_localname or individual_name or individual_local_name is specified"},"name_first":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Name First","description":"First name of the account holder."},"name_middle":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Name Middle","description":"Middle name of the account holder."},"name_last":{"type":"string","maxLength":100,"title":"Name Last","description":"Last name of the account holder. Required if account_type is individual."}},"type":"object","required":["name_type","name_last"],"title":"IndividualName"}}}}
```

## The NationalId object

```json
{"openapi":"3.1.0","info":{"title":"Ospree Directory API","version":"2.0.0"},"components":{"schemas":{"NationalId":{"properties":{"national_id_type":{"type":"string","title":"National Id Type","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."},"issue_country":{"anyOf":[{"type":"string","maxLength":2},{"type":"null"}],"title":"Issue Country","description":"Country that issued the national identification."},"registration_authority":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Registration Authority","description":"GLEIF Registration Authority code of the register that issued the national identification: `RA` followed by six digits, e.g. `RA000583`. This is the register's code, not the authority's name. Required for entity national IDs other than `LEIX`, and must be omitted for `LEIX`. Case-insensitive; normalised to upper case."}},"type":"object","required":["national_id_type","national_id"],"title":"NationalId"}}}}
```

## The UpdateAccountRequest object

```json
{"openapi":"3.1.0","info":{"title":"Ospree Directory API","version":"2.0.0"},"components":{"schemas":{"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"},"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."}},"type":"object","required":["field","value"],"title":"AccountFieldUpdate"}}}}
```
