Skip to main content
PATCH
Update an address book entry
OAuth2 scopes required: write:address-book. See Scopes for OAuth apps.
Only the fields you send are changed. Send "state_province_code": null to remove the state. No other field accepts null. The complete address, including the fields you did not send, is validated again before it is saved. If a stored field no longer passes validation, for example a missing house number for a Dutch address, include a corrected value for that field in the same request. When you change the country_code without sending a state_province_code, the stored state is removed, because it belongs to the previous country. Fields that are not listed below, including id, are rejected. Remove id before you send back an entry you retrieved.

Authorizations

Authorization
string
header
required

Basic Authentication using API key and secrets is currently the main authentication mechanism.

Scopes

write:address-book

Manage your address book

Path Parameters

id
integer
required

The unique identifier of the address book entry

Example:

1

Body

application/json

The fields of an address book entry. Leading and trailing whitespace is removed from all text fields.

name
string

Name of the person

Required string length: 1 - 75
Example:

"John Doe"

company_name
string

Name of the company

Maximum string length: 50
Example:

"Sendcloud"

email
string

A valid email address, or an empty string for none

Maximum string length: 511
Example:

"johndoe@example.com"

phone_number
string

Phone number

Maximum string length: 20
Example:

"+31612345678"

address_line_1
string

First line of the address, usually the street name

Required string length: 1 - 150
Example:

"Stadhuisplein"

house_number
string

House number. Required in countries that need one, such as the Netherlands. Do not repeat it in address_line_1.

Maximum string length: 20
Example:

"10"

address_line_2
string

Additional address information, such as an apartment number

Maximum string length: 150
Example:

""

postal_code
string

Postal code. It must match the format of the country.

Required string length: 1 - 12
Example:

"5611 EM"

city
string

City

Required string length: 1 - 30
Example:

"Eindhoven"

country_code
string

Country code as ISO 3166-1 alpha-2

Example:

"NL"

state_province_code
string | null

State or province code as ISO 3166-2, for example US-FL. It must belong to the country_code.

Example:

null

Response

The address book entry.

data
object

An entry in your address book. Entries saved from shipments can hold values that the create and update endpoints would reject, such as an empty postal code.