POST api/itemapi/add?siteId={siteId}

Request Information

URI Parameters

NameDescriptionTypeAdditional information
siteId

globally unique identifier

None.

Body Parameters

ItemViewModel
NameDescriptionTypeAdditional 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": "2f4f41a1-9e9a-431a-a1ce-c931e219ea53",
  "customer_id": "55d9379b-38f6-465d-94c8-20c0892c4e3a",
  "grouping_quantity": 1,
  "id": "40b9e061-a0de-4d2f-b1f3-bf9552a72b4f",
  "item_service_id": "e25f2367-1d13-4249-ac47-7281261bac74",
  "item_garment_type_id": "f0523ddb-1497-4028-af96-04ce1a05cbcc",
  "item_segment_id": "02424e9e-e2fa-4d10-8ad6-0dc253e9892b",
  "item_type_id": "837672e0-aca9-48a3-b46a-1d4cfeae9de0",
  "purchase_price": 1.0,
  "sale_price": 1.0,
  "size_id": "f792c7bc-c92a-488d-aec4-679ce9f84fe0",
  "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>2f4f41a1-9e9a-431a-a1ce-c931e219ea53</color_id>
  <customer_id>55d9379b-38f6-465d-94c8-20c0892c4e3a</customer_id>
  <grouping_quantity>1</grouping_quantity>
  <id>40b9e061-a0de-4d2f-b1f3-bf9552a72b4f</id>
  <item_garment_type_id>f0523ddb-1497-4028-af96-04ce1a05cbcc</item_garment_type_id>
  <item_segment_id>02424e9e-e2fa-4d10-8ad6-0dc253e9892b</item_segment_id>
  <item_service_id>e25f2367-1d13-4249-ac47-7281261bac74</item_service_id>
  <item_type_id>837672e0-aca9-48a3-b46a-1d4cfeae9de0</item_type_id>
  <purchase_price>1</purchase_price>
  <root_code>sample string 9</root_code>
  <sale_price>1</sale_price>
  <size_id>f792c7bc-c92a-488d-aec4-679ce9f84fe0</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 identifier

Response Formats

application/json, text/json

Sample:
"66a8a78a-6246-4ce3-a782-35e9f52f1ad6"

application/xml, text/xml

Sample:
<guid xmlns="http://schemas.microsoft.com/2003/10/Serialization/">66a8a78a-6246-4ce3-a782-35e9f52f1ad6</guid>