Summary: Provides a list of all User Codes for foods matching the criterion in the request.
Soap Action: http://ns.esha.com/2013/genesisapi/ListFoodUserCodes
<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> |
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing"> <s:Header> <a:Action s:mustUnderstand="1">http://ns.esha.com/2013/genesisapi/listfoodusercodesresponse</a:Action> </s:Header> <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <FoodUserCodesListResponse xmlns="http://ns.esha.com/2013/genesisapi"> <ResponseVersion>1.0.0.0</ResponseVersion> <Status> <StatusMessage>Ok</StatusMessage> <StatusCode>200</StatusCode> </Status> <UserCodes> <UserCode>CB Raisins</UserCode> <UserCode>CB Lemon Wedge</UserCode> <UserCode>1128 USDA Standard</UserCode> </UserCodes> </FoodUserCodesListResponse> </s:Body> </s:Envelope> |
POST http://localhost:80/rest/FoodQueryService.svc/ListFoodUserCodes HTTP/1.1 Content-Type: text/plain Host: localhost:80 request={"StartIndex":1, "PageSize":3, "FilterByPublicationStates":["Draft","Published"], "FilterByFoodTypes":["Ingredient", "Recipe"], "DataSourceFilter":["UserFoods", "EshaFoods"]} |
{ "UserCodes": [ "CB Raisins", "CB Lemon Wedge", "1128 USDA Standard" ], "Status": { "StatusMessage": 200, "StatusCode": 200, "StatusDetail": null }, "ResponseVersion": {} } |