curl --request POST \
--url https://api.exowpee.com/v1/catalog/bundles \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/catalog/bundles"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/catalog/bundles', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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"
req, _ := http.NewRequest("POST", 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.post("https://api.exowpee.com/v1/catalog/bundles")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/catalog/bundles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"stockable_id": "<string>",
"title": "<string>",
"handle": "<string>",
"description": "<string>",
"status": "<string>",
"image_url": "<string>",
"sku": "<string>",
"is_taxable": true,
"units": "<array>",
"prices": "<array>",
"inventory_item": {},
"components_count": 123,
"components": "<array>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"vat_rate_id": "<string>",
"tax_configuration_mode": "<string>",
"vat_rate": {},
"taxes": "<array>",
"category_id": "<string>"
}{
"message": "<string>",
"errors": {}
}Create a bundle
Creates a bundle of items with its prices, as a draft by default.
curl --request POST \
--url https://api.exowpee.com/v1/catalog/bundles \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/catalog/bundles"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/catalog/bundles', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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"
req, _ := http.NewRequest("POST", 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.post("https://api.exowpee.com/v1/catalog/bundles")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/catalog/bundles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"stockable_id": "<string>",
"title": "<string>",
"handle": "<string>",
"description": "<string>",
"status": "<string>",
"image_url": "<string>",
"sku": "<string>",
"is_taxable": true,
"units": "<array>",
"prices": "<array>",
"inventory_item": {},
"components_count": 123,
"components": "<array>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"vat_rate_id": "<string>",
"tax_configuration_mode": "<string>",
"vat_rate": {},
"taxes": "<array>",
"category_id": "<string>"
}{
"message": "<string>",
"errors": {}
}bundles.create
Conditions
- title, prices (at least one) and components (at least two) are required.
- Each component must be an active product-variant item of the organization, listed once, with an active unit that belongs to that item and a quantity of at least 1.
- The handle must be unique within the company, counting every bundle of the company. When omitted it is generated from the title.
- sku and barcode, when sent, must be unique among all units of sale of the organization.
- Each price needs a name (stored trimmed and lowercase) and an amount in major units with at most the currency’s decimals; price names must be distinct within the bundle and so must price amounts.
- category_id, when sent, must be a category of the organization.
- is_tracked, when sent, must be true: a bundle is always tracked in stock.
- Sending tax fields (tax_configuration_mode, is_taxable, vat_rate_id) also needs the tax-assignment update permission on bundles, and the VAT rate must be valid for the company’s tax profile. tax_ids is not accepted here and is ignored.
- image, when sent, must be an image of at most 2048 KB.
- Creates the bundle, its item (status draft unless status is sent, purpose goods, tracked), its single unit in the built-in bundle unit of measure, its prices and its components.
- Stores the uploaded image in public file storage; the file is deleted again when the creation fails.
- Writes the tax configuration of the bundle when tax fields are sent.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
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: vat_rate_id, tax_configuration_mode, category_id, id, stockable_id, title, handle, description, status, image_url, sku, is_taxable, components_count, created_at, updated_at.
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: vat_rate, taxes, units, units.uomUnit, units.prices, units.stockable, prices, inventoryItem, inventoryItem.stockable, inventoryItem.inventoryLevels, components, components.variant, components.stockableUnit.
Response
Resource (only with response=resource).
Identifier of the bundle (27-character KSUID string).
Identifier of the bundle's item, the stock and price record behind it.
Name of the bundle.
Unique short name of the bundle within the company, used like a slug.
Free-text description; null when none.
Sale status of the bundle, read from its item: draft (not on sale), active (on sale) or archived (withdrawn and not editable).
Public URL of the bundle's image; null when it has none.
Stock-keeping code of the bundle's unit; null when none was set. Present only when the bundle's units are loaded.
Whether tax applies to the bundle, from its tax configuration; null when it inherits the category setting. Present only when the item is loaded.
The bundle's units of sale (a bundle has a single one, in the built-in bundle unit of measure). Included only when requested.
Prices of the bundle for the current company. Included only when requested.
Stock record of the bundle, null until a first assembly. Included only when requested.
Number of components in the bundle's recipe. Present when counted.
The recipe of the bundle. Included only when requested.
Date and time the record was created (ISO 8601, UTC).
Date and time the record was last changed (ISO 8601, UTC).
Identifier of the VAT rate set on the bundle; null when it uses the category's or the default rate.
inherit: the bundle follows its category's tax setting. custom: the bundle has its own taxable flag, VAT rate and taxes.
The VAT rate set on the bundle. Included only when requested.
Additional taxes assigned to the bundle. Included only when requested.
Identifier of the bundle's category; null when none.