Skip to main content
GET
/
scanner
/
inventory
/
lookup
Look up product by barcode
curl --request GET \
  --url https://api.switchyard.run/scanner/inventory/lookup \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "barcode": "012345678901",
  "product": {
    "id": "prod_01ABC123",
    "title": "Organic Bananas",
    "handle": "organic-bananas",
    "thumbnail": "https://cdn.example.com/bananas.jpg",
    "description": "<string>"
  },
  "variant": {
    "id": "var_01XYZ789",
    "title": "1 lb",
    "sku": "BAN-ORG-1LB",
    "barcode": "012345678901"
  },
  "inventory": [
    {
      "location_id": "<string>",
      "stocked_quantity": 123,
      "reserved_quantity": 123,
      "available_quantity": 123
    }
  ]
}

Authorizations

Authorization
string
header
required

Supabase JWT token

Query Parameters

barcode
string
required

UPC/EAN barcode or SKU to look up

location_id
string

Filter inventory to a specific stock location

Response

Product found with inventory information

success
boolean
Example:

true

barcode
string
Example:

"012345678901"

product
object
variant
object
inventory
object[]