exercise_entry.edit

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

Required

Name Type Description
oauth_consumer_key String Your API key when you registered as a developer
oauth_signature_method String The method used to generate the signature (only HMAC-SHA1 is supported)
oauth_timestamp Int The date and time, expressed in the number of seconds since January 1, 1970 00:00:00 GMT. The timestamp value must be a positive integer and must be equal or greater than the timestamp used in previous requests
oauth_nonce String A randomly generated string for a request that can be combined with the timestamp to produce a unique value
oauth_version String MUST be "1.0"
oauth_signature String The signature, a consistent reproducible concatenation of the request elements into a single string. The string is used as an input in hashing or signing algorithms.
method String MUST be "exercise_entry.edit"
oauth_token String The key of the profile to use.
shift_to_id Long The ID of the exercise type to shift to.
shift_from_id Long The ID of the exercise type to shift from.
minutes Int The number of minutes to shift.

Optional

Name Type Description
format String The desired response format. Valid reponse formats are "xml" or "json" (default value is "xml").
date Int The number of days since January 1, 1970 (default value is the current day).
shift_to_name String 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 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 Only required if shift_to_id is 0 (exercise type "Other"). This is the total number of kcals burned for this exercise.

Example Return XML

<?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 Return JSON

{ "success": {"value": "1" }}

Error Code

Code Description
2 Missing required oauth parameter: "<detail>"
3 Unsupported oauth parameter: "<detail>"
4 Invalid signature method: "<detail>"
5 Invalid consumer key: "<detail>"
6 Invalid/expired timestamp: "<detail>"
7 Invalid/used nonce: "<detail>"
8 Invalid signature: "<detail>"
9 Invalid access token: "<detail>"
101 Missing required parameter: "<detail>"
106 Invalid ID: "<detail>"
107 Value out of range: "<detail>"
201 Activity not found: "<detail>"
202 Shift To and Shift From must be different: "<detail>"
203 Too many minutes: "<detail>"
209 Activity cannot be modified: "<detail>"
FatSecret Sites
For Developers

For Professionals

For Everyone

FatSecret Platform API

Support
API

About FatSecret

© 2022 FatSecret. All rights reserved.