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": "48fd9d8d-cdfa-4493-9d58-0b998813bd56",
  "customer_id": "c2dccfe1-d5a7-41f8-be6d-7c49c6617b52",
  "grouping_quantity": 1,
  "id": "66666d76-8c59-42c2-87e9-a6d1b31eeb15",
  "item_service_id": "6cd15c80-e1ac-416f-8db0-3f8ee93fc6ab",
  "item_garment_type_id": "0d484413-de6e-4e10-817e-5c18b8af095a",
  "item_segment_id": "7cee5334-4ba7-4620-a724-e878b7aba7a0",
  "item_type_id": "ae0355d1-8092-487a-b2f2-75b8e2cd4d06",
  "purchase_price": 1.0,
  "sale_price": 1.0,
  "size_id": "2224a86e-db3b-4d63-a230-90088b160717",
  "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>48fd9d8d-cdfa-4493-9d58-0b998813bd56</color_id>
  <customer_id>c2dccfe1-d5a7-41f8-be6d-7c49c6617b52</customer_id>
  <grouping_quantity>1</grouping_quantity>
  <id>66666d76-8c59-42c2-87e9-a6d1b31eeb15</id>
  <item_garment_type_id>0d484413-de6e-4e10-817e-5c18b8af095a</item_garment_type_id>
  <item_segment_id>7cee5334-4ba7-4620-a724-e878b7aba7a0</item_segment_id>
  <item_service_id>6cd15c80-e1ac-416f-8db0-3f8ee93fc6ab</item_service_id>
  <item_type_id>ae0355d1-8092-487a-b2f2-75b8e2cd4d06</item_type_id>
  <purchase_price>1</purchase_price>
  <root_code>sample string 9</root_code>
  <sale_price>1</sale_price>
  <size_id>2224a86e-db3b-4d63-a230-90088b160717</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:
"827a3b0b-f7a1-4cce-8baa-184fbf393703"

application/xml, text/xml

Sample:
<guid xmlns="http://schemas.microsoft.com/2003/10/Serialization/">827a3b0b-f7a1-4cce-8baa-184fbf393703</guid>