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": "e5ee788f-877a-42f6-9a81-d89643a60cbc",
  "customer_id": "639b9798-a31d-4666-80aa-b44ad010ab7f",
  "grouping_quantity": 1,
  "id": "fbc43b58-db26-431b-967c-47e747fd713a",
  "item_service_id": "19648be8-71a1-49df-9ce3-f69b2a2eafe5",
  "item_garment_type_id": "c683fbea-7f29-45b6-9f72-afa5f9b95ca3",
  "item_segment_id": "4c8b4f5d-e5ef-42ce-a6b3-abb8345e51f7",
  "item_type_id": "86d54d3c-8074-4daa-b599-b9a61a5ab721",
  "purchase_price": 1.0,
  "sale_price": 1.0,
  "size_id": "aa85de93-dde0-4475-ac58-cfcacadc796e",
  "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>e5ee788f-877a-42f6-9a81-d89643a60cbc</color_id>
  <customer_id>639b9798-a31d-4666-80aa-b44ad010ab7f</customer_id>
  <grouping_quantity>1</grouping_quantity>
  <id>fbc43b58-db26-431b-967c-47e747fd713a</id>
  <item_garment_type_id>c683fbea-7f29-45b6-9f72-afa5f9b95ca3</item_garment_type_id>
  <item_segment_id>4c8b4f5d-e5ef-42ce-a6b3-abb8345e51f7</item_segment_id>
  <item_service_id>19648be8-71a1-49df-9ce3-f69b2a2eafe5</item_service_id>
  <item_type_id>86d54d3c-8074-4daa-b599-b9a61a5ab721</item_type_id>
  <purchase_price>1</purchase_price>
  <root_code>sample string 9</root_code>
  <sale_price>1</sale_price>
  <size_id>aa85de93-dde0-4475-ac58-cfcacadc796e</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:
"469b4bee-5f2d-4322-a886-76125cedb500"

application/xml, text/xml

Sample:
<guid xmlns="http://schemas.microsoft.com/2003/10/Serialization/">469b4bee-5f2d-4322-a886-76125cedb500</guid>