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.business |
| Optional |
attributes.first_name |
| Optional |
attributes.last_name |
| Optional |
attributes.company |
| Optional |
attributes.line_1 |
| Optional |
attributes.line_2 |
| Optional |
attributes.city |
| Optional |
attributes.zip_code |
| Optional |
attributes.state_code |
| Optional |
attributes.country_code |
| Optional |
attributes.phone |
| Optional |
attributes.email |
| Optional |
attributes.notes |
| Optional |
attributes.lat |
| Optional |
attributes.lng |
| Optional |
attributes.billing_info |
| Optional |
attributes.reference |
| Optional |
attributes.reference_origin |
| Optional |
attributes.metadata |
| Optional |
relationships.geocoder |
| Optional |
relationships.tags |
| Optional |
Example
The following request updates the address identified by the ID "xYZkjABcde":
Last updated