Sending GET request to this url, returns collection of ADDRESSES resources.

You can narrow down list of resources by passing proper query parameters (list of which you can find below in request params section). You can basically search by:

  • name
  • firstName
  • lastName
  • address1
  • address2
  • city
  • zip
  • province
  • provinceCode
  • phone
  • company
  • createdOn

`name` fields can be a pattern and we will try to match this phrase.

You can specify which page of results you want and how many results per page should be there. You can also specify sort-order using one or more of allowed fields (listed below in request params section).

Last but not least you can even specify which fields from resource you want to get. If you pass param `fields` with list of fields (separated by comma [,]) we will return list of resources with only those fields (we will always add resource id to ensure that you can use that data later on)

Returns status code

200

Request url

/addresses?query[name]=foo&query[createdOn][from]=2010-10-13&query[createdOn][to]=2020-03-15

Request params

Field nameField typeField description
queryhashUsed to search only resources that meets criteria. You can specify multiple parameters, then it uses AND logic.
KeyPossible values if fixed
name*
firstName*
lastName*
address1*
address2*
city*
zip*
province*
provinceCode*
phone*
company*
createdOncreatedOn[from]={Y-m-d}&createdOn[to]={Y-m-d} - It can be also UTC format
fieldsstringList of fields that should be returned. Id is always returned. Fields should be separated by comma
sorthashEnable sorting using specified field (set as a key) and order (set as a value). You can specify multiple fields to sort by.
KeyPossible values if fixed
createdOnasc,desc
perPageintNumber results on page
pageintPage number

Example Response

[
    {
        "addressId": "Vt",
        "countryCode": "POL",
        "countryName": "Poland",
        "name": "name-58da43f8c6b07",
        "firstName": "firstName-58da43f8c6b19",
        "lastName": "lastName-58da43f8c6b23",
        "address1": "address1-58da43f8c6b2b",
        "address2": "address2-58da43f8c6b34",
        "city": "city-58da43f8c6b3c",
        "zip": "zip-58da43f8c6b44",
        "province": "province-58da43f8c6b4c",
        "provinceCode": "provinceCode-58da43f8c6b55",
        "phone": "0048111111111",
        "company": "company-58da43f8c6b5d",
        "href": "https://api.getresponse.com/v3/addresses/Vt",
        "createdOn": "2017-03-28T11:07:36+0000",
        "updatedOn": "2017-03-28T11:07:36+0000"
    },
    {
        "addressId": "nQ",
        "countryCode": "POL",
        "countryName": "Poland",
        "name": "name-58da43fc02ccc",
        "firstName": "firstName-58da43fc02cd4",
        "lastName": "lastName-58da43fc02cdc",
        "address1": "address1-58da43fc02ce4",
        "address2": "address2-58da43fc02cec",
        "city": "city-58da43fc02cfc",
        "zip": "zip-58da43fc02d12",
        "province": "province-58da43fc02d25",
        "provinceCode": "provinceCode-58da43fc02d35",
        "phone": "0048111111111",
        "company": "company-58da43fc02d3f",
        "href": "https://api.getresponse.com/v3/addresses/nQ",
        "createdOn": "2017-03-28T11:07:37+0000",
        "updatedOn": "2017-03-28T11:07:38+0000"
    }
]

Possible Errors


Method returns address according to given addressId

Returns status code

200

Request url

/address/Vt?fields=name

Request params

Field nameField typeField description
fieldsstringList of fields that should be returned. Id is always returned. Fields should be separated by comma

Example Response

{
    "addressId": "Vt",
    "countryCode": "POL",
    "countryName": "Poland",
    "name": "name-58da43f8c6b07",
    "firstName": "firstName-58da43f8c6b19",
    "lastName": "lastName-58da43f8c6b23",
    "address1": "address1-58da43f8c6b2b",
    "address2": "address2-58da43f8c6b34",
    "city": "city-58da43f8c6b3c",
    "zip": "zip-58da43f8c6b44",
    "province": "province-58da43f8c6b4c",
    "provinceCode": "provinceCode-58da43f8c6b55",
    "phone": "0048111111111",
    "company": "company-58da43f8c6b5d",
    "href": "https://api.getresponse.com/v3/addresses/Vt",
    "createdOn": "2017-03-28T11:07:36+0000",
    "updatedOn": "2017-03-28T11:07:36+0000"
}

Possible Errors


Create a new address resource

Returns status code

201

Example Request Body

{
    "countryCode": "POL",
    "name": "loremipsum",
    "firstName": "lorem",
    "lastName": "ipsum",
    "address1": "addr1",
    "address2": "addr2",
    "city": "Gdansk",
    "zip": "80-111",
    "province": "pomorskie",
    "provinceCode": "1",
    "phone": "111222333",
    "company": "GetResponse"
}

Body params

Field nameField typeField description
countryCode (required)stringISO-3166-1 alpha-3 country code
name (required)stringAddress name
firstNamestringmax 64 chars
lastNamestringmax 64 chars
address1stringmax 255 chars
address2stringmax 255 chars
citystringmax 128 chars
zipstringmax 64 chars, any format
provincestringmax 255 chars, any format
provinceCodestringmax 64 chars
phonestringmax 255 chars, any format
companystringmax 128 chars

Example Response

{
    "addressId": "yD",
    "countryCode": "POL",
    "countryName": "Poland",
    "name": "loremipsum",
    "firstName": "lorem",
    "lastName": "ipsum",
    "address1": "addr1",
    "address2": "addr2",
    "city": "Gdansk",
    "zip": "80-111",
    "province": "pomorskie",
    "provinceCode": "1",
    "phone": "111222333",
    "company": "GetResponse",
    "href": "https://api.getresponse.com/v3/addresses/yD",
    "createdOn": "2017-03-28T15:12:43+0000",
    "updatedOn": "2017-03-28T15:12:43+0000"
}

Possible Errors


Update existing address. You should send only those fields that need to be changed. The rest of properties will stay the same.

Returns status code

200

Example Request Body

{
    "countryCode": "POL",
    "name": "loremipsum",
    "firstName": "lorem",
    "lastName": "ipsum",
    "address1": "addr1",
    "address2": "addr2",
    "city": "Gdansk",
    "zip": "80-111",
    "province": "pomorskie",
    "provinceCode": "1",
    "phone": "111222333",
    "company": "GetResponse"
}

Body params

Field nameField typeField description
countryCode (required)stringISO-3166-1 alpha-3 country code
name (required)stringAddress name
firstNamestringmax 64 chars
lastNamestringmax 64 chars
address1stringmax 255 chars
address2stringmax 255 chars
citystringmax 128 chars
zipstringmax 64 chars, any format
provincestringmax 255 chars, any format
provinceCodestringmax 64 chars
phonestringmax 255 chars, any format
companystringmax 128 chars

Example Response

{
    "addressId": "yD",
    "countryCode": "POL",
    "countryName": "Poland",
    "name": "loremipsum",
    "firstName": "lorem",
    "lastName": "ipsum",
    "address1": "addr1",
    "address2": "addr2",
    "city": "Gdansk",
    "zip": "80-111",
    "province": "pomorskie",
    "provinceCode": "1",
    "phone": "111222333",
    "company": "GetResponse",
    "href": "https://api.getresponse.com/v3/addresses/yD",
    "createdOn": "2017-03-28T15:12:43+0000",
    "updatedOn": "2017-03-28T15:12:43+0000"
}

Possible Errors


Returns status code

204

Possible Errors