API Reference
Products
/api/products
1min
code examples curl location request post 'https //api fictive com/rest/api/products' \\ \ 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 'post', headers myheaders, redirect 'follow' }; fetch("https //api fictive com/rest/api/products", 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 //api fictive com/rest/api/products") 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" response = https request(request) puts response read body import requests import json url = "https //api fictive com/rest/api/products" payload = {} headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("post", url, headers=headers, data=payload) print(response text) responses \[ { "productreference" "0010bblec8gzaza853", "name" "product a", "description" "product a description", "type" "physical", "status" "active", "productlistreferences" \[ "001plyvmol3wia13s1" ], "createddate" "2021 09 21t05 33 23 760505", "lastupdateddate" "2021 09 21t05 33 23 760505", "productparameters" { "parametername1" "parametervalue1", "parametername2" "parametervalue2", "parametername3" "parametervalue3" }, "pricing" \[ { "role" "default", "amount" 22, "isgross" true, "pricereference" "0010fn2ns2k63hehc0", "taxcategory" "standard", "paymentmethod" "servicecredits", "currency" "gbp" } ], "images" \[ { "imagereference" "001imalaktotn3dgb2", "displayname" "image1", "filelocation" "https //www imagelocation co uk/imagefolder/image1 jpg", "defaultimage" true } ], "credits" \[ { "creditsreference" "001pchchyyg8vn4632", "currency" "gbp", "amount" 10, "expirydate" "2021 10 21t05 33 23 760505" } ], "contractpricing" \[ { "contractreference" "0010gh2ns3k63hehc4", "pricing" \[ { "productcontractpricereference" "0580hh2ns3k63hfgc5", "amount" { "grossamount" 10, "netamount" 8, "taxamount" 2, "currency" "gbp" }, "active" false } ] } ] }, { "productreference" "0010bzurpnz3ljem22", "name" "product b", "description" "product b description", "type" "digital", "status" "active", "productlistreferences" \[ "001plyvmol3wia13s1" ], "createddate" "2021 09 21t05 33 23 760505", "lastupdateddate" "2021 09 21t05 33 23 760505", "productparameters" { "parametername1" "parametervalue1", "parametername2" "parametervalue2", "parametername3" "parametervalue3" }, "pricing" \[ { "role" "default", "amount" 33, "isgross" true, "pricereference" "0010ff2hspdm3lzbp0", "taxcategory" "standard", "paymentmethod" "servicecredits", "currency" "gbp" } ], "images" \[ { "imagereference" "001imx81qiy5vfszi0", "displayname" "image1", "filelocation" "https //www imagelocation co uk/imagefolder/image2 jpg", "defaultimage" true } ], "credits" \[ { "creditsreference" "001pcpfir6gwgf2xd0", "currency" "usd", "amount" 20, "expirydate" "2021 10 21t05 33 23 760505" } ], "contractpricing" \[ { "contractreference" "009psyvmol3wia13r8", "pricing" \[ { "productcontractpricereference" "0010fs2t1f9axorst1", "taxcategory" { "taxcategoryreference" "0010tc2t1f9axoraaa", "taxcategoryname" "standard", "displayname" "standard" }, "amount" { "grossamount" 16, "netamount" 10, "taxamount" 6, "currency" "usd" }, "active" false } ] } ] } ]
π€
Have a question?
Our super-smart AI,knowledgeable support team and an awesome community will get you an answer in a flash.
To ask a question or participate in discussions, you'll need to authenticate first.