FatSecret Platform API Documentation

Profile - Weight Diary: Update For Date

OAuth 1.0 Latest

Records a user's weight for a nominated date.

First time weigh-ins require the goal_weight_kg and current_height_cm parameters.

Please note as per the API Terms of Use that it is your responsibility to ensure that the information generated by using the API is not be interpreted as a substitute for medical physician consultation, evaluation, or treatment.

method String Required MUST be "weight.update"
current_weight_kg Decimal Required Current weight of the user in kilograms
date Int Optional Number of days since January 1, 1970 (default value is the current day)
weight_type String Optional Weight measurement type for this user profile. Valid types are "kg" and "lb" (default value is "kg")
height_type String Optional Height measurement type for this user profile. Valid types are "cm" and "inch" (default value is "cm")
goal_weight_kg Decimal Optional User's goal weight in kilograms
current_height_cm Decimal Optional Current height of the user in centimetres. This is required for the first weigh-in. You can only set this for the first time
comment String Optional A comment for this weigh-in
format String Optional The desired response format. Valid response formats are "xml" or "json" (default value is "xml").
There are no storable values returned by this call.

Each success element contains information as follows:

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
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>'
108 Parameter Invalid Type: '<details>'
205 Application Date must be within 2 days from today: '<details>'
206 Application Cannot update weight for an earlier date: '<details>'