fatsecret Platform API Documentation
Profile - Saved Meals: Get All Meals
Description
Returns saved meals for the specified user.
Why are we introducing this version?
Parameters
URL / Method
NAME | TYPE | REQUIRED | DESCRIPTION |
---|---|---|---|
URL (new) Method |
N/A | Required | "https://platform.fatsecret.com/rest/saved-meals/v2" HTTP "GET" |
OR | |||
method | String | Required | "saved_meals.get.v2" (included with other parameters) |
Additional Parameters
NAME | TYPE | REQUIRED | DESCRIPTION |
---|---|---|---|
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
saved_meal_id
. Each saved_meal
element contains information as follows:
NAME | TYPE | DESCRIPTION |
---|---|---|
saved_meal_id | Long | Unique saved meal identifier |
saved_meal_name | String | New name of the saved meal |
saved_meal_description | String | New description of the saved meal |
meals | String | Comma separated list of meals the saved meal is suitable for |
Example Response
Example 1:
<?xml version="1.0" encoding="utf-8" ?>
<saved_meals 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">
<saved_meal>
<saved_meal_id>1111111</saved_meal_id>
<saved_meal_name>Power Snack</saved_meal_name>
<saved_meal_description>A high impact energy meal - terrific for the great outdoors!</saved_meal_description>
<meals>Lunch,Other</meals>
</saved_meal>
</saved_meals>
Example 1:
{
"saved_meals": {
"saved_meal": [
{
"meals": "Lunch,Other",
"saved_meal_description": "A high impact energy meal - terrific for the great outdoors!",
"saved_meal_id": "1111111",
"saved_meal_name": "Power Snack"
}
]
}
}
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>' |
108 | Parameter | Invalid Type: '<details>' |