curl --request PUT \
--url https://api.exowpee.com/v1/catalog/bundles/{bundle}/components/{component} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/catalog/bundles/{bundle}/components/{component}"
headers = {"Authorization": "Bearer <token>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/catalog/bundles/{bundle}/components/{component}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.exowpee.com/v1/catalog/bundles/{bundle}/components/{component}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.exowpee.com/v1/catalog/bundles/{bundle}/components/{component}"
req, _ := http.NewRequest("PUT", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.exowpee.com/v1/catalog/bundles/{bundle}/components/{component}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/catalog/bundles/{bundle}/components/{component}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"stockable_id": "<string>",
"stockable_unit_id": "<string>",
"quantity": 123,
"variant": {},
"stockable_unit": {}
}{
"message": "<string>",
"errors": {}
}Change a component quantity
Changes how many units of an item go into a bundle.
curl --request PUT \
--url https://api.exowpee.com/v1/catalog/bundles/{bundle}/components/{component} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/catalog/bundles/{bundle}/components/{component}"
headers = {"Authorization": "Bearer <token>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/catalog/bundles/{bundle}/components/{component}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.exowpee.com/v1/catalog/bundles/{bundle}/components/{component}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.exowpee.com/v1/catalog/bundles/{bundle}/components/{component}"
req, _ := http.NewRequest("PUT", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.exowpee.com/v1/catalog/bundles/{bundle}/components/{component}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/catalog/bundles/{bundle}/components/{component}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"stockable_id": "<string>",
"stockable_unit_id": "<string>",
"quantity": 123,
"variant": {},
"stockable_unit": {}
}{
"message": "<string>",
"errors": {}
}bundle_components.update
Conditions
- The bundle must not be archived.
- quantity is required and must be at least 1; only the quantity can change, so a component’s stockable_id and stockable_unit_id are refused.
- A component cannot be changed while the bundle holds stock.
- Changes the quantity of the component in the recipe.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Identifier of the bundle (27-character KSUID string).
Identifier of the bundle component, which must belong to the bundle in the path (27-character KSUID string).
Query Parameters
Response mode. Default none; none answers 204 No Content.
none, resource Comma-separated JSON keys of the root resource (id is always rendered). Available: id, stockable_id, stockable_unit_id, quantity.
Comma-separated include paths, each optionally followed by its fields in parentheses: units(id,sku),units.uomUnit(id,name). Max depth 6, max 40 paths. Available: variant, variant.vat_rate, variant.taxes, variant.image, variant.inventoryItem, variant.levels, variant.units, stockableUnit, stockableUnit.uomUnit, stockableUnit.prices, stockableUnit.stockable.
Response
Resource (only with response=resource).
Identifier of the component (27-character KSUID string).
Identifier of the component's item, a product variant.
Identifier of the unit in which the quantity is expressed.
Quantity of this component in one bundle, in the unit given by stockable_unit_id.
The product variant behind the component; null when the item is not a variant.
The unit of the component, with its unit of measure.