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": "2b5c40ba-504d-427f-9e97-4ed68f0903d4",
"customer_id": "f14e413c-4c13-4397-8db4-9e88a812c9fe",
"grouping_quantity": 1,
"id": "ec45b3c8-f95d-4c49-9f38-e1687cbc5ae3",
"item_service_id": "0663cc89-7f18-4705-9616-94a717102e10",
"item_garment_type_id": "0b72ee93-1794-4c93-9f05-24dbd63997f3",
"item_segment_id": "2a99ae8e-4b0c-4b32-8ef6-a887ca945bc9",
"item_type_id": "8c52f882-06b8-4942-b7c2-8860b68614fc",
"purchase_price": 1.0,
"sale_price": 1.0,
"size_id": "cbe74656-8254-4448-b5bb-497ed54fd6d3",
"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>2b5c40ba-504d-427f-9e97-4ed68f0903d4</color_id>
<customer_id>f14e413c-4c13-4397-8db4-9e88a812c9fe</customer_id>
<grouping_quantity>1</grouping_quantity>
<id>ec45b3c8-f95d-4c49-9f38-e1687cbc5ae3</id>
<item_garment_type_id>0b72ee93-1794-4c93-9f05-24dbd63997f3</item_garment_type_id>
<item_segment_id>2a99ae8e-4b0c-4b32-8ef6-a887ca945bc9</item_segment_id>
<item_service_id>0663cc89-7f18-4705-9616-94a717102e10</item_service_id>
<item_type_id>8c52f882-06b8-4942-b7c2-8860b68614fc</item_type_id>
<purchase_price>1</purchase_price>
<root_code>sample string 9</root_code>
<sale_price>1</sale_price>
<size_id>cbe74656-8254-4448-b5bb-497ed54fd6d3</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:
"0652c4ab-a30d-4177-ac2d-cbd15ef96628"
application/xml, text/xml
Sample:
<guid xmlns="http://schemas.microsoft.com/2003/10/Serialization/">0652c4ab-a30d-4177-ac2d-cbd15ef96628</guid>