FatSecret Platform API Documentation

Profile - Exercise Diary: Edit Entries For Date

OAuth 1.0 Latest
Description

Records a change to a user's exercise diary entry for a nominated date. All changes to an exercise diary involve either increasing the duration of an existing activity or introducing a new activity for a nominated duration. Because there are always 24 hours worth of exercise entries on any given date, the user must nominate the exercise or activity from which the time was taken to balance out the total duration of activities and exercises for the 24 hour period. As such, each change to the exercise entries on a given day is a "shifting" operation where time is moved from one activity to another. An exercise is removed from the day when all of the time allocated to it is shifted to other exercises.

Parameters
All
NAME TYPE REQUIRED DESCRIPTION
method String Required MUST be "exercise_entry.edit"
shift_to_id Long Required ID of the exercise type to shift to
shift_from_id Long Required ID of the exercise type to shift from
minutes Int Required Duration in minutes
date Int Optional Number of days since January 1, 1970 (default value is the current day)
shift_to_name String Optional Only required if shift_to_id is 0 (exercise type "Other"). This is the name of the new custom exercise type to shift to
shift_from_name String Optional Only required if shift_from_id is 0 (exercise type "Other"). This is the name of the custom exercise type to shift from
kcal Int Optional Only required if shift_to_id is 0 (exercise type "Other"). This is the total number of kcals burned for this exercise
format String Optional The desired response format. Valid response formats are "xml" or "json" (default value is "xml").
Response
There are no storable values returned by this call.

Each success element contains information as follows:

NAME TYPE DESCRIPTION
success Int Whether the call succeeded or not. If successful equals 1

Example Response

Example 1:

<?xml version="1.0" encoding="utf-8"?>
<success 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">1</success>

Example 1:

{
  "success": {
    "value": "1"
  }
}
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>'
101 Parameter Missing required parameter: '<details>'
106 Parameter Invalid ID: '<details>'
107 Parameter Value out of range: '<details>'
201 Application Activity not found: '<details>'
202 Application Shift To and Shift From must be different: '<details>'
203 Application Too many minutes: '<details>'
209 Application Activity cannot be modified: '<details>'