Skip to main content
GET
/
api
/
product
/
user
/
list
List User Inventory
curl --request GET \
  --url https://api.example.com/api/product/user/list
{
  "products": [
    {
      "id": "<string>",
      "name": "<string>",
      "category": "<string>",
      "quantity": 123,
      "expiryDate": "<string>",
      "status": "<string>",
      "notes": "<string>",
      "addedAt": "<string>",
      "updatedAt": "<string>",
      "nutrition": {
        "energy_kcal": "<string>",
        "carbohydrate": "<string>",
        "protein": "<string>",
        "fiber": "<string>",
        "total_sugars": "<string>",
        "saturated_fat": "<string>",
        "vitamin_a": "<string>",
        "vitamin_c": "<string>",
        "potassium": "<string>",
        "iron": "<string>",
        "calcium": "<string>",
        "sodium": "<string>",
        "cholesterol": "<string>"
      }
    }
  ]
}

Overview

This endpoint returns a list of all products in the authenticated user’s inventory, ordered by most recently added first. Each product includes detailed information such as category, expiry date, nutrition data, and status.

Authentication

This endpoint requires authentication. The user’s access token must be included in the request and contains the userId extracted from request.state.user.

Request

No parameters required. The user ID is automatically extracted from the authentication token.

Response

products
array
Array of products in the user’s inventory.

Examples

Get User Inventory

curl -X GET "https://api.expireeye.com/api/product/user/list" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Empty Inventory

curl -X GET "https://api.expireeye.com/api/product/user/list" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response Details

Product Ordering

Products are returned in descending order by addedAt timestamp, meaning the most recently added products appear first in the list.

Unknown Products

If a product in the user’s inventory references a product ID that no longer exists in the main product database, the response will include:
{
  "id": "prod_unknown",
  "name": "Unknown Product",
  "category": "Unknown Category",
  "expiryDate": "2026-03-10T00:00:00.000Z",
  "nutrition": null,
  "addedAt": "2026-03-01T12:00:00.000Z",
  "status": "active",
  "notes": "",
  "updatedAt": "2026-03-01T12:00:00.000Z"
}

Nutrition Data

The nutrition field may be null if:
  • The product doesn’t have associated nutrition information in the database
  • The product is marked as “Unknown Product”

Use Cases

  • Display user’s inventory on dashboard
  • Check expiring products
  • View nutrition information for meal planning
  • Track product quantities for shopping lists

Build docs developers (and LLMs) love