Core API
...
Core API Docs
Products

Get Product Variant

code examples curl location globoff 'https //app sparklayer io/api/v1/variants/{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/variants/{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/variants/{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/variants/{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 { "product id" "pp 123", "id" "pv 234", "created at" "", "updated at" "", "external id" "idv001", "sku" "idv001", "barcode" 837493612362, "weight in grams" 0, "tax type" 0, "position" 0, "cart image url" "", "rrp" \[ { "value" 10 49, "currency code" "gbp" } ], "options" \[ { "group" "color", "value" "blue" } ], "status" "live", "settings" \[ { "customer group" "default", "pack size" 0, "reserve stock quantity" 0, "min order quantity" 0, "max order quantity" 0, "min order parent quantity" 0, "max order parent quantity" 0, "display" false, "sell" false } ], "stock management" "none" }// error response