List Customer Addresses
code examples curl request get \\ \ url https //app sparklayer io/api/v1/customers/{id}/addresses \\ \ header 'accept application/json' \\ \ header 'site id jones climbing'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); myheaders append("site id", "jones climbing"); var requestoptions = { method 'get', headers myheaders, redirect 'follow' }; fetch("https //app sparklayer io/api/v1/customers/{id}/addresses", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));require "uri" require "json" require "net/http" url = uri("https //app sparklayer io/api/v1/customers/{id}/addresses") https = net http new(url host, url port) https use ssl = true request = net http get new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" request\["site id"] = "jones climbing" response = https request(request) puts response read body import requests import json url = "https //app sparklayer io/api/v1/customers/{id}/addresses" payload = {} headers = { 'accept' 'application/json', 'content type' 'application/json', 'site id' 'jones climbing' } response = requests request("get", url, headers=headers, data=payload) print(response text) responses // successful response \[ { "id" "ca 123", "uuid" "9151f21f 43ae 43b4 92f3 f4af67cdf544", "title" "mr", "first name" "bob", "last name" "jones", "company" "tom jones climbing ltd", "address line1" "example industrial estate", "address line2" "north country", "city" "cityland", "region name" "california", "region code" "ca", "postal code" "12345", "country code" "usa", "phone" "+44 (0) 123456789", "mobile" "+44 (0) 723456789", "external id" "add1234567", "nickname" "warehouse cityland", "is default billing" false, "is default shipping" false } ]// error response