ListAllergens
- Nate Edwards
- Patrick Murphy
- Alex Caroline
Owned by Nate Edwards
Summary: Provides a list of all allergens available which are identified by an authority and may be present in foods.
Soap Action: http://ns.esha.com/2013/genesisapi/ListAllergens
Request Type: AllergenListRequest
- 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.
Response Type: AllergenListResponse
- Allergens
- Type: GroupDto[]
- The list of allergen groups obtained from the request.
- Status
- Type: exlx:ResultStatus
- The ResultStatus of the given response
- ResponseVersion
- Type: exlx:XmlVersion
- The version of the given response.
SOAP Request Expand source
<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:AllergenListRequest> <gen:StartIndex>1</gen:StartIndex> <gen:PageSize>10</gen:PageSize> </gen:AllergenListRequest> </soap:Body> </soap:Envelope>
SOAP Response Expand source
<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/listallergensresponse</a:Action> </s:Header> <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <AllergenListResponse xmlns="http://ns.esha.com/2013/genesisapi"> <Allergens> <Allergen> <Id xmlns="http://ns.esha.com/2013/exlx">f01975c0-0191-0000-ff88-2a01e505d63d</Id> <Name xmlns="http://ns.esha.com/2013/exlx"> <Value xml:lang="en-US" xmlns="http://ns.esha.com/2013/types">Egg</Value> <Value xml:lang="es-MX" xmlns="http://ns.esha.com/2013/types">Huevo</Value> <Value xml:lang="fr-CA" xmlns="http://ns.esha.com/2013/types">Oeuf</Value> </Name> <ParentId xmlns="http://ns.esha.com/2013/exlx">f01975c0-27c0-0009-ff88-2a01e505d63d</ParentId> <ParentGroupName xmlns="http://ns.esha.com/2013/exlx"> <Value xml:lang="en-US" xmlns="http://ns.esha.com/2013/types">Allergens</Value> </ParentGroupName> <GroupType xmlns="http://ns.esha.com/2013/exlx">Allergen</GroupType> </Allergen> <Allergen> <Id xmlns="http://ns.esha.com/2013/exlx">f01975c0-0192-0000-ff88-2a01e505d63d</Id> <Name xmlns="http://ns.esha.com/2013/exlx"> <Value xml:lang="fr-CA" xmlns="http://ns.esha.com/2013/types">Poissons</Value> <Value xml:lang="es-MX" xmlns="http://ns.esha.com/2013/types">Pescados</Value> <Value xml:lang="en-US" xmlns="http://ns.esha.com/2013/types">Fish</Value> </Name> <ParentId xmlns="http://ns.esha.com/2013/exlx">f01975c0-27c0-0009-ff88-2a01e505d63d</ParentId> <ParentGroupName xmlns="http://ns.esha.com/2013/exlx"> <Value xml:lang="en-US" xmlns="http://ns.esha.com/2013/types">Allergens</Value> </ParentGroupName> <GroupType xmlns="http://ns.esha.com/2013/exlx">Allergen</GroupType> </Allergen> <Allergen> <Id xmlns="http://ns.esha.com/2013/exlx">f01975c0-0193-0000-ff88-2a01e505d63d</Id> <Name xmlns="http://ns.esha.com/2013/exlx"> <Value xml:lang="en-US" xmlns="http://ns.esha.com/2013/types">Milk</Value> <Value xml:lang="es-MX" xmlns="http://ns.esha.com/2013/types">Leche</Value> <Value xml:lang="fr-CA" xmlns="http://ns.esha.com/2013/types">Lait</Value> </Name> <ParentId xmlns="http://ns.esha.com/2013/exlx">f01975c0-27c0-0009-ff88-2a01e505d63d</ParentId> <ParentGroupName xmlns="http://ns.esha.com/2013/exlx"> <Value xml:lang="en-US" xmlns="http://ns.esha.com/2013/types">Allergens</Value> </ParentGroupName> <GroupType xmlns="http://ns.esha.com/2013/exlx">Allergen</GroupType> </Allergen> <Allergen> <Id xmlns="http://ns.esha.com/2013/exlx">f01975c0-0194-0000-ff88-2a01e505d63d</Id> <Name xmlns="http://ns.esha.com/2013/exlx"> <Value xml:lang="fr-CA" xmlns="http://ns.esha.com/2013/types">Arachide</Value> <Value xml:lang="es-MX" xmlns="http://ns.esha.com/2013/types">Cacahuete</Value> <Value xml:lang="en-US" xmlns="http://ns.esha.com/2013/types">Peanut</Value> </Name> <ParentId xmlns="http://ns.esha.com/2013/exlx">f01975c0-27c0-0009-ff88-2a01e505d63d</ParentId> <ParentGroupName xmlns="http://ns.esha.com/2013/exlx"> <Value xml:lang="en-US" xmlns="http://ns.esha.com/2013/types">Allergens</Value> </ParentGroupName> <GroupType xmlns="http://ns.esha.com/2013/exlx">Allergen</GroupType> </Allergen> <Allergen> <Id xmlns="http://ns.esha.com/2013/exlx">f01975c0-0195-0000-ff88-2a01e505d63d</Id> <Name xmlns="http://ns.esha.com/2013/exlx"> <Value xml:lang="en-US" xmlns="http://ns.esha.com/2013/types">Shellfish</Value> <Value xml:lang="es-MX" xmlns="http://ns.esha.com/2013/types">Crustáceos</Value> <Value xml:lang="fr-CA" xmlns="http://ns.esha.com/2013/types">Mollusques et crustacés</Value> </Name> <ParentId xmlns="http://ns.esha.com/2013/exlx">f01975c0-27c0-0009-ff88-2a01e505d63d</ParentId> <ParentGroupName xmlns="http://ns.esha.com/2013/exlx"> <Value xml:lang="en-US" xmlns="http://ns.esha.com/2013/types">Allergens</Value> </ParentGroupName> <GroupType xmlns="http://ns.esha.com/2013/exlx">Allergen</GroupType> </Allergen> <Allergen> <Id xmlns="http://ns.esha.com/2013/exlx">f01975c0-0196-0000-ff88-2a01e505d63d</Id> <Name xmlns="http://ns.esha.com/2013/exlx"> <Value xml:lang="fr-CA" xmlns="http://ns.esha.com/2013/types">Soja</Value> <Value xml:lang="es-MX" xmlns="http://ns.esha.com/2013/types">Soya</Value> <Value xml:lang="en-US" xmlns="http://ns.esha.com/2013/types">Soy</Value> </Name> <ParentId xmlns="http://ns.esha.com/2013/exlx">f01975c0-27c0-0009-ff88-2a01e505d63d</ParentId> <ParentGroupName xmlns="http://ns.esha.com/2013/exlx"> <Value xml:lang="en-US" xmlns="http://ns.esha.com/2013/types">Allergens</Value> </ParentGroupName> <GroupType xmlns="http://ns.esha.com/2013/exlx">Allergen</GroupType> </Allergen> <Allergen> <Id xmlns="http://ns.esha.com/2013/exlx">f01975c0-0197-0000-ff88-2a01e505d63d</Id> <Name xmlns="http://ns.esha.com/2013/exlx"> <Value xml:lang="en-US" xmlns="http://ns.esha.com/2013/types">Tree Nuts</Value> <Value xml:lang="es-MX" xmlns="http://ns.esha.com/2013/types">Tuercas del árbol</Value> <Value xml:lang="fr-CA" xmlns="http://ns.esha.com/2013/types">Noix</Value> </Name> <ParentId xmlns="http://ns.esha.com/2013/exlx">f01975c0-27c0-0009-ff88-2a01e505d63d</ParentId> <ParentGroupName xmlns="http://ns.esha.com/2013/exlx"> <Value xml:lang="en-US" xmlns="http://ns.esha.com/2013/types">Allergens</Value> </ParentGroupName> <GroupType xmlns="http://ns.esha.com/2013/exlx">Allergen</GroupType> </Allergen> <Allergen> <Id xmlns="http://ns.esha.com/2013/exlx">f01975c0-0198-0000-ff88-2a01e505d63d</Id> <Name xmlns="http://ns.esha.com/2013/exlx"> <Value xml:lang="fr-CA" xmlns="http://ns.esha.com/2013/types">Blé</Value> <Value xml:lang="es-MX" xmlns="http://ns.esha.com/2013/types">Trigo</Value> <Value xml:lang="en-US" xmlns="http://ns.esha.com/2013/types">Wheat</Value> </Name> <ParentId xmlns="http://ns.esha.com/2013/exlx">f01975c0-27c0-0009-ff88-2a01e505d63d</ParentId> <ParentGroupName xmlns="http://ns.esha.com/2013/exlx"> <Value xml:lang="en-US" xmlns="http://ns.esha.com/2013/types">Allergens</Value> </ParentGroupName> <GroupType xmlns="http://ns.esha.com/2013/exlx">Allergen</GroupType> </Allergen> <Allergen> <Id xmlns="http://ns.esha.com/2013/exlx">f01975c0-0199-0000-ff88-2a01e505d63d</Id> <Name xmlns="http://ns.esha.com/2013/exlx"> <Value xml:lang="en-US" xmlns="http://ns.esha.com/2013/types">Gluten</Value> <Value xml:lang="fr-CA" xmlns="http://ns.esha.com/2013/types">Gluten</Value> <Value xml:lang="es-MX" xmlns="http://ns.esha.com/2013/types">Gluten</Value> </Name> <ParentId xmlns="http://ns.esha.com/2013/exlx">f01975c0-27c0-0009-ff88-2a01e505d63d</ParentId> <ParentGroupName xmlns="http://ns.esha.com/2013/exlx"> <Value xml:lang="en-US" xmlns="http://ns.esha.com/2013/types">Allergens</Value> </ParentGroupName> <GroupType xmlns="http://ns.esha.com/2013/exlx">Allergen</GroupType> </Allergen> <Allergen> <Id xmlns="http://ns.esha.com/2013/exlx">f01975c0-019a-0000-ff88-2a01e505d63d</Id> <Name xmlns="http://ns.esha.com/2013/exlx"> <Value xml:lang="es-MX" xmlns="http://ns.esha.com/2013/types">Crustáceos</Value> <Value xml:lang="fr-CA" xmlns="http://ns.esha.com/2013/types">Crustacés</Value> <Value xml:lang="en-US" xmlns="http://ns.esha.com/2013/types">Crustaceans</Value> </Name> <ParentId xmlns="http://ns.esha.com/2013/exlx">f01975c0-27c0-0009-ff88-2a01e505d63d</ParentId> <ParentGroupName xmlns="http://ns.esha.com/2013/exlx"> <Value xml:lang="en-US" xmlns="http://ns.esha.com/2013/types">Allergens</Value> </ParentGroupName> <GroupType xmlns="http://ns.esha.com/2013/exlx">Allergen</GroupType> </Allergen> </Allergens> <ResponseVersion>1.0.0.0</ResponseVersion> <Status> <StatusMessage>Ok</StatusMessage> <StatusCode>200</StatusCode> </Status> </AllergenListResponse> </s:Body> </s:Envelope>
REST Request Expand source
POST http://localhost:80/rest/FoodQueryService.svc/ListAllergens HTTP/1.1 Content-Type: text/plain Host: localhost:80 request={"StartIndex":1, "PageSize":10}
REST Response Expand source
{ "Allergens": [ { "Name": { "en-US": "Egg", "es-MX": "Huevo", "fr-CA": "Oeuf" }, "ParentId": "f01975c0-27c0-0009-ff88-2a01e505d63d", "ParentIdSpecified": true, "ParentGroupName": { "en-US": "Allergens" }, "GroupType": 65, "NutrientIdsSpecified": false, "FoodIdsSpecified": false, "ConsumerIdsSpecified": false, "AllergenRulesSpecified": false, "Id": "f01975c0-0191-0000-ff88-2a01e505d63d", "IdSpecified": true }, { "Name": { "fr-CA": "Poissons", "es-MX": "Pescados", "en-US": "Fish" }, "ParentId": "f01975c0-27c0-0009-ff88-2a01e505d63d", "ParentIdSpecified": true, "ParentGroupName": { "en-US": "Allergens" }, "GroupType": 65, "NutrientIdsSpecified": false, "FoodIdsSpecified": false, "ConsumerIdsSpecified": false, "AllergenRulesSpecified": false, "Id": "f01975c0-0192-0000-ff88-2a01e505d63d", "IdSpecified": true }, { "Name": { "en-US": "Milk", "es-MX": "Leche", "fr-CA": "Lait" }, "ParentId": "f01975c0-27c0-0009-ff88-2a01e505d63d", "ParentIdSpecified": true, "ParentGroupName": { "en-US": "Allergens" }, "GroupType": 65, "NutrientIdsSpecified": false, "FoodIdsSpecified": false, "ConsumerIdsSpecified": false, "AllergenRulesSpecified": false, "Id": "f01975c0-0193-0000-ff88-2a01e505d63d", "IdSpecified": true }, { "Name": { "fr-CA": "Arachide", "es-MX": "Cacahuete", "en-US": "Peanut" }, "ParentId": "f01975c0-27c0-0009-ff88-2a01e505d63d", "ParentIdSpecified": true, "ParentGroupName": { "en-US": "Allergens" }, "GroupType": 65, "NutrientIdsSpecified": false, "FoodIdsSpecified": false, "ConsumerIdsSpecified": false, "AllergenRulesSpecified": false, "Id": "f01975c0-0194-0000-ff88-2a01e505d63d", "IdSpecified": true }, { "Name": { "en-US": "Shellfish", "es-MX": "Crustáceos", "fr-CA": "Mollusques et crustacés" }, "ParentId": "f01975c0-27c0-0009-ff88-2a01e505d63d", "ParentIdSpecified": true, "ParentGroupName": { "en-US": "Allergens" }, "GroupType": 65, "NutrientIdsSpecified": false, "FoodIdsSpecified": false, "ConsumerIdsSpecified": false, "AllergenRulesSpecified": false, "Id": "f01975c0-0195-0000-ff88-2a01e505d63d", "IdSpecified": true }, { "Name": { "fr-CA": "Soja", "es-MX": "Soya", "en-US": "Soy" }, "ParentId": "f01975c0-27c0-0009-ff88-2a01e505d63d", "ParentIdSpecified": true, "ParentGroupName": { "en-US": "Allergens" }, "GroupType": 65, "NutrientIdsSpecified": false, "FoodIdsSpecified": false, "ConsumerIdsSpecified": false, "AllergenRulesSpecified": false, "Id": "f01975c0-0196-0000-ff88-2a01e505d63d", "IdSpecified": true }, { "Name": { "en-US": "Tree Nuts", "es-MX": "Tuercas del árbol", "fr-CA": "Noix" }, "ParentId": "f01975c0-27c0-0009-ff88-2a01e505d63d", "ParentIdSpecified": true, "ParentGroupName": { "en-US": "Allergens" }, "GroupType": 65, "NutrientIdsSpecified": false, "FoodIdsSpecified": false, "ConsumerIdsSpecified": false, "AllergenRulesSpecified": false, "Id": "f01975c0-0197-0000-ff88-2a01e505d63d", "IdSpecified": true }, { "Name": { "fr-CA": "Blé", "es-MX": "Trigo", "en-US": "Wheat" }, "ParentId": "f01975c0-27c0-0009-ff88-2a01e505d63d", "ParentIdSpecified": true, "ParentGroupName": { "en-US": "Allergens" }, "GroupType": 65, "NutrientIdsSpecified": false, "FoodIdsSpecified": false, "ConsumerIdsSpecified": false, "AllergenRulesSpecified": false, "Id": "f01975c0-0198-0000-ff88-2a01e505d63d", "IdSpecified": true }, { "Name": { "en-US": "Gluten", "fr-CA": "Gluten", "es-MX": "Gluten" }, "ParentId": "f01975c0-27c0-0009-ff88-2a01e505d63d", "ParentIdSpecified": true, "ParentGroupName": { "en-US": "Allergens" }, "GroupType": 65, "NutrientIdsSpecified": false, "FoodIdsSpecified": false, "ConsumerIdsSpecified": false, "AllergenRulesSpecified": false, "Id": "f01975c0-0199-0000-ff88-2a01e505d63d", "IdSpecified": true }, { "Name": { "es-MX": "Crustáceos", "fr-CA": "Crustacés", "en-US": "Crustaceans" }, "ParentId": "f01975c0-27c0-0009-ff88-2a01e505d63d", "ParentIdSpecified": true, "ParentGroupName": { "en-US": "Allergens" }, "GroupType": 65, "NutrientIdsSpecified": false, "FoodIdsSpecified": false, "ConsumerIdsSpecified": false, "AllergenRulesSpecified": false, "Id": "f01975c0-019a-0000-ff88-2a01e505d63d", "IdSpecified": true } ], "Status": { "StatusMessage": 200, "StatusCode": 200, "StatusDetail": null }, "ResponseVersion": {} }