POST api/allergens
Add or save allergen
Request Information
URI Parameters
None.
Body Parameters
Allergen to save
AllergenName | Description | Type | Additional information |
---|---|---|---|
ID |
Allergen identifier |
integer |
None. |
Name |
The allergen description and as used in the declaration statement |
string |
None. |
Reserved |
This allergen is reserved and can not be deleted by users |
boolean |
None. |
Updated |
The last time the allergen was updated (UTC on server) |
date |
None. |
Deleted |
Allergen has been soft deleted |
boolean |
None. |
Ingredients |
List of allergen ingredients for other declarations |
Collection of AllergenIngredient |
Relation. This field may not always be loaded or used for updates. |
Request Formats
application/json, text/json
Sample:
{ "id": 1, "name": "sample string 2", "reserved": true, "updated": "2025-06-14T06:39:11.5699686", "deleted": true, "ingredients": [ { "$id": "2", "id": 1, "allergenID": 2, "text": "sample string 3" }, { "$ref": "2" } ] }
application/xml, text/xml
Sample:
<Allergen xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/EziManager.Models.EMC.Allergens"> <Deleted>true</Deleted> <ID>1</ID> <Ingredients> <AllergenIngredient> <AllergenID>2</AllergenID> <ID>1</ID> <Text>sample string 3</Text> </AllergenIngredient> <AllergenIngredient> <AllergenID>2</AllergenID> <ID>1</ID> <Text>sample string 3</Text> </AllergenIngredient> </Ingredients> <Name>sample string 2</Name> <Reserved>true</Reserved> <Updated>2025-06-14T06:39:11.5699686+00:00</Updated> </Allergen>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
Allergen identifier
integerResponse Formats
application/json, text/json
Sample:
1
application/xml, text/xml
Sample:
<int xmlns="http://schemas.microsoft.com/2003/10/Serialization/">1</int>
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
Sample:
PK �4�Z�bZ� 5 xl/workbook.xml � (� ����0D�&�C���h� '.^=x/tkhK��|K $��ξ�j6v��G�ڕ�����$��u'3�;n��>H�"�s�Ck���I�$Wba�^턜^i���d�2'