Create inventory
curl --request POST \
--url https://app.buylo.ai/api/inventory \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Monthly stock check",
"type": "WAREHOUSE",
"statuses": [
"in_stock",
"lost"
],
"warehouse_node_id": 44,
"location_id": 21,
"epcs": [
"<string>"
]
}
'import requests
url = "https://app.buylo.ai/api/inventory"
payload = {
"name": "Monthly stock check",
"type": "WAREHOUSE",
"statuses": ["in_stock", "lost"],
"warehouse_node_id": 44,
"location_id": 21,
"epcs": ["<string>"]
}
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({
name: 'Monthly stock check',
type: 'WAREHOUSE',
statuses: ['in_stock', 'lost'],
warehouse_node_id: 44,
location_id: 21,
epcs: ['<string>']
})
};
fetch('https://app.buylo.ai/api/inventory', 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/inventory",
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([
'name' => 'Monthly stock check',
'type' => 'WAREHOUSE',
'statuses' => [
'in_stock',
'lost'
],
'warehouse_node_id' => 44,
'location_id' => 21,
'epcs' => [
'<string>'
]
]),
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/inventory"
payload := strings.NewReader("{\n \"name\": \"Monthly stock check\",\n \"type\": \"WAREHOUSE\",\n \"statuses\": [\n \"in_stock\",\n \"lost\"\n ],\n \"warehouse_node_id\": 44,\n \"location_id\": 21,\n \"epcs\": [\n \"<string>\"\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/inventory")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Monthly stock check\",\n \"type\": \"WAREHOUSE\",\n \"statuses\": [\n \"in_stock\",\n \"lost\"\n ],\n \"warehouse_node_id\": 44,\n \"location_id\": 21,\n \"epcs\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.buylo.ai/api/inventory")
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 \"name\": \"Monthly stock check\",\n \"type\": \"WAREHOUSE\",\n \"statuses\": [\n \"in_stock\",\n \"lost\"\n ],\n \"warehouse_node_id\": 44,\n \"location_id\": 21,\n \"epcs\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 12,
"name": "Monthly stock check",
"type": "WAREHOUSE",
"warehouse_node_id": 44,
"warehouse_node_path": "WH/ZoneA/Rack-03",
"location_id": 21,
"location_name": "Showroom",
"statuses": [
"in_stock",
"lost"
],
"created_at": "2025-10-22T08:12:34Z",
"total_epcs": 57,
"unique_products": 12,
"items": [
{
"id": 17,
"product_id": 501,
"product_name": "ACME Mug",
"ean": "8591234567890",
"count": 3,
"epc_hashes": [
{
"hash": "8aaedfc3559d0ce545ca55bcea31aad2",
"warehouse_location": "WH/ZoneA/Rack-03/Shelf-2"
}
],
"created_at": "2025-10-22T08:12:34Z"
}
]
}
}{
"message": "<string>"
}{
"message": "<string>"
}Inventories
Create inventory
POST
/
api
/
inventory
Create inventory
curl --request POST \
--url https://app.buylo.ai/api/inventory \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Monthly stock check",
"type": "WAREHOUSE",
"statuses": [
"in_stock",
"lost"
],
"warehouse_node_id": 44,
"location_id": 21,
"epcs": [
"<string>"
]
}
'import requests
url = "https://app.buylo.ai/api/inventory"
payload = {
"name": "Monthly stock check",
"type": "WAREHOUSE",
"statuses": ["in_stock", "lost"],
"warehouse_node_id": 44,
"location_id": 21,
"epcs": ["<string>"]
}
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({
name: 'Monthly stock check',
type: 'WAREHOUSE',
statuses: ['in_stock', 'lost'],
warehouse_node_id: 44,
location_id: 21,
epcs: ['<string>']
})
};
fetch('https://app.buylo.ai/api/inventory', 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/inventory",
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([
'name' => 'Monthly stock check',
'type' => 'WAREHOUSE',
'statuses' => [
'in_stock',
'lost'
],
'warehouse_node_id' => 44,
'location_id' => 21,
'epcs' => [
'<string>'
]
]),
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/inventory"
payload := strings.NewReader("{\n \"name\": \"Monthly stock check\",\n \"type\": \"WAREHOUSE\",\n \"statuses\": [\n \"in_stock\",\n \"lost\"\n ],\n \"warehouse_node_id\": 44,\n \"location_id\": 21,\n \"epcs\": [\n \"<string>\"\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/inventory")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Monthly stock check\",\n \"type\": \"WAREHOUSE\",\n \"statuses\": [\n \"in_stock\",\n \"lost\"\n ],\n \"warehouse_node_id\": 44,\n \"location_id\": 21,\n \"epcs\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.buylo.ai/api/inventory")
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 \"name\": \"Monthly stock check\",\n \"type\": \"WAREHOUSE\",\n \"statuses\": [\n \"in_stock\",\n \"lost\"\n ],\n \"warehouse_node_id\": 44,\n \"location_id\": 21,\n \"epcs\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 12,
"name": "Monthly stock check",
"type": "WAREHOUSE",
"warehouse_node_id": 44,
"warehouse_node_path": "WH/ZoneA/Rack-03",
"location_id": 21,
"location_name": "Showroom",
"statuses": [
"in_stock",
"lost"
],
"created_at": "2025-10-22T08:12:34Z",
"total_epcs": 57,
"unique_products": 12,
"items": [
{
"id": 17,
"product_id": 501,
"product_name": "ACME Mug",
"ean": "8591234567890",
"count": 3,
"epc_hashes": [
{
"hash": "8aaedfc3559d0ce545ca55bcea31aad2",
"warehouse_location": "WH/ZoneA/Rack-03/Shelf-2"
}
],
"created_at": "2025-10-22T08:12:34Z"
}
]
}
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Maximum string length:
255Example:
"Monthly stock check"
Must be one of the server enum values
Example:
"WAREHOUSE"
Example:
["in_stock", "lost"]
Required when type=WAREHOUSE
Example:
44
Required when type=LOCATION
Example:
21
Optional list of EPC IDs to include
Response
Created
Show child attributes
Show child attributes
⌘I