GET /addresses
The following macros are not currently supported in the header:
  • style

GET /addresses

Resource URL

Returns an array of addresses.

GET [/:object_type/:object_id/]/addresses

Where object_type describe the object type you wish to get the addresses for. We currently support the following object types:

  1. Company

  2. Contact

Parameters

Table of allowed parameters.

_page

unsigned int

The page of the list to display. For example, 5 will display the fifth page. Each page contains 10 resources.

_limit

unsigned int

The maximum number of resources to return. Default is 10 and maximum is 50.

_offset

unsigned int

The position in the list of resources to return from. For example, if you had 20 resources and requested an offset of 10. Resources 10 to 19 would be returned. Offset cannot be used in conjunction with _page.

_fields

partial string

Allows you to specify optional fields and linked objects to include in the response.

_filters

partial string

Allows you to filter contacts. For more information on available filters, please see the filter action.

Filtering

You can filter the returned list using the _filters parameter.

Name

Example

Description

Name

Example

Description

id(<values>)

id(1,2,4)

 

against_type(<values>)

against_type(company)

e.g company

against_id(<values>)

 against_id(1)

 

physical(<value>)

physical(yes)

e.g, yes, no

postal(<value>)

postal(no)

e.g. no

NEW

<field_name>_greater_than(<value>),

<field_name>_less_than(<value>),

<field_name>_greater_than_or_equal(<value>),

<field_name>_less_than_or_equal(<value>)

 

_filters=id_greater_than(5)

Available fields:

id

against_id

Using the _not suffix (e.g, id_not) on standard in filters will return results not in.

Handling the response

Below is a table of available response fields and objects that are returned within the response object of the returned object. The optional fields and objects can be requested in the _fields parameter; see included examples. Underlined values are default.

id

number

 

full

string

The full address

title

string

 

street1

string

 

street2

string

 

city

string

 

zipcode

string

 

state

unsigned int or object

 

country

unsigned int or object

 

postal

String, yes or no

 

physical

String, yes or no

 

Fields that can be object indicate the field can be requested as a resource. For example.

GET /addresses?_fields=country

would return the country's id. Where as,

GET /addresses?_fields=country()

would return the country's object.

Sample Response

GET /addresses/1.json?_fields=country(),state&_limit=1
{ "response" : { "addresses" => [ { "country" : { "title" : "Australia", "id" : "1" }, "id" : "1", "full" : "141/125 Oxford Street, , Bondi Junction, 2022, NSW, Australia", "state" : "1" } ] }, "meta" : { "status" : "ok", "message" : "Everything executed as expected." } }