POST /location/v1/structure
Content-Type: application/json
Authorization: Bearer <your-api-key-here>
{
"address": "Uniserv GmbH Roland Pfeiffer Geschäftsführung Rastatter Str. 13 75179 Pforzheim"
}
Structuring an Address
|
To try these examples, sign up for a free test account on Uniserv CONNECT and get your API key! |
Basic Usage
The Structure API takes an unstructured, single‐line address and splits it into its component. Send a JSON POST to the /structure endpoint:
The service will:
-
Validate your API key.
-
Detect the country code.
-
Segment the input into address elements.
-
Return the parsed fields in JSON.
Example Response
In a successful call, you receive HTTP 200 and a JSON body with each element:
HTTP/1.1 200 OK
Content-Type: application/json
{
"country": "DE",
"postalCode": "75179",
"locality": "Pforzheim",
"subLocality": null,
"street": "Rastatter Str.",
"houseNumber": "13",
"recipient": "Roland Pfeiffer",
"organization": "Uniserv GmbH",
"organizationAddition": "Geschäftsführung",
"unidentifiedElements": []
}
The unidentifiedElements array lists any words that couldn’t be assigned to a known field.
Field Reference
See the Data Model for full details: Structure Data Model.
| Field | Type | Description |
|---|---|---|
|
string |
Input: the full address in one line. |
|
string |
Detected country code. |
|
string |
Postal code, if recognized. |
|
string |
City or town name, if recognized. |
|
string |
District or neighborhood, if recognized. |
|
string |
Street name, if recognized. |
|
string |
House number, if recognized. |
|
string |
Person’s name, if identified. |
|
string |
Organization name, if identified. |
|
string |
Extra org info (e.g. department), if present. |
|
array[string] |
Tokens that couldn’t be assigned. |
Troubleshooting
The API returns errors with HTTP status codes and a payload in problem+json
format (see RFC 7807):
HTTP/1.1 401 Unauthorized
Content-Type: application/problem+json
X-Uniserv-Request-Id: abcd1234
{
"status": 401,
"type": "https://docs.uniserv.com/location/problems#no-auth-data",
"title": "No authorization header present"
}
For a full list of error types and remedies, see list of errors.
