...
- FilterByFoodTypes (Optional)
- FoodType[]
- Indicates which types of foods are returned. If empty, all foods are returned.
- FilterByPulbicationStates (Optional)
- PublicationState[]
- Indicates which foods with the given publication states are returned. If empty, only published foods are returned.
- DataSourceFilter (Optional)
- String[]
- Indicates which sources (UserFoods / EshaFoods) to query from.
- StartIndex (Optional)
- Type: Int
- The index offset. If empty, index starts at 1.
- PageSize (Optional)
- Type: Int
- The number of foods to return in the response. If empty, all records are returned.
...
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:gen="http://ns.esha.com/2013/genesisapi"> <soap:Header/> <soap:Body> <gen:FoodUserCodesListRequest> <gen:FilterByPublicationStates> <gen:PublicationState>Draft</gen:PublicationState> <gen:PublicationState>Published</gen:PublicationState> </gen:FilterByPublicationStates> <gen:FilterByFoodTypes> <gen:FoodType>Ingredient</gen:FoodType> <gen:FoodType>Recipe</gen:FoodType> </gen:FilterByFoodTypes> <gen:DataSourceFilter> <gen:DataSource>EshaFoods</gen:DataSource> <gen:DataSource>UserFoods</gen:DataSource> </gen:DataSourceFilter> <gen:StartIndex>1</gen:StartIndex> <gen:PageSize>3</gen:PageSize> </gen:FoodUserCodesListRequest> </soap:Body> </soap:Envelope> |
...
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
request={"StartIndex":1, "PageSize":3, "FilterByPublicationStates":["Draft","Published"], "FilterByFoodTypes":["Ingredient", "Recipe"], "DataSourceFilter":["UserFoods", "EshaFoods"]} |
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
{ "UserCodes": [ "CB Raisins", "CB Lemon Wedge", "1128 USDA Standard" ], "Status": { "StatusMessage": 200, "StatusCode": 200, "StatusDetail": null }, "ResponseVersion": {} } |
...