Get product by barcode
curl --request GET \
--url http://localhost:3000/v1/products/barcode/{barcode}import requests
url = "http://localhost:3000/v1/products/barcode/{barcode}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://localhost:3000/v1/products/barcode/{barcode}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/v1/products/barcode/{barcode}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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 := "http://localhost:3000/v1/products/barcode/{barcode}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:3000/v1/products/barcode/{barcode}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/v1/products/barcode/{barcode}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"taxonomy_id": "<string>",
"name": "<string>",
"brand": "<string>",
"image_url": "<string>",
"size": "<string>",
"barcode": "<string>",
"sellable_product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"selling_price": 123,
"is_active": true,
"is_rfc_item": true,
"has_inventory_history": true,
"category_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"subcategory_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rfc_location": {
"slot_id": "<string>",
"location_code": "<string>",
"aisle": 123,
"bay": 123,
"shelf": 123,
"slot": 123
},
"on_hand": 123,
"reserved": 123,
"in_sweep": 123,
"inventory_events": [
{
"id": "<string>",
"type": "sweep",
"reference": "<string>",
"quantity": 123,
"date": "<string>"
}
],
"availability": [
{
"id": "<string>",
"source_type": "rfc",
"name": "<string>",
"unit_price": 123,
"is_in_stock": true,
"retailer_name": "<string>",
"updated_at": "<string>",
"stock_quantity": 123,
"location_name": "<string>"
}
]
}{
"error": "<string>",
"message": "<string>",
"details": null
}Products
Get product by barcode
Looks up a product by barcode and returns detailed information including inventory, availability, and history.
GET
/
v1
/
products
/
barcode
/
{barcode}
Get product by barcode
curl --request GET \
--url http://localhost:3000/v1/products/barcode/{barcode}import requests
url = "http://localhost:3000/v1/products/barcode/{barcode}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('http://localhost:3000/v1/products/barcode/{barcode}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/v1/products/barcode/{barcode}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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 := "http://localhost:3000/v1/products/barcode/{barcode}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:3000/v1/products/barcode/{barcode}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/v1/products/barcode/{barcode}")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"taxonomy_id": "<string>",
"name": "<string>",
"brand": "<string>",
"image_url": "<string>",
"size": "<string>",
"barcode": "<string>",
"sellable_product_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"selling_price": 123,
"is_active": true,
"is_rfc_item": true,
"has_inventory_history": true,
"category_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"subcategory_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rfc_location": {
"slot_id": "<string>",
"location_code": "<string>",
"aisle": 123,
"bay": 123,
"shelf": 123,
"slot": 123
},
"on_hand": 123,
"reserved": 123,
"in_sweep": 123,
"inventory_events": [
{
"id": "<string>",
"type": "sweep",
"reference": "<string>",
"quantity": 123,
"date": "<string>"
}
],
"availability": [
{
"id": "<string>",
"source_type": "rfc",
"name": "<string>",
"unit_price": 123,
"is_in_stock": true,
"retailer_name": "<string>",
"updated_at": "<string>",
"stock_quantity": 123,
"location_name": "<string>"
}
]
}{
"error": "<string>",
"message": "<string>",
"details": null
}Path Parameters
Product barcode
Minimum string length:
1Response
Product details
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I