FatSecret Platform API Documentation

Profile - Exercise Diary: Get All For Date

OAuth 1.0 Deprecated
Description

Returns the daily exercise entries for the user on a nominated date.

The API will always return 24 hours worth of exercise entries for a given user on a given date. These entries will either be "template" entries (which a user may override for any given day of the week) or saved exercise entry values.

Once a user saves or updates the entries on any given day, all entries for that day are saved. All adjustments to the day involve reducing the time for an existing activity in order to either add or increase the time taken for another activity. The default entries presented for a user for a given day of the week can be overridden using exercise_entries.save_template.

Parameters
All
NAME TYPE REQUIRED DESCRIPTION
method String Required MUST be "exercise_entries.get"
date Int Optional Number of days since January 1, 1970 (default value is the current day)
format String Optional The desired response format. Valid response formats are "xml" or "json" (default value is "xml").
Response
The only storable value returned by this call is exercise_id.

Each exercise_entry element contains information as follows:

NAME TYPE DESCRIPTION
is_template_value Int Only included if the entry is a template or not. If true equals 1
exercise_id Long Unique exercise identifier
exercise_name String Name of the exercise
minutes Int Duration in minutes
calories Decimal Energy content in kcal

Example Response

Example 1:

<?xml version="1.0" encoding="utf-8"?>
<exercise_entries xmlns="http://platform.fatsecret.com/api/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://platform.fatsecret.com/api/1.0/ http://platform.fatsecret.com/api/1.0/fatsecret.xsd">
  <exercise_entry>
    <is_template_value>0</is_template_value>
    <exercise_id>2</exercise_id>
    <exercise_name>Resting</exercise_name>
    <minutes>960</minutes>
    <calories>1349</calories>
  </exercise_entry>
  <exercise_entry>
    <is_template_value>0</is_template_value>
    <exercise_id>1</exercise_id>
    <exercise_name>Sleeping</exercise_name>
    <minutes>480</minutes>
    <calories>607</calories>
  </exercise_entry>
</exercise_entries>

Example 1:

{
  "exercise_entries": {
    "exercise_entry": [
      {
        "calories": "1349",
        "exercise_id": "2",
        "exercise_name": "Resting",
        "is_template_value": "0",
        "minutes": "960"
      },
      {
        "calories": "607",
        "exercise_id": "1",
        "exercise_name": "Sleeping",
        "is_template_value": "0",
        "minutes": "480"
      }
    ]
  }
}
Error Codes
CODE TYPE DESCRIPTION
2 OAuth 1.0 Missing required oauth parameter: '<details>'
3 OAuth 1.0 Unsupported oauth parameter: '<details>'
4 OAuth 1.0 Invalid signature method: '<details>'
5 OAuth 1.0 Invalid consumer key: '<details>'
6 OAuth 1.0 Invalid/expired timestamp: '<details>'
7 OAuth 1.0 Invalid/used nonce: '<details>'
8 OAuth 1.0 Invalid signature: '<details>'
9 OAuth 1.0 Invalid access token: '<details>'