Create product from EAN registry
curl --request POST \
--url https://app.buylo.ai/api/products/create-from-ean-registry \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ean": "8594001524129",
"epc_ids": [
"E2004001020304",
"E2004001020305"
]
}
'import requests
url = "https://app.buylo.ai/api/products/create-from-ean-registry"
payload = {
"ean": "8594001524129",
"epc_ids": ["E2004001020304", "E2004001020305"]
}
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', epc_ids: ['E2004001020304', 'E2004001020305']})
};
fetch('https://app.buylo.ai/api/products/create-from-ean-registry', 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/create-from-ean-registry",
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',
'epc_ids' => [
'E2004001020304',
'E2004001020305'
]
]),
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/create-from-ean-registry"
payload := strings.NewReader("{\n \"ean\": \"8594001524129\",\n \"epc_ids\": [\n \"E2004001020304\",\n \"E2004001020305\"\n ]\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/create-from-ean-registry")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ean\": \"8594001524129\",\n \"epc_ids\": [\n \"E2004001020304\",\n \"E2004001020305\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.buylo.ai/api/products/create-from-ean-registry")
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 \"epc_ids\": [\n \"E2004001020304\",\n \"E2004001020305\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"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"
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Products
Create product from EAN registry
Creates a new product by looking up product information in the EAN registry
and creates a product record in the tenant database. Optionally accepts
epc_ids to attach EPC tags to the newly created product in the same transaction.
POST
/
api
/
products
/
create-from-ean-registry
Create product from EAN registry
curl --request POST \
--url https://app.buylo.ai/api/products/create-from-ean-registry \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ean": "8594001524129",
"epc_ids": [
"E2004001020304",
"E2004001020305"
]
}
'import requests
url = "https://app.buylo.ai/api/products/create-from-ean-registry"
payload = {
"ean": "8594001524129",
"epc_ids": ["E2004001020304", "E2004001020305"]
}
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', epc_ids: ['E2004001020304', 'E2004001020305']})
};
fetch('https://app.buylo.ai/api/products/create-from-ean-registry', 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/create-from-ean-registry",
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',
'epc_ids' => [
'E2004001020304',
'E2004001020305'
]
]),
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/create-from-ean-registry"
payload := strings.NewReader("{\n \"ean\": \"8594001524129\",\n \"epc_ids\": [\n \"E2004001020304\",\n \"E2004001020305\"\n ]\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/create-from-ean-registry")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"ean\": \"8594001524129\",\n \"epc_ids\": [\n \"E2004001020304\",\n \"E2004001020305\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.buylo.ai/api/products/create-from-ean-registry")
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 \"epc_ids\": [\n \"E2004001020304\",\n \"E2004001020305\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"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"
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
Product successfully created from EAN registry
Show child attributes
Show child attributes
⌘I