Food Sub Categories: Get all v2

Description

This is a utility method, returning the full list of all food sub categories for a food category.

Why are we introducing this version?

This version contains an update to the JSON output structure.



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_sub_categories.get.v2"
food_category_id Long The ID of the food category.

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_sub_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_sub_category>Baked Bean</food_sub_category>
    <food_sub_category>Bean</food_sub_category>
    <food_sub_category>Black Bean</food_sub_category>
</food_sub_categories>

Example Return JSON

{ "food_sub_categories": { "food_sub_category": [ "Baked Bean", "Bean", "Black Bean" ] }}

Error Code

Code Description
13 Invalid token: "<detail>"
101 Missing required parameter: "<detail>"
FatSecret Sites
For Developers

For Professionals

For Everyone

FatSecret Platform API

Developers

Support
API

About FatSecret

© 2023 FatSecret. All rights reserved.