Update an address
PATCH https://{{subdomain}}.commercelayer.io/api/addresses/{{address_id}}
Request Body
{"data"=>{"type"=>"addresses", "id"=>"{{address_id}}", "attributes"=>{"business"=>"{{address_business}}", "city"=>"{{address_city}}", "billing_info"=>"{{address_billing_info}}"}, "relationships"=>{"geocoder"=>{"data"=>{"type"=>"geocoders", "id"=>"{{address_rel_id}}"}}}}}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Authorization | string |
RESPONSES
status: OK
{"data":{"id":"xYZkjABcde","type":"addresses","links":{"self":"https://yourdomain.commercelayer.io/api/addresses/xYZkjABcde"},"attributes":{"business":false,"first_name":"John","last_name":"Smith","company":"The Red Brand Inc.","full_name":"John Smith","line_1":"2883 Geraldine Lane","line_2":"Apt.23","city":"New York","zip_code":"10013","state_code":"NY","country_code":"US","phone":"(212) 646-338-1228","full_address":"2883 Geraldine Lane Apt.23, 10013 New York NY (US) (212) 646-338-1228","name":"John Smith, 2883 Geraldine Lane Apt.23, 10013 New York NY (US) (212) 646-338-1228","email":"john@example.com","notes":"Please ring the bell twice","lat":40.6971494,"lng":-74.2598672,"is_localized":true,"is_geocoded":true,"provider_name":"google","map_url":"https://www.google.com/maps/search/?api=1\u0026query=40.6971494,-74.2598672","static_map_url":"https://maps.googleapis.com/maps/api/staticmap?center=40.6971494,-74.2598672\u0026size=640x320\u0026zoom=15","billing_info":"VAT ID IT02382940977","created_at":"2018-01-01T12:00:00.000Z","updated_at":"2018-01-01T12:00:00.000Z","reference":"ANY-EXTERNAL-REFEFERNCE","reference_origin":"ANY-EXTERNAL-REFEFERNCE-ORIGIN","metadata":{"foo":"bar"}},"relationships":{"geocoder":{"links":{"self":"https://yourdomain.commercelayer.io/api/addresses/xYZkjABcde/relationships/geocoder","related":"https://yourdomain.commercelayer.io/api/addresses/xYZkjABcde/geocoder"}},"events":{"links":{"self":"https://yourdomain.commercelayer.io/api/addresses/xYZkjABcde/relationships/events","related":"https://yourdomain.commercelayer.io/api/addresses/xYZkjABcde/events"}},"tags":{"links":{"self":"https://yourdomain.commercelayer.io/api/addresses/xYZkjABcde/relationships/tags","related":"https://yourdomain.commercelayer.io/api/addresses/xYZkjABcde/tags"}},"versions":{"links":{"self":"https://yourdomain.commercelayer.io/api/addresses/xYZkjABcde/relationships/versions","related":"https://yourdomain.commercelayer.io/api/addresses/xYZkjABcde/versions"}}},"meta":{"mode":"test"}}}