Update an address
How to update an existing address via API
To update an existing address, send a PATCH
request to the /api/addresses/:id
endpoint, where id
is the ID of the resource that you want to update.
Here below the list of all the possible arguments that you can pass with the request body.
Request
PATCH https://yourdomain.commercelayer.io/api/addresses/:id
Arguments
Body Parameter | Type | Required |
---|---|---|
type |
| Required |
id |
| Required |
attributes.billing_info |
| Optional |
attributes.business |
| Optional |
attributes.city |
| Optional |
attributes.company |
| Optional |
attributes.country_code |
| Optional |
attributes.email |
| Optional |
attributes.first_name |
| Optional |
attributes.last_name |
| Optional |
attributes.lat |
| Optional |
attributes.line_1 |
| Optional |
attributes.line_2 |
| Optional |
attributes.lng |
| Optional |
attributes.metadata |
| Optional |
attributes.notes |
| Optional |
attributes.phone |
| Optional |
attributes.reference |
| Optional |
attributes.reference_origin |
| Optional |
attributes.state_code |
| Optional |
attributes.zip_code |
| Optional |
relationships.geocoder |
| Optional |
relationships.tags |
| Optional |
Example
The following request updates the address identified by the ID "xYZkjABcde":
Last updated