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": "561476e4-5876-421c-9267-828ba4a2c110",
"customer_id": "8d22cc95-9c48-4703-8e87-1ca6b78b88ab",
"grouping_quantity": 1,
"id": "70f26dbc-5bf7-4aa4-b1b7-d0a4cf172926",
"item_service_id": "8aa802df-93a2-4a3d-836d-5d60d0a1f7bb",
"item_garment_type_id": "f83b6832-954a-4830-b6e4-2ee6d1254a1e",
"item_segment_id": "17df799a-72d2-4d9b-86a3-4f6321f7cc07",
"item_type_id": "528734e4-4943-4487-a889-88c63ccf5491",
"purchase_price": 1.0,
"sale_price": 1.0,
"size_id": "1a4c0877-a1dc-471a-a39c-df2d5219d2c0",
"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>561476e4-5876-421c-9267-828ba4a2c110</color_id>
<customer_id>8d22cc95-9c48-4703-8e87-1ca6b78b88ab</customer_id>
<grouping_quantity>1</grouping_quantity>
<id>70f26dbc-5bf7-4aa4-b1b7-d0a4cf172926</id>
<item_garment_type_id>f83b6832-954a-4830-b6e4-2ee6d1254a1e</item_garment_type_id>
<item_segment_id>17df799a-72d2-4d9b-86a3-4f6321f7cc07</item_segment_id>
<item_service_id>8aa802df-93a2-4a3d-836d-5d60d0a1f7bb</item_service_id>
<item_type_id>528734e4-4943-4487-a889-88c63ccf5491</item_type_id>
<purchase_price>1</purchase_price>
<root_code>sample string 9</root_code>
<sale_price>1</sale_price>
<size_id>1a4c0877-a1dc-471a-a39c-df2d5219d2c0</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:
Sample not available.
Response Information
Resource Description
globally unique identifierResponse Formats
application/json, text/json
Sample:
"f4b88102-87d6-4e4d-b017-2a5314acb47f"
application/xml, text/xml
Sample:
<guid xmlns="http://schemas.microsoft.com/2003/10/Serialization/">f4b88102-87d6-4e4d-b017-2a5314acb47f</guid>