POST api/itemapi/add?siteId={siteId}
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| siteId | globally unique identifier |
None. |
Body Parameters
ItemViewModel| Name | Description | Type | Additional information |
|---|---|---|---|
| descriptions | Dictionary of string [key] and string [value] |
None. |
|
| active | boolean |
None. |
|
| code | string |
Required String length: inclusive between 0 and 30 |
|
| color_id | globally unique identifier |
None. |
|
| customer_id | globally unique identifier |
Required |
|
| grouping_quantity | integer |
None. |
|
| id | globally unique identifier |
None. |
|
| item_service_id | globally unique identifier |
None. |
|
| item_garment_type_id | globally unique identifier |
None. |
|
| item_segment_id | globally unique identifier |
None. |
|
| item_type_id | globally unique identifier |
None. |
|
| purchase_price | decimal number |
None. |
|
| sale_price | decimal number |
None. |
|
| size_id | globally unique identifier |
None. |
|
| supplier_code | string |
String length: inclusive between 0 and 30 |
|
| supplier_description | string |
String length: inclusive between 0 and 100 |
|
| unit | string |
String length: inclusive between 0 and 10 |
|
| weight | integer |
None. |
|
| root_code | string |
String length: inclusive between 0 and 30 |
Request Formats
application/json, text/json
Sample:
{
"descriptions": {
"sample string 1": "sample string 2",
"sample string 3": "sample string 4"
},
"active": true,
"code": "sample string 2",
"color_id": "139c9b93-bbd9-4a80-9bf7-92d5b04c6212",
"customer_id": "7d9deb2f-2694-4de9-80bc-7d6ea549b958",
"grouping_quantity": 1,
"id": "a9f2d414-a02a-4abd-bd9b-a1f7d26c1e3e",
"item_service_id": "dd9817bc-1df3-4525-83e9-0d613173caae",
"item_garment_type_id": "adb18933-704e-44b2-b852-8813b3428eda",
"item_segment_id": "69eb10a2-396a-4356-bbe9-14f149deed1b",
"item_type_id": "63fda131-dbef-4c06-be72-ee59b5e1f66e",
"purchase_price": 1.0,
"sale_price": 1.0,
"size_id": "65ac147e-1b7b-4fc5-a3c7-2bb3133a1fd7",
"supplier_code": "sample string 6",
"supplier_description": "sample string 7",
"unit": "sample string 8",
"weight": 1,
"root_code": "sample string 9"
}
application/xml, text/xml
Sample:
<item xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/EntityModel">
<active>true</active>
<code>sample string 2</code>
<color_id>139c9b93-bbd9-4a80-9bf7-92d5b04c6212</color_id>
<customer_id>7d9deb2f-2694-4de9-80bc-7d6ea549b958</customer_id>
<grouping_quantity>1</grouping_quantity>
<id>a9f2d414-a02a-4abd-bd9b-a1f7d26c1e3e</id>
<item_garment_type_id>adb18933-704e-44b2-b852-8813b3428eda</item_garment_type_id>
<item_segment_id>69eb10a2-396a-4356-bbe9-14f149deed1b</item_segment_id>
<item_service_id>dd9817bc-1df3-4525-83e9-0d613173caae</item_service_id>
<item_type_id>63fda131-dbef-4c06-be72-ee59b5e1f66e</item_type_id>
<purchase_price>1</purchase_price>
<root_code>sample string 9</root_code>
<sale_price>1</sale_price>
<size_id>65ac147e-1b7b-4fc5-a3c7-2bb3133a1fd7</size_id>
<supplier_code>sample string 6</supplier_code>
<supplier_description>sample string 7</supplier_description>
<unit>sample string 8</unit>
<weight>1</weight>
<descriptions xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:KeyValueOfstringstring>
<d2p1:Key>sample string 1</d2p1:Key>
<d2p1:Value>sample string 2</d2p1:Value>
</d2p1:KeyValueOfstringstring>
<d2p1:KeyValueOfstringstring>
<d2p1:Key>sample string 3</d2p1:Key>
<d2p1:Value>sample string 4</d2p1:Value>
</d2p1:KeyValueOfstringstring>
</descriptions>
</item>
application/x-www-form-urlencoded
Sample:
Response Information
Resource Description
globally unique identifierResponse Formats
application/json, text/json
Sample:
"b42f3107-a84f-4cf2-ac6b-8b2980ba50c9"
application/xml, text/xml
Sample:
<guid xmlns="http://schemas.microsoft.com/2003/10/Serialization/">b42f3107-a84f-4cf2-ac6b-8b2980ba50c9</guid>