Interested in joining a scientific study?Learn more

Utility API

Get Decode Foods API

Available

Get Decode Foods resolves an existing decode_food_id into the food_ids and food item names it represents.

GET/functions/v1/get_decode_foods?decode_food_id=decode_food_...

Inputs

  • decode_food_id query parameter

Returns

  • The original decode_food_id
  • food_ids extracted from the identifier
  • Resolved item names where available

Request

GET /functions/v1/get_decode_foods?decode_food_id=decode_food_...

Response JSON

{
  "decode_food_id": "decode_food_...",
  "food_ids": ["food_123", "food_456"],
  "items": [
    { "food_id": "food_123", "name": "Greek yogurt" },
    { "food_id": "food_456", "name": "Blueberries" }
  ]
}
curl 'https://tirqjzahcinadeulfylj.supabase.co/functions/v1/get_decode_foods?decode_food_id=decode_food_...' \
  -H 'x-api-key: $MYMOLECULES_API_KEY'