Bulk-pack multiple identical units under a single group
curl --request POST \
--url https://app.buylo.ai/api/products/bulk-pack \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ean": "8594001524129",
"quantity": 5,
"epc_ids": [
"E2004001020304",
"E2004001020305"
],
"location_id": 1
}
'import requests
url = "https://app.buylo.ai/api/products/bulk-pack"
payload = {
"ean": "8594001524129",
"quantity": 5,
"epc_ids": ["E2004001020304", "E2004001020305"],
"location_id": 1
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
ean: '8594001524129',
quantity: 5,
epc_ids: ['E2004001020304', 'E2004001020305'],
location_id: 1
})
};
fetch('https://app.buylo.ai/api/products/bulk-pack', 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://app.buylo.ai/api/products/bulk-pack",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ean' => '8594001524129',
'quantity' => 5,
'epc_ids' => [
'E2004001020304',
'E2004001020305'
],
'location_id' => 1
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.buylo.ai/api/products/bulk-pack"
payload := strings.NewReader("{\n \"ean\": \"8594001524129\",\n \"quantity\": 5,\n \"epc_ids\": [\n \"E2004001020304\",\n \"E2004001020305\"\n ],\n \"location_id\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.buylo.ai/api/products/bulk-pack")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ean\": \"8594001524129\",\n \"quantity\": 5,\n \"epc_ids\": [\n \"E2004001020304\",\n \"E2004001020305\"\n ],\n \"location_id\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.buylo.ai/api/products/bulk-pack")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ean\": \"8594001524129\",\n \"quantity\": 5,\n \"epc_ids\": [\n \"E2004001020304\",\n \"E2004001020305\"\n ],\n \"location_id\": 1\n}"
response = http.request(request)
puts response.read_body{
"group": {
"id": 123,
"product_id": "ABC123",
"name": "Brazil Santos Coffee",
"category": "Coffee",
"description": "Roasted Arabica coffee beans from Brazil",
"ean": "8594001524129",
"ean_registry_id": 42,
"brand": "CoffeeCo",
"sale_price": 199.99,
"sale_price_currency": {},
"vat_rate": 21,
"unit": "kg",
"product_data": {},
"epc_hashes": [],
"warehouse_nodes": [],
"created_at": "2025-08-06T12:00:00Z",
"updated_at": "2025-08-06T12:30:00Z"
},
"children": [
{
"id": 123,
"product_id": "ABC123",
"name": "Brazil Santos Coffee",
"category": "Coffee",
"description": "Roasted Arabica coffee beans from Brazil",
"ean": "8594001524129",
"ean_registry_id": 42,
"brand": "CoffeeCo",
"sale_price": 199.99,
"sale_price_currency": {},
"vat_rate": 21,
"unit": "kg",
"product_data": {},
"epc_hashes": [],
"warehouse_nodes": [],
"created_at": "2025-08-06T12:00:00Z",
"updated_at": "2025-08-06T12:30:00Z"
}
],
"epc_hashes": [
"<string>"
]
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"errors": {}
}Products
Bulk-pack multiple identical units under a single group
Look up a product by EAN in the central registry and create a hierarchy:
one group product plus quantity child products. The group’s translated
name is "Skupina <ean-name> (<quantity>)". Each child has parent_product_id
set to the group’s product_id. The provided EPC IDs are attached to the
group product (not to the children).
Fails with 404 if the EAN is not present in the registry, and 409 if any of the provided EPC IDs already exist in this tenant.
POST
/
api
/
products
/
bulk-pack
Bulk-pack multiple identical units under a single group
curl --request POST \
--url https://app.buylo.ai/api/products/bulk-pack \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ean": "8594001524129",
"quantity": 5,
"epc_ids": [
"E2004001020304",
"E2004001020305"
],
"location_id": 1
}
'import requests
url = "https://app.buylo.ai/api/products/bulk-pack"
payload = {
"ean": "8594001524129",
"quantity": 5,
"epc_ids": ["E2004001020304", "E2004001020305"],
"location_id": 1
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
ean: '8594001524129',
quantity: 5,
epc_ids: ['E2004001020304', 'E2004001020305'],
location_id: 1
})
};
fetch('https://app.buylo.ai/api/products/bulk-pack', 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://app.buylo.ai/api/products/bulk-pack",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ean' => '8594001524129',
'quantity' => 5,
'epc_ids' => [
'E2004001020304',
'E2004001020305'
],
'location_id' => 1
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.buylo.ai/api/products/bulk-pack"
payload := strings.NewReader("{\n \"ean\": \"8594001524129\",\n \"quantity\": 5,\n \"epc_ids\": [\n \"E2004001020304\",\n \"E2004001020305\"\n ],\n \"location_id\": 1\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.buylo.ai/api/products/bulk-pack")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ean\": \"8594001524129\",\n \"quantity\": 5,\n \"epc_ids\": [\n \"E2004001020304\",\n \"E2004001020305\"\n ],\n \"location_id\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.buylo.ai/api/products/bulk-pack")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"ean\": \"8594001524129\",\n \"quantity\": 5,\n \"epc_ids\": [\n \"E2004001020304\",\n \"E2004001020305\"\n ],\n \"location_id\": 1\n}"
response = http.request(request)
puts response.read_body{
"group": {
"id": 123,
"product_id": "ABC123",
"name": "Brazil Santos Coffee",
"category": "Coffee",
"description": "Roasted Arabica coffee beans from Brazil",
"ean": "8594001524129",
"ean_registry_id": 42,
"brand": "CoffeeCo",
"sale_price": 199.99,
"sale_price_currency": {},
"vat_rate": 21,
"unit": "kg",
"product_data": {},
"epc_hashes": [],
"warehouse_nodes": [],
"created_at": "2025-08-06T12:00:00Z",
"updated_at": "2025-08-06T12:30:00Z"
},
"children": [
{
"id": 123,
"product_id": "ABC123",
"name": "Brazil Santos Coffee",
"category": "Coffee",
"description": "Roasted Arabica coffee beans from Brazil",
"ean": "8594001524129",
"ean_registry_id": 42,
"brand": "CoffeeCo",
"sale_price": 199.99,
"sale_price_currency": {},
"vat_rate": 21,
"unit": "kg",
"product_data": {},
"epc_hashes": [],
"warehouse_nodes": [],
"created_at": "2025-08-06T12:00:00Z",
"updated_at": "2025-08-06T12:30:00Z"
}
],
"epc_hashes": [
"<string>"
]
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"errors": {}
}Authorizations
Body
application/json