Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
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.

_pageunsigned intThe page of the list to display. For example, 5 will display the fifth page. Each page contains 10 resources.
_limitunsigned intThe maximum number of resources to return. Default is 10 and maximum is 50.
_offsetunsigned intThe 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.
_fieldspartial stringAllows you to specify optional fields and linked objects to include in the response.
_filterspartial stringAllows 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.

NameExampleDescription
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
Info

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.

idnumber 
fullstringThe full address
titlestring 
street1string 
street2string 
citystring 
zipcodestring 
stateunsigned int or object 
countryunsigned int or object 
postalString, yes or no 
physicalString, yes or no 

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

...

Code Block
languagejavascript
{
   "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."
   }
}