Skip to main content
POST
/
api
/
inventories
/
manual
/
create
Create manual inventory (bulk)
curl --request POST \
  --url https://app.buylo.ai/api/inventories/manual/create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "location_id": "1",
  "epc_ids": [
    "BNOYQ",
    "NDXDU",
    "6XVKJ",
    "FHT1K",
    "8YMQ1"
  ]
}
'
import requests

url = "https://app.buylo.ai/api/inventories/manual/create"

payload = {
"location_id": "1",
"epc_ids": ["BNOYQ", "NDXDU", "6XVKJ", "FHT1K", "8YMQ1"]
}
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({location_id: '1', epc_ids: ['BNOYQ', 'NDXDU', '6XVKJ', 'FHT1K', '8YMQ1']})
};

fetch('https://app.buylo.ai/api/inventories/manual/create', 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/inventories/manual/create",
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([
'location_id' => '1',
'epc_ids' => [
'BNOYQ',
'NDXDU',
'6XVKJ',
'FHT1K',
'8YMQ1'
]
]),
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/inventories/manual/create"

payload := strings.NewReader("{\n \"location_id\": \"1\",\n \"epc_ids\": [\n \"BNOYQ\",\n \"NDXDU\",\n \"6XVKJ\",\n \"FHT1K\",\n \"8YMQ1\"\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/inventories/manual/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"location_id\": \"1\",\n \"epc_ids\": [\n \"BNOYQ\",\n \"NDXDU\",\n \"6XVKJ\",\n \"FHT1K\",\n \"8YMQ1\"\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://app.buylo.ai/api/inventories/manual/create")

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 \"location_id\": \"1\",\n \"epc_ids\": [\n \"BNOYQ\",\n \"NDXDU\",\n \"6XVKJ\",\n \"FHT1K\",\n \"8YMQ1\"\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "success": true,
  "created_count": 5,
  "details": [
    {
      "epc_id": "BNOYQ",
      "status": "created",
      "message": "Inventory item created"
    },
    {
      "epc_id": "NDXDU",
      "status": "created",
      "message": "Inventory item created"
    }
  ]
}
{
"success": true,
"created_count": 5,
"details": [
{
"epc_id": "BNOYQ",
"status": "created",
"message": "Inventory item created"
},
{
"epc_id": "NDXDU",
"status": "created",
"message": "Inventory item created"
}
]
}
{
"error": "<string>",
"message": "<string>"
}
{
"error": "<string>",
"message": "<string>"
}
{
"errors": {}
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
location_id
string
required

Identifier of the location where inventory is created.

Example:

"1"

epc_ids
string[]
required

Array of EPC identifiers to include in the manual inventory.

Minimum array length: 1

Response

OK

success
boolean
created_count
integer

Number of inventory items created

details
object[]