schemes:person:addressdetails
Dies ist eine alte Version des Dokuments!
Inhaltsverzeichnis
addressdetails
description
Das Schema für person:addressdetails unterstützt:
- Mehrere Adressen: Haupt- und Nebenwohnsitze sowie andere Typen (z. B. Arbeitsadresse).
- Geolocation: Optionaler Standort mit Längen- und Breitengrad für Regionen ohne strukturierte Adressen.
- Vollständige Adressdetails: Straße, Stadt, Staat/Region, Postleitzahl und Land im ISO-Format.
examples
json notation
{
"addresses": [
{
"type": "primary residence",
"street": {
"name": "Main Street",
"line_in_address": 1,
"position_in_address_line": 1
},
"number": {
"value": "123",
"line_in_address": 1,
"position_in_address_line": 2
},
"unit": {
"value": "Apt 5B",
"line_in_address": 1,
"position_in_address_line": 3
},
"floor": {
"value": "3",
"line_in_address": 1,
"position_in_address_line": 4
},
"city": {
"name": "Berlin",
"line_in_address": 2,
"position_in_address_line": 1
},
"state": {
"name": "Berlin",
"line_in_address": 2,
"position_in_address_line": 2
},
"postalCode": {
"value": "10115",
"line_in_address": 3,
"position_in_address_line": 1
},
"country": {
"name": "Germany",
"line_in_address": 4,
"position_in_address_line": 1
},
"geolocation": {
"latitude": 52.5200,
"longitude": 13.4050
}
},
{
"type": "secondary residence",
"street": {
"name": "Elm Street",
"line_in_address": 1,
"position_in_address_line": 1
},
"number": {
"value": "456",
"line_in_address": 1,
"position_in_address_line": 2
},
"city": {
"name": "Munich",
"line_in_address": 2,
"position_in_address_line": 1
},
"state": {
"name": "Bavaria",
"line_in_address": 2,
"position_in_address_line": 2
},
"postalCode": {
"value": "80331",
"line_in_address": 3,
"position_in_address_line": 1
},
"country": {
"name": "Germany",
"line_in_address": 4,
"position_in_address_line": 1
},
}
]
}
array notation
$person['addresses'][0]['type'] = "primary residence"; $person['addresses'][0]['street']['name'] = "Main Street"; $person['addresses'][0]['street']['line_in_address'] = 1; $person['addresses'][0]['street']['position_in_address_line'] = 1; $person['addresses'][0]['number']['value'] = "123"; $person['addresses'][0]['number']['line_in_address'] = 1; $person['addresses'][0]['number']['position_in_address_line'] = 2; $person['addresses'][0]['unit']['value'] = "Apt 5B"; $person['addresses'][0]['unit']['line_in_address'] = 1; $person['addresses'][0]['unit']['position_in_address_line'] = 3; $person['addresses'][0]['floor']['value'] = "3"; $person['addresses'][0]['floor']['line_in_address'] = 1; $person['addresses'][0]['floor']['position_in_address_line'] = 4; $person['addresses'][0]['city']['name'] = "Berlin"; $person['addresses'][0]['city']['line_in_address'] = 2; $person['addresses'][0]['city']['position_in_address_line'] = 1; $person['addresses'][0]['state']['name'] = "Berlin"; $person['addresses'][0]['state']['line_in_address'] = 2; $person['addresses'][0]['state']['position_in_address_line'] = 2; $person['addresses'][0]['postalCode']['value'] = "10115"; $person['addresses'][0]['postalCode']['line_in_address'] = 3; $person['addresses'][0]['postalCode']['position_in_address_line'] = 1; $person['addresses'][0]['country']['name'] = "Germany"; $person['addresses'][0]['country']['line_in_address'] = 4; $person['addresses'][0]['country']['position_in_address_line'] = 1; $person['addresses'][0]['geolocation']['latitude'] = 52.5200; $person['addresses'][0]['geolocation']['longitude'] = 13.4050; $person['addresses'][1]['type'] = "secondary residence"; $person['addresses'][1]['street']['name'] = "Elm Street"; $person['addresses'][1]['street']['line_in_address'] = 1; $person['addresses'][1]['street']['position_in_address_line'] = 1; $person['addresses'][1]['number']['value'] = "456"; $person['addresses'][1]['number']['line_in_address'] = 1; $person['addresses'][1]['number']['position_in_address_line'] = 2; $person['addresses'][1]['city']['name'] = "Munich"; $person['addresses'][1]['city']['line_in_address'] = 2; $person['addresses'][1]['city']['position_in_address_line'] = 1; $person['addresses'][1]['state']['name'] = "Bavaria"; $person['addresses'][1]['state']['line_in_address'] = 2; $person['addresses'][1]['state']['position_in_address_line'] = 2; $person['addresses'][1]['postalCode']['value'] = "80331"; $person['addresses'][1]['postalCode']['line_in_address'] = 3; $person['addresses'][1]['postalCode']['position_in_address_line'] = 1; $person['addresses'][1]['country']['name'] = "Germany"; $person['addresses'][1]['country']['line_in_address'] = 4; $person['addresses'][1]['country']['position_in_address_line'] = 1;
schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://b2base.eu/doku.php?id=schemes:person:addressdetails",
"title": "b2base:schemes:person:addressdetails",
"description": "A schema for representing a person's addresses, including support for international and unique cases.",
"type": "object",
"properties": {
"addresses": {
"type": "array",
"description": "A list of the person's addresses, including type and optional geolocation information.",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "The type of address, e.g., primary residence, secondary residence, work, post box, or military address.",
"example": "primary residence"
},
"street": {
"type": "object",
"description": "Detailed information about the street.",
"properties": {
"name": {
"type": "string",
"description": "The name of the street.",
"example": "Main Street"
},
"line_in_address": {
"type": "integer",
"description": "Defines which line in the address this street appears on when formatted.",
"example": 1
},
"position_in_address_line": {
"type": "integer",
"description": "Defines the position of the street name within its address line.",
"example": 1
}
},
"required": ["name"]
},
"number": {
"type": "object",
"description": "Detailed information about the house or building number.",
"properties": {
"value": {
"type": "string",
"description": "The house or building number.",
"example": "123"
},
"line_in_address": {
"type": "integer",
"description": "Defines which line in the address this number appears on when formatted.",
"example": 1
},
"position_in_address_line": {
"type": "integer",
"description": "Defines the position of the number within its address line.",
"example": 2
}
},
"required": ["value"]
},
"unit": {
"type": "object",
"description": "Detailed information about the unit, apartment, or room number.",
"properties": {
"value": {
"type": "string",
"description": "The unit, apartment, or room number.",
"example": "Apt 5B"
},
"line_in_address": {
"type": "integer",
"description": "Defines which line in the address this unit appears on when formatted.",
"example": 1
},
"position_in_address_line": {
"type": "integer",
"description": "Defines the position of the unit within its address line.",
"example": 3
}
},
"required": ["value"]
},
"floor": {
"type": "object",
"description": "Detailed information about the floor.",
"properties": {
"value": {
"type": "string",
"description": "The floor number.",
"example": "3"
},
"line_in_address": {
"type": "integer",
"description": "Defines which line in the address this floor appears on when formatted.",
"example": 1
},
"position_in_address_line": {
"type": "integer",
"description": "Defines the position of the floor within its address line.",
"example": 4
}
},
"required": ["value"]
},
"postBox": {
"type": "object",
"description": "Detailed information about the post box.",
"properties": {
"value": {
"type": "string",
"description": "The post box number.",
"example": "PO Box 1234"
},
"line_in_address": {
"type": "integer",
"description": "Defines which line in the address this post box appears on when formatted.",
"example": 2
},
"position_in_address_line": {
"type": "integer",
"description": "Defines the position of the post box within its address line.",
"example": 1
}
},
"required": ["value"]
},
"blockOrPlotNumber": {
"type": "object",
"description": "Detailed information about the block or plot number.",
"properties": {
"value": {
"type": "string",
"description": "The block or plot number.",
"example": "Block 15, Plot 23"
},
"line_in_address": {
"type": "integer",
"description": "Defines which line in the address this block or plot number appears on when formatted.",
"example": 2
},
"position_in_address_line": {
"type": "integer",
"description": "Defines the position of the block or plot number within its address line.",
"example": 2
}
},
"required": ["value"]
},
"city": {
"type": "object",
"description": "Detailed information about the city or town.",
"properties": {
"name": {
"type": "string",
"description": "The name of the city or town.",
"example": "Berlin"
},
"line_in_address": {
"type": "integer",
"description": "Defines which line in the address this city appears on when formatted.",
"example": 3
},
"position_in_address_line": {
"type": "integer",
"description": "Defines the position of the city within its address line.",
"example": 1
}
},
"required": ["name"]
},
"state": {
"type": "object",
"description": "Detailed information about the state, province, or region.",
"properties": {
"name": {
"type": "string",
"description": "The name of the state, province, or region.",
"example": "Berlin"
},
"line_in_address": {
"type": "integer",
"description": "Defines which line in the address this state appears on when formatted.",
"example": 3
},
"position_in_address_line": {
"type": "integer",
"description": "Defines the position of the state within its address line.",
"example": 2
}
},
"required": ["name"]
},
"postalCode": {
"type": "object",
"description": "Detailed information about the postal or ZIP code.",
"properties": {
"value": {
"type": "string",
"description": "The postal or ZIP code.",
"example": "10115"
},
"line_in_address": {
"type": "integer",
"description": "Defines which line in the address this postal code appears on when formatted.",
"example": 4
},
"position_in_address_line": {
"type": "integer",
"description": "Defines the position of the postal code within its address line.",
"example": 1
}
},
"required": ["value"]
},
"wardNumber": {
"type": "object",
"description": "Detailed information about the ward number.",
"properties": {
"value": {
"type": "string",
"description": "The ward number.",
"example": "Ward 12"
},
"line_in_address": {
"type": "integer",
"description": "Defines which line in the address this ward number appears on when formatted.",
"example": 5
},
"position_in_address_line": {
"type": "integer",
"description": "Defines the position of the ward number within its address line.",
"example": 1
}
},
"required": ["value"]
},
"country": {
"type": "object",
"description": "Detailed information about the country.",
"properties": {
"name": {
"type": "string",
"description": "The name of the country.",
"example": "Germany"
},
"line_in_address": {
"type": "integer",
"description": "Defines which line in the address this country appears on when formatted.",
"example": 5
},
"position_in_address_line": {
"type": "integer",
"description": "Defines the position of the country within its address line.",
"example": 1
}
},
"required": ["name"]
},
"militaryAddress": {
"type": "boolean",
"description": "Indicates if this is a military address.",
"example": false
},
"geolocation": {
"type": "object",
"description": "Geolocation coordinates for areas without structured addresses.",
"properties": {
"latitude": {
"type": "number",
"description": "The latitude of the location.",
"example": 52.5200
},
"longitude": {
"type": "number",
"description": "The longitude of the location.",
"example": 13.4050
}
},
"required": ["latitude", "longitude"]
}
},
"required": ["type", "city", "country"]
}
}
},
"required": ["addresses"]
}
schemes/person/addressdetails.1734090397.txt.gz · Zuletzt geändert: (Externe Bearbeitung)
