fatsecret Platform API Documentation
Feedback
Description
This API method enables developers to submit user feedback regarding potentially incorrect or missing food and/or barcode data. It supports a variety of issue types, including potential food or brand naming errors, incorrect nutrition facts, missing serving sizes, and unrecognized barcodes. To facilitate rapid verification, the API returns signed upload URLs, allowing developers to optionally (but ideally) upload up to three user submitted supporting images of the Barcode, Packaging, and Nutrition Facts via subsequent PUT requests.
Parameters
URL / Method
| NAME | TYPE | REQUIRED | DESCRIPTION |
|---|---|---|---|
| URL (new) Method |
N/A | Required | "https://platform.fatsecret.com/rest/feedback/v1" HTTP "POST" |
Example Request:
{
"region": "US",
"language": "en",
"barcode": "0041570054161",
"issue_type_id": 1,
"issue_type": "Wrong Name/Brand",
"notes": "Barcode attached to incorrect brand",
"external_id": "EX-1234",
"returned_food": {
"food_id": 3032,
"serving_id": 0
},
"image_file_extension": "jpg"
}
Json Property Descriptions
| NAME | TYPE | REQUIRED | DESCRIPTION |
|---|---|---|---|
| barcode | Int | Required | A barcode where a food is associated incorrectly. Required when issue_type_id is 1 |
| issue_type_id | Int | Required | The type ID for the request. Valid options are 1 (Wrong Name/Brand), 2 (Wrong Nutrition Info), 3 (Missing Serving Size), 4 (Barcode not found), 99 (Other) |
| issue_type | String | Optional | Issue description. This is to be provided when the issue_type_id is 99 (Other) |
| notes | String | Optional | Custom notes regarding the issue |
| external_id | String | Required | Custom identifier for external use. E.g an external unique user identifier |
| returned_food.food_id | Int | Optional | A food ID that is related to the issue (i.e. barcode incorrect food attached). Required when issue_type_id is 1, 2 or 3 |
| returned_food.serving_id | Int | Optional | A foods serving ID that is related to the issue (i.e. incorrect nutrient information). Required when issue_type_id is 2 or 3 |
| image_file_extension | String | Optional | The image file extension in which the signed uploads will be generated using. Accepts jpg, jpeg, png and tiff. Defaulted to jpg if not provided |
| region | String | Optional | Results will be filtered by region. E.G.: "FR" returns results from France. If not specified this will default to "US" (United States). Click here for full documentation on localization. |
| language | String | Optional | (Ignored unless region is also specified) Results will be in the specified language. E.G.: "fr" returns results in French |
Response
The response contains information as follows:
| NAME | TYPE | DESCRIPTION |
|---|---|---|
| expiryDateTimeUtc | DateTime | An expiry for the upload links |
| barcodeImageUrl | String | A signed upload url for a client to put a barcode image |
| packagingImageUrl | String | A signed upload url for a client to put a packaging image |
| nutritionImageUrl | String | A signed upload url for a client to put a nutrition facts panel image |
Example Response
Example 1:
{
"expiryDateTimeUtc": "2026-03-17T01:23:45.666777Z",
"barcodeImageUrl": "https://<upload domain and path>/barcode.jpg?<Authorization parameters>",
"packagingImageUrl": "https://<upload domain and path>/packaging.jpg?<Authorization parameters>",
"nutritionImageUrl": "https://<upload domain and path>/nutrition.jpg?<Authorization parameters>"
}
Error Codes
| CODE | TYPE | DESCRIPTION |
|---|---|---|
| 1 | General | An unknown error occurred: '<details>' |
| 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>' |
| 12 | General | User is performing too many actions: '<details>' |
| 13 | OAuth 2.0 | Invalid token: '<details>' |
| 14 | OAuth 2.0 | Missing scope: '<details>' |
| 23 | General | Api not found |
| 24 | General | A timeout has occurred |
| 101 | Parameter | Missing required parameter: '<details>' |
| 107 | Parameter | Value out of range: '<details>' |
| 109 | Parameter | Character limit exceeded: '<details>' |