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": "adae2de4-edb1-4207-8bfd-a75431f4f5ea",
"customer_id": "8914675f-09e6-45bf-ad92-b4d30c1bf3b0",
"grouping_quantity": 1,
"id": "4aa9a367-1be1-4c89-9915-618b2b73e541",
"item_service_id": "93fd7b5c-05c4-4f85-ba63-7d14938c07f0",
"item_garment_type_id": "6ade2724-1efb-4ed0-aa62-712f106bf2e5",
"item_segment_id": "cb35199c-6e5c-4b3c-804a-3b897094fb69",
"item_type_id": "94e2257a-1a43-4e02-866e-9e38c96041d9",
"purchase_price": 1.0,
"sale_price": 1.0,
"size_id": "321cb609-1ff0-4de0-9f1b-61da17f8c221",
"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>adae2de4-edb1-4207-8bfd-a75431f4f5ea</color_id>
<customer_id>8914675f-09e6-45bf-ad92-b4d30c1bf3b0</customer_id>
<grouping_quantity>1</grouping_quantity>
<id>4aa9a367-1be1-4c89-9915-618b2b73e541</id>
<item_garment_type_id>6ade2724-1efb-4ed0-aa62-712f106bf2e5</item_garment_type_id>
<item_segment_id>cb35199c-6e5c-4b3c-804a-3b897094fb69</item_segment_id>
<item_service_id>93fd7b5c-05c4-4f85-ba63-7d14938c07f0</item_service_id>
<item_type_id>94e2257a-1a43-4e02-866e-9e38c96041d9</item_type_id>
<purchase_price>1</purchase_price>
<root_code>sample string 9</root_code>
<sale_price>1</sale_price>
<size_id>321cb609-1ff0-4de0-9f1b-61da17f8c221</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:
"6f6cd480-d7db-4647-a7ca-fd1263898192"
application/xml, text/xml
Sample:
<guid xmlns="http://schemas.microsoft.com/2003/10/Serialization/">6f6cd480-d7db-4647-a7ca-fd1263898192</guid>