The Meals resource contains detailed data about nutrition consumed by the human separated by date and type: breakfast/lunch/dinner/other/morning_snack/afternoon_snack/after_dinner.

Get a list of meals the user has
GET https://api.humanapi.co/v1/human/food/meals

Returns a single meal
GET https://api.humanapi.co/v1/human/food/meals/{id}

# Returns a json array of meals:
[{
  "id": "5508205f6101270148721599",
  "userId": "52e20cb2fff56aac62000001",
  "source": "jawbone",
  "timestamp": "2015-03-17T00:00:00.000Z",
  "tzOffset": "-07:00",
  "type": "lunch",
  "name": "Apfelstückchen mit Banane",
  "calories": 124,
  "carbohydrate": 26.6000003815,
  "fat": 0.600000023842,
  "protein": 1.60000002384,
  "sodium": 0,
  "sugar": 0,
  "calcium": 0,
  "cholesterol": 0,
  "fiber": 3,
  "iron": 0,
  "monounsaturatedFat": 0,
  "polyunsaturatedFat": 0,
  "potassium": 0,
  "saturatedFat": 0,
  "vitaminA": 0,
  "vitaminC": 0,
  "createdAt": "2015-03-17T12:38:55.712Z",
  "updatedAt": "2015-03-17T12:38:55.712Z",
  "humanId": "5dc2527186aaf9de560e5841f1a44bd6"
}, {
  "id": "54fe0ad40f701cf4630be975",
  "userId": "52e20cb2fff56aac62000001",
  "source": "jawbone",
  "timestamp": "2015-03-04T00:00:00.000Z",
  "tzOffset": "-07:00",
  "type": "lunch",
  "name": "3 Cereais e Leite",
  "calories": 633.999984741,
  "carbohydrate": 75.9680023193,
  "fat": 22.6160001755,
  "protein": 32.4159994125,
  "sodium": 723.199981689,
  "sugar": 40.2880020142,
  "calcium": 896,
  "cholesterol": 54.4000015259,
  "fiber": 3.07999992371,
  "iron": 0,
  "monounsaturatedFat": 0,
  "polyunsaturatedFat": 0,
  "potassium": 0,
  "saturatedFat": 11.1679999828,
  "vitaminA": 0,
  "vitaminC": 0,
  "createdAt": "2015-03-09T21:04:20.973Z",
  "updatedAt": "2015-03-09T21:04:20.973Z",
  "humanId": "5dc2527186aaf9de560e5841f1a44bd6"
}]
# Get all meals associated with the user
curl -H "Authorization: Bearer demo" "https://api.humanapi.co/v1/human/food/meals"

Query Parameters

ParameterDescription
updated_sinceDate in YYYYMMDDTHHmmssZ format

Response Properties

PropertyTypeDescriptionUnits
idStringThe id of the resource.
userIdString[deprecated - use humanId]
humanIdStringUnique user identifier
timestampDateThe original date of the meal
typeStringType of the meal: breakfast/lunch/dinner/other/morning_snack/afternoon_snack/after_dinner
tzOffsetStringThe offset from UTC time in +/-hh:mm (e.g. -04:00)
nameStringDescriptive name of the meal
sourceStringThe source service for the meal data
caloriesNumberThe amount of consumed calorieskcal
carbohydrateNumberThe amount of consumed carbohydrateg
fatNumberThe amount of consumed fatg
proteinNumberThe amount of consumed proteing
sodiumNumberThe amount of consumed sodiummg
sugarNumberThe amount of consumed sugarg
fiberNumberThe amount of consumed fiber (optional)g
saturatedFatNumberThe amount of consumed saturated fat (optional)g
monounsaturatedFatNumberThe amount of consumed monounsaturated fat (optional)g
polyunsaturatedFatNumberThe amount of consumed polyunsaturated fat (optional)g
cholesterolNumberThe amount of consumed cholesterol (optional)mg
vitaminANumberThe amount of consumed vitamin A (optional)mg
vitaminCNumberThe amount of consumed vitamin C (optional)mg
calciumNumberThe amount of consumed calcium (optional)mg
ironNumberThe amount of consumed iron (optional)mg
potassiumNumberThe amount of consumed potassium (optional)mg
amountObjectAmount of a food type (See below) (optional)
updatedAtDateThe time the measurement was updated on the Human API server
createdAtDateThe time the measurement was created on the Human API server

Amount Object

PropertyTypeDescription
valueNumberQuantity
unitStringUnit of measure