Food Log

Look up food by UPC/EAN barcode

post/api/food-log/barcode-lookup

Request

  • Base URL
    https://api.rewritelifestyle.ai (the document declares no server; this is the origin it was published from)
  • URL
    https://api.rewritelifestyle.ai/api/food-log/barcode-lookup
  • Auth
    HTTP bearer

Headers

x-timezonestring required

Request body

barcodestring required

UPC or EAN barcode string

Example request

{
  "barcode": "818290014894"
}

Response

unknown required

Example response

{
  "success": true,
  "barcode": "818290014894",
  "options": [
    {
      "id": "12345",
      "name": "Whole Milk Plain Greek Yogurt",
      "brand": "Chobani",
      "description": "1 container (150g)",
      "quantity": 1,
      "calories": 170,
      "protein": 17,
      "fat": 9,
      "carbs": 6,
      "fiber": 0,
      "sodium": 55,
      "sugar": 4
    }
  ],
  "total": 1,
  "aiResponse": "Solid choice. Plain full-fat Greek yogurt is a Rewrite staple."
}

Changes

No recorded changes to this operation across all 34 revisions of this API.