Addresses


Addresses are managed through contact records as each address belongs to a contact.

The following fields relate to the Addresses endpoint.

HomeMain OfficeBranch OfficeSecond HomeInvestmentMailing
FieldLimitsRequired?Writeable?
id
NoNo

The id of the address

type
NoYes

The type of address

Possible values:
street_address_1
45 characters
NoYes

The first line of the street address

street_address_2
45 characters
NoYes

The second line of the street address

zip
45 characters
NoYes
city
200 characters
NoYes
state
200 characters
NoYes

The state, spelled out in full

created_at
NoNo

The date and time at which the address was created

modified_at
NoNo

The date and time at which the address was modified

Retrieving Addresses

GET https://api-v2.liondesk.com//contacts/10/addresses headers: { Authorization: "Bearer [access token]", Content-Type: "application/json" }

Addresses are returned along with the contact:

data: [   {
id: "147",
type: "Home",
street_address_1: "820 Schoen Villages",
street_address_2: ,
zip: "64030",
city: "Kansas City",
state: "Kansas",
created_at: "2013-12-26T20:58:45.000Z",
modified_at: "2018-04-13T13:16:05.000Z"
  }, {
id: "148",
type: "Investment",
street_address_1: "1080 West 1st Avenue",
street_address_2: "Kitsilano",
zip: "V6J 4Z3",
city: "Vancouver",
state: "British Columbia",
created_at: "2017-10-10T06:45:37.000Z",
modified_at: "2018-04-17T00:36:22.000Z"
  } ]

This list of addresses represents all of the contact's addresses. If you intend to get a specific address, then include the id of the address as well.

Visibility

Addresses are visible and changeable as long as:

  • You are the owner of the contact
  • You are part of the same team as the owner of the contact
  • You are an assigned user to the contact

Submitting Addresses

Submit the address data to have it saved to the database, attached to the contact who's id you specified:

POST https://api-v2.liondesk.com//contacts/10/addresses headers: { Authorization: "Bearer [access token]", Content-Type: "application/json" }
"data": { "type": "Main Office", "street_address_1": "5045 Herman Knoll", "street_address_2": null, "zip": "39246-5277", "city": "Berniermouth", "state": "West Virginia", }

Updating Addresses

You may update address values by simply including the fields you want to change along with the value to change to:

PATCH https://api-v2.liondesk.com//contacts/10/addresses/149 headers: { Authorization: "Bearer [access token]", Content-Type: "application/json" }
data: { "zip": "V6J 1H9" }

Deleting addresses

To delete an address, simply submit delete request and specify the id of the address to delete. This will return the address information corresponding to the address you deleted.

DELETE https://api-v2.liondesk.com//contacts/10/addresses/149 headers: { Authorization: "Bearer [access token]", Content-Type: "application/json" }
{ "id": 249, "type": "Second Home", "street_address_1": "5404 Courtney Light", "street_address_2": "Apt. 004", "zip": "30002", "city": "West Jevonstad", "state": "Georgia", "created_at": "2015-10-22T09:26:13.000Z", "modified_at": "2018-04-17T00:36:22.000Z" }