List the lots of a product
curl --request GET \
--url https://api.cubbo.com/v1/lots \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.cubbo.com/v1/lots"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.cubbo.com/v1/lots', 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://api.cubbo.com/v1/lots",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.cubbo.com/v1/lots"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.cubbo.com/v1/lots")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cubbo.com/v1/lots")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"product": {
"id": 12345,
"store_id": 1234,
"name": "Widget Pro Black",
"skus": [
"SKU-RED-M"
],
"bar_code": "7501234567890",
"has_expiration": true
},
"lots": [
{
"id": 987,
"lot_code": "SKU-RED-M-L2026-04",
"status": "ACTIVE",
"expiration_date": "2026-06-30",
"stock": {
"IN_WAREHOUSE": 15,
"AVAILABLE": 12,
"AVAILABLE_NOT_EXTERNALLY_CONFIRMED": 0,
"AVAILABLE_EXTERNALLY_CONFIRMED": 12,
"RECEPTION-INCOMING-SELL-AHEAD": 0,
"DAMAGED": 0,
"HOLDED": 0,
"EXPIRED": 0,
"RESERVED": 3,
"ACTIVE": 12,
"SHIPPED": 40,
"RESERVED-WITHOUT-SELL-AHEAD": 3
}
}
],
"meta": {
"current_page": 1,
"next_page": null,
"prev_page": null,
"total_pages": 1,
"first_page": true,
"last_page": true,
"per_page": 25,
"total_count": 1
}
}Lots
List the lots of a product
Send sku or bar_code. Both show as optional because you may send either one, but a request
with neither returns 422 either sku or bar_code is required. In the playground, open the optional
fields and fill in one of them.
Returns the lots of exactly one product, with each lot’s status, expiration date and stock
buckets. The product is addressed by sku or bar_code (at least one is required) and is
looked up across the stores your token can access; there is no store_id parameter.
- Lots are ordered by expiration date, soonest first; lots without an expiration date come last. Default page size is 25, maximum 200.
- A product that exists but has no lots returns
lots: []withtotal_count: 0. - If you send both
skuandbar_codethey must identify the same product; otherwise the response is 404. A product in a store your token cannot see is indistinguishable from a missing one (404). - If the identifier matches more than one product (possible when the same SKU exists in two of your stores) the response is 422 naming the product ids.
- Variant parent products are not addressable; query the variant’s own SKU.
GET
/
lots
List the lots of a product
curl --request GET \
--url https://api.cubbo.com/v1/lots \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.cubbo.com/v1/lots"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.cubbo.com/v1/lots', 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://api.cubbo.com/v1/lots",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.cubbo.com/v1/lots"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.cubbo.com/v1/lots")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cubbo.com/v1/lots")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"product": {
"id": 12345,
"store_id": 1234,
"name": "Widget Pro Black",
"skus": [
"SKU-RED-M"
],
"bar_code": "7501234567890",
"has_expiration": true
},
"lots": [
{
"id": 987,
"lot_code": "SKU-RED-M-L2026-04",
"status": "ACTIVE",
"expiration_date": "2026-06-30",
"stock": {
"IN_WAREHOUSE": 15,
"AVAILABLE": 12,
"AVAILABLE_NOT_EXTERNALLY_CONFIRMED": 0,
"AVAILABLE_EXTERNALLY_CONFIRMED": 12,
"RECEPTION-INCOMING-SELL-AHEAD": 0,
"DAMAGED": 0,
"HOLDED": 0,
"EXPIRED": 0,
"RESERVED": 3,
"ACTIVE": 12,
"SHIPPED": 40,
"RESERVED-WITHOUT-SELL-AHEAD": 3
}
}
],
"meta": {
"current_page": 1,
"next_page": null,
"prev_page": null,
"total_pages": 1,
"first_page": true,
"last_page": true,
"per_page": 25,
"total_count": 1
}
}Authorizations
Query Parameters
Response
The product and one page of its lots.