Address Books [API]

Address books are the customer's available addresses. The customer can choose the available addresses during the checkout process or can also add their own

Description List Addresses
Action GET
URL <your URL here>/api/addressbooks
Sample url parameters
customer_id_eq=4603
		
Sample Successful Response
[{"id":4511,"address":"945 5th Avenue","city":"New York","province":"NY","country":"United States","postal_code":"10021","phone":null,"address_type":"main","customer_id":4603,"created_at":"2016-09-11T16:57:42.000Z","updated_at":"2016-09-11T16:57:42.000Z","last_used_at":null,"title":"945 5th Avenue, New York, NY, United States, 10021"}]
		
Available parameters customer_id_eq (addressbooks per customer)
Description Create Address
Action POST
URL <your URL here>/api/addressbooks
Sample request parameters
{"addressbook":{"customer_id":4603,"address":"2550 NW 2nd Ave","city":"Miami","province":"FL","country":"United States","postal_code":"33127"}}
		
Sample Successful Response
{"id":4512,"address":"2550 NW 2nd Ave","city":"Miami","province":"FL","country":"United States","postal_code":"33127","phone":null,"address_type":"order","customer_id":4603,"created_at":"2016-09-11T18:18:54.843Z","updated_at":"2016-09-11T18:18:54.843Z","last_used_at":null,"title":"2550 NW 2nd Ave, Miami, FL, United States, 33127"}
		
Required fields customer_id
Description Update Address
Action PATCH
URL <your URL here>/api/addressbooks/<addressbook id>
Sample request parameters
{"addressbook":{"customer_id":4603,"address":"2650 NW 2nd Ave","city":"Miami","province":"FL","country":"United States","postal_code":"33127"}}
		
Sample Successful Response Same as create
Required fields customer_id

Field descriptions for Address books

Name Type Description Required
address
string - no
address2 string - no
city string - no
province string - no
country string Two letter ISO code for Country (eg GB, US, CH) no
postal_code string - no
phone string - no
address_type string Internal use - ignore auto calculated
reference_code String Used by external systems for setting their own id no
customer_id integer Customer id of customer yes
created_at datetime Create Time auto calculated
updated_at datetime Update Time auto calculated
last_used_at datetime Last Used Time (when was this address last used at an order) auto calculated

Still need help? Contact Us Contact Us