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": "5eb40a9a-00eb-43bc-80a0-25a225f7f3c4",
  "customer_id": "fc591d46-8661-4d1a-bfa4-536374b59c6c",
  "grouping_quantity": 1,
  "id": "4674d67b-d3a9-4c22-b2dd-d646f813f595",
  "item_service_id": "03eda63a-0b6d-4fe0-93aa-55a7f9c828da",
  "item_garment_type_id": "76b8daf0-3c19-4de2-8a93-449105a773ec",
  "item_segment_id": "1eb16975-b7b9-4e6e-ae1a-f89d64394c93",
  "item_type_id": "9f8d3e90-5f60-43f3-ab20-6b118230c155",
  "purchase_price": 1.0,
  "sale_price": 1.0,
  "size_id": "00e66cf4-2df9-48d4-8b42-75125583f2d5",
  "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>5eb40a9a-00eb-43bc-80a0-25a225f7f3c4</color_id>
  <customer_id>fc591d46-8661-4d1a-bfa4-536374b59c6c</customer_id>
  <grouping_quantity>1</grouping_quantity>
  <id>4674d67b-d3a9-4c22-b2dd-d646f813f595</id>
  <item_garment_type_id>76b8daf0-3c19-4de2-8a93-449105a773ec</item_garment_type_id>
  <item_segment_id>1eb16975-b7b9-4e6e-ae1a-f89d64394c93</item_segment_id>
  <item_service_id>03eda63a-0b6d-4fe0-93aa-55a7f9c828da</item_service_id>
  <item_type_id>9f8d3e90-5f60-43f3-ab20-6b118230c155</item_type_id>
  <purchase_price>1</purchase_price>
  <root_code>sample string 9</root_code>
  <sale_price>1</sale_price>
  <size_id>00e66cf4-2df9-48d4-8b42-75125583f2d5</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:
"99b02e68-f674-4d9e-bfc0-d9951e210d2d"

application/xml, text/xml

Sample:
<guid xmlns="http://schemas.microsoft.com/2003/10/Serialization/">99b02e68-f674-4d9e-bfc0-d9951e210d2d</guid>