Core API
...
Core API Docs
Customers
Get a Customer
code examples curl location globoff 'https //app sparklayer io/api/v1/customers/{id}' \\ \ header 'accept application/json' \\ \ header 'content type application/json'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); var requestoptions = { method 'get', headers myheaders, redirect 'follow' }; fetch("https //app sparklayer io/api/v1/customers/{id}", 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}") 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" response = https request(request) puts response read body import requests import json url = "https //app sparklayer io/api/v1/customers/{id}" payload = {} headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("get", url, headers=headers, data=payload) print(response text) responses // successful response { "id" "cu 123", "created at" "", "updated at" "", "addresses" \[ { "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" } ], "title" "mr", "first name" "tom", "last name" "jones", "email" "tom jones\@climbing com", "company name" "tom jones climbing ltd", "external id" "xxxx00123", "accounting id" "xxxx00123", "status" "", "group" "base", "role" "limited customer", "default billing address id" "ca 1234", "default shipping address id" "ca 1234", "available shipping addresses" \[ "ca 12345" ], "currency code" "gbp", "sales agent groups" \[ "south west uk" ], "price lists" \[ "b2b gb gbp 123" ], "vatin numbers" \[ "gb999999973" ], "discount percentage" "", "tax exempt" false, "payment by invoice" false, "payment on account" { "credit limit" "", "balance" "", "net terms" "" }, "metadata" {}, "parent customer" { "id" "cu 123", "external id" "xxxx00123" } }// error response