Pave Bank
Address

Generate Structured Address

Use this API to convert a freeform address string into a structured address format. This is useful when creating nominal sub-accounts or when you need to parse unstructured address data into standardized fields.

Example Request

curl -X POST 'https://developer-api-staging.pavebank.dev/v1/address/generate-structured' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer <YOUR_BEARER_TOKEN>' \
  --data '{
  "freeform_address": "123 Main Street, Apartment 4B, New York, NY 10001, USA"
}'

Example Response

This API will parse the freeform address and return a structured format that can be used in other API calls, such as creating nominal sub-accounts.

{
  "structured_address": {
    "building_number": "123",
    "street_name": "Main Street",
    "floor": "4B",
    "town_name": "New York",
    "country_sub_division": "NY",
    "post_code": "10001",
    "country": "US"
  },
  "freeform_address": "123 Main Street, Apartment 4B, New York, NY 10001, USA"
}
POST
/v1/address/generate-structured

Authorization

AuthorizationRequiredBearer <token>

Enter your token in the format: Bearer {token}

In: header

Request Body

application/jsonOptional
freeform_addressRequiredstring

Unstructured address text to be converted into a structured format

Response Body

Success response

structured_addressRequiredobject
freeform_addressRequiredstring

The original freeform address that was provided

curl -X POST "https://developer-api-staging.pavebank.dev/v1/address/generate-structured" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "freeform_address": "string"
  }'
{
  "structured_address": {
    "building_name": "string",
    "building_number": "string",
    "country": "string",
    "country_sub_division": "string",
    "floor": "string",
    "post_code": "string",
    "street_name": "string",
    "town_name": "string"
  },
  "freeform_address": "string"
}