GetAnalysisByUserCode 1.X-2.X
Summary
Retrieves an analysis for the entire food identified by the specified userCode value if it is published.
Note: If you are upgrading to Gen API 3.1 (or later) you will want to reference this page.
http://ns.esha.com/2013/genesisapi/GetAnalysisByUserCode
Request Type: FoodAnalysisRequest Element
Element | Content Type | Description |
|---|---|---|
UserCode | xs:string | The value of the User Code field on the food. |
Response Type: FoodAnalysisResponse Element
Element | Type | Description |
|---|---|---|
Food | exlx:FoodDto | The metadata and list of items in the food matching the userCode value. |
FoodRawAnalysis | exlx:AnalysisDto |
|
ItemsRawAnalysis | api:ArrayOfAnalysisDto |
|
LabelNutrients | exlx:ArrayOfLabelNutrientDto |
|
IngredientStatement | exlx:IngredientStatementInfoDto |
|
AllergenStatement | exlx:AllergenStatementDto |
|
Examples
Query food analysis for user code
var binding = new WSHttpBinding();
binding.Security.Mode = SecurityMode.None;
var endpoint = new EndpointAddress("http://eshademo.cloudapp.net/soap/foodqueryservice.svc");
IFoodAnalysisQueryService fs = new FoodAnalysisQueryServiceClient(binding, endpoint);
var food = fs.GetFoodByUserCode(new FoodMetadataRequest { UserCode = "1" });