Lots
Part of the Inventory API. Base URL https://your-domain.com/admin/api/v1 — replace the host with your own installation and the token placeholder with a real Bearer token (see Authentication).
List lots
GET/admin/api/v1/inventories/lotsRetrieve a paginated list of lots with filtering and sorting
🔒 Requires a valid Bearer token.
Query parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
include | string | No | Comma-separated list of relationships to include. Available options: product, uom, location, company, creator, quantities | product,location |
filter[id] | string | No | Comma-separated list of IDs to filter by | architecto |
filter[name] | string | No | Filter by lot name | LOT |
filter[product_id] | string | No | Filter by product IDs | architecto |
filter[reference] | string | No | Filter by reference | BATCH |
filter[location_id] | string | No | Filter by location IDs | architecto |
filter[company_id] | string | No | Filter by company IDs | architecto |
sort | string | No | Sort field | -created_at |
bash
curl -X GET "https://your-domain.com/admin/api/v1/inventories/lots?include=product%2Clocation&filter%5Bid%5D=architecto&filter%5Bname%5D=LOT&filter%5Bproduct_id%5D=architecto&filter%5Breference%5D=BATCH&filter%5Blocation_id%5D=architecto&filter%5Bcompany_id%5D=architecto&sort=-created_at" \
-H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"javascript
const response = await fetch("https://your-domain.com/admin/api/v1/inventories/lots?include=product%2Clocation&filter%5Bid%5D=architecto&filter%5Bname%5D=LOT&filter%5Bproduct_id%5D=architecto&filter%5Breference%5D=BATCH&filter%5Blocation_id%5D=architecto&filter%5Bcompany_id%5D=architecto&sort=-created_at", {
method: "GET",
headers: {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Accept": "application/json",
"Content-Type": "application/json",
},
});
const data = await response.json();
console.log(data);php
<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://your-domain.com/admin/api/v1/inventories/lots?include=product%2Clocation&filter%5Bid%5D=architecto&filter%5Bname%5D=LOT&filter%5Bproduct_id%5D=architecto&filter%5Breference%5D=BATCH&filter%5Blocation_id%5D=architecto&filter%5Bcompany_id%5D=architecto&sort=-created_at', [
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
]);
$data = json_decode($response->getBody(), true);python
import requests
url = "https://your-domain.com/admin/api/v1/inventories/lots?include=product%2Clocation&filter%5Bid%5D=architecto&filter%5Bname%5D=LOT&filter%5Bproduct_id%5D=architecto&filter%5Breference%5D=BATCH&filter%5Blocation_id%5D=architecto&filter%5Bcompany_id%5D=architecto&sort=-created_at"
headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Accept": "application/json",
"Content-Type": "application/json",
}
response = requests.get(url, headers=headers)
data = response.json()
print(data)Example response 200
json
{
"data": [
{
"id": 2,
"name": "L02",
"description": "<p>fashion products.</p>",
"reference": null,
"properties": null,
"expiry_reminded": false,
"expiration_date": null,
"use_date": null,
"removal_date": null,
"alert_date": null,
"created_at": "2026-10-12T10:15:49.000000Z",
"updated_at": "2026-10-12T10:15:49.000000Z"
},
{
"id": 2,
"name": "L02",
"description": "<p>fashion products.</p>",
"reference": null,
"properties": null,
"expiry_reminded": false,
"expiration_date": null,
"use_date": null,
"removal_date": null,
"alert_date": null,
"created_at": "2026-10-12T10:15:49.000000Z",
"updated_at": "2026-10-12T10:15:49.000000Z"
}
],
"links": {
"first": "/?page=1",
"last": "/?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"links": [
{
"url": null,
"label": "« Previous",
"page": null,
"active": false
},
{
"url": "/?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Next »",
"page": null,
"active": false
}
],
"path": "/",
"per_page": 10,
"to": 2,
"total": 2
}
}Error response — 401
json
{
"message": "Unauthenticated."
}Create lot
POST/admin/api/v1/inventories/lotsCreate a new lot
🔒 Requires a valid Bearer token.
Body parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Lot/serial number. Must not be greater than 255 characters. |
product_id | integer | Yes | Tracked product ID. Must match an existing stored value. |
reference | string | No | Internal lot reference. Must not be greater than 255 characters. |
description | string | No | Lot description. |
bash
curl -X POST "https://your-domain.com/admin/api/v1/inventories/lots" \
-H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"name": "LOT-2026-001",
"product_id": 1,
"reference": "BATCH-A1",
"description": "Primary production batch."
}'javascript
const response = await fetch("https://your-domain.com/admin/api/v1/inventories/lots", {
method: "POST",
headers: {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Accept": "application/json",
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "LOT-2026-001",
"product_id": 1,
"reference": "BATCH-A1",
"description": "Primary production batch."
}),
});
const data = await response.json();
console.log(data);php
<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', 'https://your-domain.com/admin/api/v1/inventories/lots', [
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'json' => [
'name' => 'LOT-2026-001',
'product_id' => 1,
'reference' => 'BATCH-A1',
'description' => 'Primary production batch.',
],
]);
$data = json_decode($response->getBody(), true);python
import requests
url = "https://your-domain.com/admin/api/v1/inventories/lots"
headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Accept": "application/json",
"Content-Type": "application/json",
}
payload = {
"name": "LOT-2026-001",
"product_id": 1,
"reference": "BATCH-A1",
"description": "Primary production batch.",
}
response = requests.post(url, headers=headers, json=payload)
data = response.json()
print(data)Example response 201
json
{
"data": {
"id": 2,
"name": "L02",
"description": "<p>fashion products.</p>",
"reference": null,
"properties": null,
"expiry_reminded": false,
"expiration_date": null,
"use_date": null,
"removal_date": null,
"alert_date": null,
"created_at": "2026-10-12T10:15:49.000000Z",
"updated_at": "2026-10-12T10:15:49.000000Z"
},
"message": "Lot created successfully."
}Error response — 401
json
{
"message": "Unauthenticated."
}Show lot
GET/admin/api/v1/inventories/lots/{id}Retrieve a specific lot by ID
🔒 Requires a valid Bearer token.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The lot ID |
Query parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
include | string | No | Comma-separated list of relationships to include. Available options: product, uom, location, company, creator, quantities | product,location |
bash
curl -X GET "https://your-domain.com/admin/api/v1/inventories/lots/{id}?include=product%2Clocation" \
-H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"javascript
const response = await fetch("https://your-domain.com/admin/api/v1/inventories/lots/{id}?include=product%2Clocation", {
method: "GET",
headers: {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Accept": "application/json",
"Content-Type": "application/json",
},
});
const data = await response.json();
console.log(data);php
<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://your-domain.com/admin/api/v1/inventories/lots/{id}?include=product%2Clocation', [
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
]);
$data = json_decode($response->getBody(), true);python
import requests
url = "https://your-domain.com/admin/api/v1/inventories/lots/{id}?include=product%2Clocation"
headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Accept": "application/json",
"Content-Type": "application/json",
}
response = requests.get(url, headers=headers)
data = response.json()
print(data)Example response 200
json
{
"data": {
"id": 2,
"name": "L02",
"description": "<p>fashion products.</p>",
"reference": null,
"properties": null,
"expiry_reminded": false,
"expiration_date": null,
"use_date": null,
"removal_date": null,
"alert_date": null,
"created_at": "2026-10-12T10:15:49.000000Z",
"updated_at": "2026-10-12T10:15:49.000000Z"
}
}Error response — 401
json
{
"message": "Unauthenticated."
}Update lot
PUT/admin/api/v1/inventories/lots/{id}Update an existing lot
🔒 Requires a valid Bearer token.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The lot ID |
Body parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | No | Lot/serial number. Must not be greater than 255 characters. |
product_id | integer | No | Tracked product ID. Must match an existing stored value. |
reference | string | No | Internal lot reference. Must not be greater than 255 characters. |
description | string | No | Lot description. |
bash
curl -X PUT "https://your-domain.com/admin/api/v1/inventories/lots/{id}" \
-H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"name": "LOT-2026-001",
"product_id": 1,
"reference": "BATCH-A1",
"description": "Primary production batch."
}'javascript
const response = await fetch("https://your-domain.com/admin/api/v1/inventories/lots/{id}", {
method: "PUT",
headers: {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Accept": "application/json",
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "LOT-2026-001",
"product_id": 1,
"reference": "BATCH-A1",
"description": "Primary production batch."
}),
});
const data = await response.json();
console.log(data);php
<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('PUT', 'https://your-domain.com/admin/api/v1/inventories/lots/{id}', [
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'json' => [
'name' => 'LOT-2026-001',
'product_id' => 1,
'reference' => 'BATCH-A1',
'description' => 'Primary production batch.',
],
]);
$data = json_decode($response->getBody(), true);python
import requests
url = "https://your-domain.com/admin/api/v1/inventories/lots/{id}"
headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Accept": "application/json",
"Content-Type": "application/json",
}
payload = {
"name": "LOT-2026-001",
"product_id": 1,
"reference": "BATCH-A1",
"description": "Primary production batch.",
}
response = requests.put(url, headers=headers, json=payload)
data = response.json()
print(data)Example response 200
json
{
"data": {
"id": 2,
"name": "L02",
"description": "<p>fashion products.</p>",
"reference": null,
"properties": null,
"expiry_reminded": false,
"expiration_date": null,
"use_date": null,
"removal_date": null,
"alert_date": null,
"created_at": "2026-10-12T10:15:49.000000Z",
"updated_at": "2026-10-12T10:15:49.000000Z"
},
"message": "Lot updated successfully."
}Error response — 401
json
{
"message": "Unauthenticated."
}Delete lot
DELETE/admin/api/v1/inventories/lots/{id}Delete a lot
🔒 Requires a valid Bearer token.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The lot ID |
bash
curl -X DELETE "https://your-domain.com/admin/api/v1/inventories/lots/{id}" \
-H "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
-H "Accept: application/json" \
-H "Content-Type: application/json"javascript
const response = await fetch("https://your-domain.com/admin/api/v1/inventories/lots/{id}", {
method: "DELETE",
headers: {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Accept": "application/json",
"Content-Type": "application/json",
},
});
const data = await response.json();
console.log(data);php
<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('DELETE', 'https://your-domain.com/admin/api/v1/inventories/lots/{id}', [
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
]);
$data = json_decode($response->getBody(), true);python
import requests
url = "https://your-domain.com/admin/api/v1/inventories/lots/{id}"
headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Accept": "application/json",
"Content-Type": "application/json",
}
response = requests.delete(url, headers=headers)
data = response.json()
print(data)Example response 200
json
{
"message": "Lot deleted successfully."
}Error response — 401
json
{
"message": "Unauthenticated."
}