Core API
...
Core API Docs
Customers
Create a Customer Address
code examples curl location globoff 'https //app sparklayer io/api/v1/customers/{id}/addresses' \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ data '{ "address line1" "", "city" "", "country code" "" }'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); var raw = json stringify({ "address line1" "", "city" "", "country code" "" }); var requestoptions = { method 'post', headers myheaders, body raw, 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 post new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" request body = json dump({ "address line1" "", "city" "", "country code" "" }) response = https request(request) puts response read body import requests import json url = "https //app sparklayer io/api/v1/customers/{id}/addresses" payload = json dumps({ "address line1" "", "city" "", "country code" "" }) headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("post", url, headers=headers, data=payload) print(response text) responses // successful response { "id" "ca 123", "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" }// error response