records

Record a meal with the assistant's estimates per food

The assistant estimates each food (weight, kcal, protein, carbohydrates, fat; fibre, sugar, sodium when known) from what the person said or showed, states its confidence, and sends the result. Keep the person's words in description; name the model in model. The server stores, totals and reports; it never judges the meal.

post/meals

Request

  • Base URL: https://nutri.coghorizon.com/api/v1
  • URL: https://nutri.coghorizon.com/api/v1/meals
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://nutri.coghorizon.com/oauth/authorize, token URL https://nutri.coghorizon.com/oauth/token, scopes: records:write)

Request body

profile_idstring

Profile to record in; the default profile when absent

meal_type'breakfast' | 'lunch' | 'dinner' | 'snack' | 'other' required

Breakfast, lunch, dinner, snack or other

eaten_atstring date-time

When the meal was eaten, ISO 8601 with offset; now when absent

descriptionstring

What the person said or typed about the meal, kept in full

modelstring

Model that produced the estimates, for provenance in the report

confidencenumber

Overall confidence, 0 to 1

notesstring

The person's own note or correction

Response

The stored meal with its items and totals

object required

Changes

No recorded changes to this operation across all 1 revision of this API.