...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
Page Properties |
---|
label | api_docs_clients_addresses |
---|
|
Name | Clients / Addresses / Create |
---|
Description | Create one or more addresses for an existing client |
---|
Type | POST |
---|
URL | /v9/clients/:client_id/addresses |
---|
Credential Type | API |
---|
|
Long Description
Create one or more addresses for an existing client. Note that this takes an array of addresses even if only creating one.
Parameters
| | | | Location | Limitations |
---|
client_id | The ID of the specific Client | Integer | Required | URI |
|
|
label
| Arbitrary description, like 'home' or 'office' | String | Optional | Body | 20 characters max |
name
| Name of the person at this address | String | Optional | Body |
|
|
company
| Company name in the address | String | Optional | Body |
50 characters max |
street_address
| Street address of the new address | String | Optional | Body |
|
|
extended_address
| Second line of the street address | String | Optional | Body |
|
|
locality
| City | String | Optional | Body |
|
|
region
| State or province | String | Optional | Body |
|
|
postal_code
| Zip code | String | Optional | Body |
| | primary
|
|
primary | Indicate that this is the primary address for this client. | Boolean | Optional | Body |
|
is_primary_shipping | Indicate that this is the primary shipping address for this client. | Boolean | Optional | Body |
| ...
|
is_primary_billing | Indicate that this is the primary billing address for this client. | Boolean | Optional | Body |
|
Examples
|
---|
POST /clients/168019/addresses |
|
|
rubyConfluencecollapse"company":"Moe\u2019s Tavern","
"label": "home",
"name": "Ned Flanders",
"company": null,
"street_address": " |
|
555742 Evergreen Terrace",
"extended_address": null,
"locality": "Springfield",
"region": " |
|
MG58008-000097475",
"country_code": "US", |
|
"label":"Work"}]
"is_primary_shipping": true,
"is_primary_billing": true
}
]
} |
|
|
rubycollapse | {
"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": "97475",
"region": |
|
"US",
"OR",
"extended_address": null,
"po_box": false,
" |
|
url"/clients/1625/addresses/46686 "Ned Flanders",
"primary": true,
"updated_at": " |
|
20120106T024426Z46Z",
"url": "/clients/168019/addresses/645263"
}
]
} |
|
Create multiple addresses for the same client in a single request. Code Block |
---|
language | js |
---|
theme | RDark |
---|
linenumbers | true |
---|
| {
"addresses": [
{
" |
|
longitudenull "home",
"name": "Ned Flanders",
"company": null,
"street_address": " |
|
555742 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",
" |
|
labelWorkUS",
"is_primary_shipping": true,
|
|
"id":"46686",
"is_primary_billing": false
}
]
} |
|
Code Block |
---|
language | js |
---|
theme | Confluence |
---|
linenumbers | true |
---|
| {
"current_page": 1,
"per_page": 100,
"total_entries": 2,
"addresses": [
{
" |
|
latitudecountry_code": "US",
"longitude": null,
"street_address": "742 Evergreen Terrace",
"locality": "Springfield",
"label": "home",
"id": 645264,
"latitude": null,
"postal_code": |
|
"58008-0000",
"97475",
"region": "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,
"latitude": null,
" |
|
regionMG97475",
"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"
}
|
|