API Reference
Bundles

Allows adding products to a pre defined bundle

1min
code examples curl location globoff request post 'https //api fictive com/rest/api/bundles/{bundlereference}/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/bundles/{bundlereference}/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/bundles/{bundlereference}/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/bundles/{bundlereference}/products" payload = {} headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("post", url, headers=headers, data=payload) print(response text) responses { "bundlereference" "001pb4pi6ktxcyr8r4", "carts" \[ { "cartreference" "0010k4pi6ktxcyft82", "active" 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" "0010bmgyfrt04" }, "customlineitemparameters" {} } ] } ], "name" "bundle #1", "description" "the first bundle", "tag" "a002", "status" "active" }// bad request \<br />β€’ invalid currency provided // not found \<br /> β€’ bundle not found \<br /> β€’ product reference cannot be found // conflict \<br />β€’ duplicate product reference \<br />β€’ bundle tag already exists \<br />β€’ product(s) currency does not match bundle currency \<br />β€’ no common product currencies found \<br />β€’ a product cannot be assigned to a bundle more than once
πŸ€”
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.

ο»Ώ