In this article:
- Get Address by ID
- Create Address
- Search Addresses
- Count All Addresses
- Get Address by External ID
- Save Address
- Update Address
- Delete Address
- Delete All Addresses
- Batch Import Address and Services
- Get Full Service Details for Address
- Get Full Service Details for Address by External ID
- Search by ID
- Search to DTO
- Fuzzy Search
- Fuzzy Search to DTO
Get Address by ID
Endpoint: GET /MyArea/GetAddress
Authentication: None required
Description: Get a specific address by OpenCities ID.
Parameters
| Parameter | Type | Required | Description |
| addressId | string (UUID) | Yes | The OpenCities ID for the address |
Sample Request
curl -H "Content-Type: application/json" \ "https://your-domain.com/api/v1/MyArea/GetAddress?addressId=123e4567-e89b-12d3-a456-426614174000"
Create Address
Endpoint: POST /MyArea/CreateAddress
Authentication: Required
Description: Creates a new address in the system.
Parameters
| Parameter | Type | Required | Description |
| address | object | Yes | PhysicalAddressDto object (request body) |
Sample Request
curl -u "your_app_id:your_api_key" \
-H "Content-Type: application/json" \
-d '{
"AddressSingleLine": "33B Riverside Drive, Brunswick California 90210",
"MunicipalSubdivision": "Ward 3",
"ExternalId": "EXT_001",
"LatLon": [-37.7749, 144.9644]
}' \
"https://your-domain.com/api/v1/MyArea/CreateAddress"Sample Response
{
"Id": "123e4567-e89b-12d3-a456-426614174000",
"Operation": "Created"
}Search Addresses
Endpoint: GET /MyArea/Search
Authentication: None required
Description: Search for addresses by keyword with spelling tolerance.
Parameters
| Parameter | Type | Required | Description |
| keywords | string | Yes | The keywords to search with |
| maxResults | integer | No | Maximum results to return. Default: 10 |
Sample Request
curl -H "Content-Type: application/json" \ "https://your-domain.com/api/v1/MyArea/Search?keywords=riverside%20drive&maxResults=5"
Sample Response
{
"Total": 3,
"Limit": 5,
"Offset": 0,
"Items": [
{
"Id": "123e4567-e89b-12d3-a456-426614174000",
"AddressSingleLine": "33B Riverside Drive, Brunswick California 90210",
"MunicipalSubdivision": "Ward 3",
"Score": 5.3363,
"LatLon": [-37.7749, 144.9644]
}
]
}Count All Addresses
Endpoint: GET /MyArea/CountAllAddresses
Authentication: None required
Description: Counts the total number of addresses in the system and returns the result as an Int64.
Sample Request
curl -H "Content-Type: application/json" \ "https://your-domain.com/api/v1/MyArea/CountAllAddresses"
Sample Response
{
"Result": 15642
}Get Address by External ID
Endpoint: GET /MyArea/GetAddressByExternalId
Authentication: None required
Description: Get a specific address by external ID.
Parameters
| Parameter | Type | Required | Description |
| externalId | string | Yes | The external ID for the address |
Sample Request
curl -H "Content-Type: application/json" \ "https://your-domain.com/api/v1/MyArea/GetAddressByExternalId?externalId=EXT-ADDR-12345"
Save Address
Endpoint: POST /MyArea/SaveAddress
Authentication: Required
Description: Saves an address to the system. Updates if it exists, creates if it doesn't.
Parameters
| Parameter | Type | Required | Description |
| Address DTO | object | Yes | Address data (request body) |
Sample Request
curl -u "your_app_id:your_api_key" \
-X POST \
-H "Content-Type: application/json" \
-d '{
"ExternalId": "EXT-ADDR-12345",
"AddressSingleLine": "123 Main Street, Cityville CA 90210",
"MunicipalSubdivision": "Ward 1",
"LatLon": [34.0522, -118.2437]
}' \
"https://your-domain.com/api/v1/MyArea/SaveAddress"Update Address
Endpoint: POST /MyArea/UpdateAddress
Authentication: Required
Description: Updates an existing address in the system. Returns error if address not found.
Delete Address
Endpoint: DELETE /MyArea/DeleteAddress
Authentication: Required
Description: Delete a specific address identified by addressId.
Parameters
| Parameter | Type | Required | Description |
| addressId | string | Yes | The address ID to delete |
Sample Request
curl -u "your_app_id:your_api_key" \ -X DELETE \ "https://your-domain.com/api/v1/MyArea/DeleteAddress?addressId=123e4567-e89b-12d3-a456-426614174000"
Delete All Addresses
Endpoint: DELETE /MyArea/DeleteAllAddresses
Authentication: Required
Description: Delete all addresses in the system. Use with caution, this operation cannot be undone.
Sample Request
curl -u "your_app_id:your_api_key" \ -X DELETE \ "https://your-domain.com/api/v1/MyArea/DeleteAllAddresses"
Batch Import Address and Services
Endpoint: POST /MyArea/BatchImportAddressAndServices
Authentication: Required
Description: Batch import addresses and service schedules. Maximum batch size is 1000.
Import Address and Services
Endpoint: POST /MyArea/ImportAddressAndServices
Authentication: Required
Description: Import an address with service schedules in a single request.
Get Full Service Details for Address
Endpoint: GET /MyArea/GetFullServiceDetailsForAddress
Authentication: None required
Description: Get full address and service details for a specific address.
Parameters
| Parameter | Type | Required | Description |
| addressId | string | Yes | The address ID |
Sample Request
curl -H "Content-Type: application/json" \ "https://your-domain.com/api/v1/MyArea/GetFullServiceDetailsForAddress?addressId=123e4567-e89b-12d3-a456-426614174000"
Get Full Service Details for Address by External ID
Endpoint: GET /MyArea/GetFullServiceDetailsForAddressByExternalId
Authentication: None required
Description: Get full address and service details for a specific address by external ID.
Parameters
| Parameter | Type | Required | Description |
| externalId | string | Yes | The external address ID |
Search by ID
Endpoint: GET /MyArea/SearchById
Authentication: None required
Description: Get a specific address by OpenCities ID.
Parameters
| Parameter | Type | Required | Description |
| addressId | String (UUID) | Yes | The address ID |
Search to DTO
Endpoint: GET /MyArea/SearchToDto
Authentication: Required
Description: Search for address by keyword and return results as a list of address objects.
Parameters
| Parameter | Type | Required | Description |
| keywords | string | Yes | Search keywords |
| maxResults | integer | No | Maximum results to return |
Sample Request
curl -X 'GET' \ 'https://your-domain.com/api/v1/MyArea/SearchToDto?keywords=lands&maxResults=10' \ -H 'accept: application/json'
Fuzzy Search
Endpoint: GET /MyArea/SearchFuzzy
Authentication: None required
Description: Fuzzy search for address by keyword. Tolerant of spelling mistakes and returns more results.
Parameters
| Parameter | Type | Required | Description |
| keywords | string | Yes | Search keywords |
| maxResults | integer | No | Maximum results to return |
Sample Request
curl -X 'GET' \ 'https://your-domain.com/api/v1/MyArea/SearchFuzzy?keywords=lands&maxResults=10' \ -H 'accept: application/json'
Fuzzy Search to DTO
Endpoint: GET /MyArea/SearchFuzzyToDto
Authentication: Required
Description: Fuzzy search for address by keyword and return results as a list of address objects.
Parameters
| Parameter | Type | Required | Description |
| keywords | string | Yes | Search keywords |
| maxResults | integer | No | Maximum results to return |
Sample Request
curl -X 'GET' \ 'https://your-domain.com/api/v1/MyArea/SearchFuzzyToDto?keywords=lands&maxResults=10' \ -H 'accept: application/json'