FatSecret Platform API Documentation

Profile - Food Diary: Edit Entry By Id

OAuth 1.0 Latest
Description

Adjusts the recorded values for a food diary entry. Note that the date of the entry may not be adjusted, however one or more of the other remaining properties – food_entry_name, serving_id, number_of_units, or meal may be altered. In order to shift the date for which a food diary entry was recorded the original entry must be deleted and a new entry recorded.

Parameters
URL / Method
NAME TYPE REQUIRED DESCRIPTION
URL (new)
Method
N/A Required "https://platform.fatsecret.com/restfood-entries/v1"
HTTP "PUT"
OR
method String Required "food_entry.edit" (included with other parameters)
Additional Parameters
NAME TYPE REQUIRED DESCRIPTION
food_entry_id Long Required Unique identifier of the food diary entry
food_entry_name String Optional A description of the food item as entered by the user; typically the name of the food. E.G.: "Instant Oatmeal"
serving_id Long Optional Unique serving identifier
number_of_units Decimal Optional Number of units in this standard serving size. For instance, if the serving description is "2 tablespoons" the number of units is "2", while if the serving size is "1 cup" the number of units is "1". Please note that this is only applicable for when food_type is "Generic" whereas for "Brand" the number of units will always be "1"
meal String Optional Type of meal eaten. Valid meal types are "breakfast", "lunch", "dinner" and "other"
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>'
108 Parameter Invalid Type: '<details>'