Skip to main content
GET
/
api
/
product
/
barcodes
Get Product Barcodes
curl --request GET \
  --url https://api.example.com/api/product/barcodes
{
  "products": [
    {
      "productName": "<string>",
      "barcode": "<string>"
    }
  ]
}

Endpoint

GET /api/product/barcodes
This endpoint retrieves a simplified list of all products in the database, returning only their names and barcode identifiers. This is useful for barcode lookup operations.

Response

products
array
Array of product objects containing name and barcode information
productName
string
The name of the product
barcode
string
The barcode identifier for the product

Example Request

curl -X GET https://api.expireeye.com/api/product/barcodes

Example Response

{
  "products": [
    {
      "productName": "Organic Milk",
      "barcode": "123456789012"
    },
    {
      "productName": "Whole Wheat Bread",
      "barcode": "987654321098"
    },
    {
      "productName": "Greek Yogurt",
      "barcode": "456789012345"
    },
    {
      "productName": "Apple Juice",
      "barcode": "789012345678"
    }
  ]
}

Use Cases

This endpoint is particularly useful for:
  • Barcode scanning applications that need to validate if a barcode exists in the database
  • Autocomplete features that suggest products based on barcode input
  • Bulk barcode verification operations
  • Creating a local cache of product barcodes for offline functionality

Build docs developers (and LLMs) love