food_categories.get

Description

This is a utility method, returning the full list of all food categories and their associated unique identifiers.

Localization (Premier Only):

Two additional optional parameters named region and language are available to premier clients. More information can be found in the Localization guide.

Parameters

Required

Name Type Description
method String MUST be "food_categories.get"

Optional

Name Type Description
format String The desired response format. Valid reponse formats are "xml" or "json" (default value is "xml").

Example Return XML

<?xml version="1.0" encoding="utf-8" ?>
<food_categories 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">
    <food_category>
        <food_category_id>1</food_category_id>
        <food_category_name>Beans & Legumes</food_category_name>
        <food_category_description>All types of beans and legumes like baked beans, green beans, refried beans and lentils.</food_category_description>
    </food_category>
</food_categories>

Example Return JSON

{ "food_categories": {"food_category": {"food_category_description": "All types of beans and legumes like baked beans, green beans, refried beans and lentils.", "food_category_id": "1", "food_category_name": "Beans & Legumes" } }}

Error Code

Code Description
13 Invalid token: "<detail>"
FatSecret Sites
For Developers

For Professionals

For Everyone

FatSecret Platform API

Developers

Support
API

About FatSecret

© 2022 FatSecret. All rights reserved.