API Reference
Bundles
Retrieve Bundles for the affiliate
1min
code examples curl location 'https //api fictive com/rest/api/bundles' \\ \ 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 //api fictive com/rest/api/bundles", 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/bundles") 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 //api fictive com/rest/api/bundles" payload = {} headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("get", url, headers=headers, data=payload) print(response text) responses \[ { "bundlereference" "001pb4pi6ktevry8r2", "name" "first bundle (with tag)", "description" "the first bundle, featuring a tag", "tag" "a001", "status" "active" }, { "bundlereference" "001pbua2jkv9n8qia3", "name" "second bundle (without tag)", "description" "the second bundle, without a tag", "status" "inactive" }, { "bundlereference" "001pb4pi6ktxcyr8r4", "carts" \[ { "cartreference" "0010k4pi6ktxcyft82", "active" true, "trialinfo" { "trialenabled" true, "trialunit" "day", "trialperiod" 7, "discountpercentage" 100, "nonpaymenttrial" false, "trialchargedassingleperiod" true }, "contractreference" "0010c4pi6ktxcyb8r9", "lineitems" \[ { "lineitemreference" "0010i4pi6ktevry8r2", "description" "the first line item in the cart", "pricing" { "grossamount" 2 5, "netamount" 2 08, "taxamount" 0 42, "currency" "gbp" }, "quantity" 1, "productinfo" { "title" "example product", "productreference" "0010b4pi6ktxcyr8r4" }, "customlineitemparameters" {} } ] } ], "name" "third bundle (with tag & cart & active trial)", "description" "the third bundle, featuring a tag & single cart & trial", "tag" "a002", "status" "active" } ]// there are no bundles configured for the affiliate \[ { "bundlereference" "", "carts" \[ { "cartreference" "", "active" false, "trialinfo" { "trialenabled" false, "trialunit" "", "trialperiod" "", "discountpercentage" "", "nonpaymenttrial" false, "trialchargedassingleperiod" false }, "contractreference" "", "accountreference" "", "lineitems" \[ { "lineitemreference" "", "description" "", "pricing" { "grossamount" "", "netamount" "", "taxamount" "", "currency" "", "pricereference" "" }, "quantity" "", "productinfo" { "title" "", "productreference" "" }, "customlineitemparameters" {} } ] } ], "name" "", "description" "", "tag" "", "status" "" } ]// the is no bundle matching the provided search parameters // precondition failed \<br />β’ the x pagenumber header has not been supplied \<br />β’ the page number must be greater than zero \<br />β’ the x resultsperpage header has not been supplied \<br />β’ the number of items in the page must be greater than zero // internal server error
π€
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.