Skip to end of metadata
Go to start of metadata


Get a list of meals user created in his food log in the format requested. User creates and manages his meals on the Food Log tab on the website. Meals in the list provide a quick way to log several foods at a time via the calls to Log Food endpoint.

Access Type: Read

Rate Limited: Yes


Access Levels

There are three types of foods included in the meals that authorized user can see while working with the API, each food is annotated with accessLevel with one of the three following values:

  • PUBLIC – those foods that we have in our public food database, they are visible to any of the Fitbit users. We are only populating this database ourselves to avoid spam and duplicated entries.
  • PRIVATE – foods created by the authorized user both on the website and via the call to the new Create Food endpoint.
  • SHARED – is a PRIVATE foods of some user, when viewed on behalf of other authorized user. The user can add a log entry for such food (via the API or on the website). To dicover such foods and log them one could use Get Foods endpoint to fetch food log entries of any other user, who granted permission for Foods to Friends or Anyone.

Resource URL

GET /<api-version>/user/-/meals.<response-format>

api-version

The API version. Currently 1.

response-format

The response format. Currently supported response formats are json and xml for responses in JSON and XML, respectively.

Examples

Authentication

Via token credentials. All authentication header parameters are required.

Request Headers

Accept-LocaleoptionalThe locale to use for response values. Locale is used to determine locale of the food units in the response.

Response

API Response in format requested: JSON or XML.

Response Body Format

Note: Text within <> is a descriptive place holder for a value or repeated elements.

JSON Response

 

Note: Text within [] is a descriptive place holder for a value or repeated elements.

XML Response

1. Note that "units" field contains references to respective Food Units.
2. "accessLevel" could be PUBLIC, PRIVATE or SHARED.
3. "mealTypeId" will always be "7" (Anytime), we don't associate meals with particular slots.

 

Examples

JSON Response
XML Response

 

  • No labels