Versions Compared

Key

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

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...


Page Properties
labelapi_docs_clients_addresses


NameClients / Addresses / Create
DescriptionCreate one or more addresses for an existing client
TypePOST
URL
/v9/clients/:client_id/addresses
Credential TypeAPI


...

Name
Description
Type
Presence
LocationLimitations
client_idThe ID of the specific ClientIntegerRequiredURI
label
Arbitrary description, like 'home' or 'office'StringOptionalBody20 characters max
name
Name of the person at this addressStringOptionalBody
company
Company name in the addressStringOptionalBody50 characters max
street_address
Street address of the new addressStringOptionalBody
extended_address
Second line of the street addressStringOptionalBody
locality
CityStringOptionalBody
region
State or provinceStringOptionalBody
postal_code
Zip codeStringOptionalBody
country_code
2 digit ISO 3166-1 alpha-2 Country CodeStringOptionalBody
primaryIndicate that this is the primary address for this client.BooleanOptionalBody
is_primary_shippingIndicate that this is the primary shipping address for this client.BooleanOptionalBody
is_primary_billingIndicate that this is the primary billing address for this client.BooleanOptionalBody


Examples

RequestResponse
POST /clients/168019/addresses

Create a single address.

Code Block
languagerubyjs
themeConfluenceRDark
collapselinenumberstrue
{
  "addresses": [
    {"company":"Moe\u2019s Tavern",
      "label": "home",
      "name": "Ned Flanders",
      "company": null,
      "street_address": "555742 Evergreen Terrace",
      "extended_address": null,
      "locality": "Springfield",
      "region": "MGOR",
      "postal_code": "58008-000097475",
      "country_code": "US","label":"Work"}]
      "is_primary_shipping": true,
      "is_primary_billing": true
    }
  ]
}



Code Block
languagerubyjs
themeConfluence
collapselinenumberstrue
{
  "current_page": 1,
  "per_page": 100,
  "total_entries": 1,
  "addresses": [
    {
      "country_code":  {
  "US",
      "longitude": null,
      "street_address": "742 Evergreen Terrace",
      "locality": "Springfield",
      "label": "home",
      "id": 645263,
      "latitude": null,
      "countrypostal_code":"US", "97475",
      "region": "OR",
      "extended_address": null,
      "po_box": false,
      "urlname":"/clients/1625/addresses/46686 "Ned Flanders",
      "primary": true,
      "updated_at": "20122017-0112-06T0215T00:4403:26Z46Z",
      "url": "/clients/168019/addresses/645263"
    }
  ]
}


Create multiple addresses for the same client in a single request.

Code Block
languagejs
themeRDark
linenumberstrue
{
  
"longitude":null,
"addresses": [
    {
      "label": "home",
      "name": "Ned Flanders",
      "company": null,
      "street_address": "
555
742 Evergreen Terrace",
      "extended_address": null,
      "locality": "Springfield",
      "region": "OR",
      "postal_code": "97475",
      "country_code": "US",
      "is_primary_shipping": false,
      "is_primary_billing": true
    },
    {
      "label": "work",
      "name
":null,
": "Ned Flanders",
      "company": "The Leftorium",
      "street_address": "7721 Springfield Mall Drive",
      "extended_address": "Suite 202",
      "locality": "Springfield",
      "region": "OR",
      "postal_code": "97475",
  
"label":"Work",
    "country_code": "US",
      "is_primary_shipping": true,
      "is_primary_billing": false
    }
  ]
"id":"46686",
}



Code Block
languagejs
themeConfluence
linenumberstrue
{
  "current_page": 1,
  "per_page": 100,
  "total_entries": 2,
  "addresses": [
    {
      
"latitude":null,
"country_code": "US",
      "longitude": null,
      "street_address": "742 Evergreen Terrace",
      "locality": "Springfield",
      "label": "home",
      "id": 645264,
      "latitude": null,
      "postal_code": "97475",
      "region":
"58008-0000
 "OR",
      "extended_address": null,
      "po_box": false,
      "name": "Ned Flanders",
      "primary": false,
      "updated_at": "2017-12-15T00:04:58Z",
      "url": "/clients/168019/addresses/645264"
    },
    {
      "country_code": "US",
      "longitude": null,
      "street_address": "7721 Springfield Mall Drive",
      "locality": "Springfield",
      "label": "work",
      "id": 645265,
 
"region":"MG",
     "latitude": null,
      "postal_code": "97475",
      "region": "OR",
      "extended_address":
null
 "Suite 202",
      "po_box": false,
      "name": "Ned Flanders",
      "primary": true,
      "updated_at": "2017-12-15T00:04:58Z",
      "url": "/clients/168019/addresses/645265"
    }
  
]
}