REST API: Addresses
Using the REST API, you can create, update and delete addresses within your AMS+ account.
Addresses Resources
Create
RESOURCE URI
https://app.agencybloc.com/api/v1/addresses/create
REQUIRED POST PARAMETERS
You must POST the following parameters via the body of the request. Parameters found in the querystring of the request will be ignored:
| Parameter | Description |
|---|---|
| entityID | The ID of the entity(group, individual, agent, or carrier) the address will be created under. |
| entityType | The entity type you are attaching the address to. |
| addrType* | The address type of the new address being created in your AMS+ account. This value will be displayed in the 'Contact Information' section of the entity. |
The entityType parameter must be one of the following values:
- Group
- Individual
- Agent
- Carrier
ADDITIONAL POST PARAMETERS
| Parameter | Description |
|---|---|
| street1 | The first line of the new address that is being created in your AMS+ account. This value will be displayed in the 'Contact Information' section of the entity. |
| street2 | The second line of the new address that is being created in your AMS+ account. This value will be displayed in the 'Contact Information' section of the entity. |
| city | The city of the new address that is being created in your AMS+ account. This value will be displayed in the 'Contact Information' section of the entity. |
| stateAbbrev | The state abbreviation of the new address that is being created in your AMS+ account. This value will be displayed in the 'Contact Information' section of the entity. |
| zip | The zip code of the new address that is being created in your AMS+ account. This value will be displayed in the 'Contact Information' section of the entity. |
RESPONSE
A return response will be generated after you have consumed the API. Upon successfully creating a new address inside your AMS+ account, you will get a return status of 200 along with the addressID as seen below.
{
"Agencybloc Response": {
"Status":"200",
"addressID":"123456",
"Action":"delete"
}
}
Update
RESOURCE URI
https://app.agencybloc.com/api/v1/addresses/update
REQUIRED POST PARAMETERS
You must POST the following parameters via the body of the request. Parameters found in the querystring of the request will be ignored:
| Parameter | Description |
|---|---|
| addressID | The ID of the address being updated. |
ADDITIONAL POST PARAMETERS
| Parameter | Description |
|---|---|
| addressType* | The address type of the address being updated in your AMS+ account. This value will be displayed in the 'Contact Information' section of the entity. |
| street1 | The first line of the address that is being updated in your AMS+ account. This value will be displayed in the 'Contact Information' section of the entity. |
| street2 | The second line of the address that is being updated in your AMS+ account. This value will be displayed in the 'Contact Information' section of the entity. |
| city | The city of the address that is being updated in your AMS+ account. This value will be displayed in the 'Contact Information' section of the entity. |
| stateAbbrev | The state abbreviation of the address that is being updated in your AMS+ account. This value will be displayed in the 'Contact Information' section of the entity. |
| zip | The zip code of the address that is being updated in your AMS+ account. This value will be displayed in the 'Contact Information' section of the entity. |
RESPONSE
A return response will be generated after you have consumed the API. Upon successfully creating a new address inside your AMS+ account, you will get a return status of 200 along with the addressID as seen below.
{
"Agencybloc Response": {
"Status":"200",
"addressID":"123456",
"Action":"update"
}
}
Delete
RESOURCE URI
https://app.agencybloc.com/api/v1/addresses/delete
REQUIRED POST PARAMETERS
You must POST the following parameter via the body of the request. Parameters found in the querystring of the request will be ignored:
| Parameter | Description |
|---|---|
| addressID | The ID of the address being deleted. |
RESPONSE
A return response will be generated after you have consumed the API. Upon successfully creating a new address inside your AMS+ account, you will get a return status of 200 along with the addressID as seen below.
{
"Agencybloc Response": {
"Status":"200",
"addressID":"123456",
"Action":"delete"
}
}
Exception Responses
The exception responses will include status, title, and message and be in JSON format.
{
"Agencybloc Response": {
"Exception": {
"Status":"Status Code",
"Title":"Title of Error",
"Message":"Error Message"
}
}
}