Purchasing API
...
Purchasing API Docs
Purchasing
Get Purchase
code examples curl location '/api/v1/purchases' \\ \ 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("/api/v1/purchases", 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("/api/v1/purchases") http = net http new(url host, url port); request = net http get new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" response = http request(request) puts response read body import requests import json url = "/api/v1/purchases" payload = {} headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("get", url, headers=headers, data=payload) print(response text) responses \[ { "type" "order", "purchase identifiers" { "sparklayer" "63428136 658f 48a6 beb7 7f333dfd9686", "platform" "123456789", "internal" "", "visible" "b2b01123" }, "customer identifiers" { "sparklayer" "cu 123", "sparklayer impersonator" "cu 123", "sparklayer child" "cu 123" }, "payment method" "", "dates" { "created at" "2020 01 01t00 00 00+02 00", "updated at" "2020 01 01t00 00 00+02 00", "placed at" "2020 01 01t00 00 00+02 00", "calculated submitted at" "2020 01 01t00 00 00+02 00" }, "customer reference" "po number", "currency code" "gbp", "calculated shipping address" "john spark, sparklayer, sparklayer hq, example city, 12345", "calculated total" {}, "calculated total usd" {}, "calculated fulfilment status" "processing" } ]// error response