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": "e024dc4d-bfab-42a7-8216-095adf259193",
  "customer_id": "d06b90a9-a8cf-4d58-a09a-d4208d06c18d",
  "grouping_quantity": 1,
  "id": "627bb60d-27e0-409f-9b1f-6a1b7769473d",
  "item_service_id": "988d2b7e-78c4-4191-9f97-9e59cb0467a0",
  "item_garment_type_id": "9fc28d0e-8cc6-4d42-bae6-815e9b9be1a3",
  "item_segment_id": "9176a91d-c638-46ae-89e7-1dd93e1a63d2",
  "item_type_id": "cf2bb2bc-1681-471f-a446-0716e1a38d11",
  "purchase_price": 1.0,
  "sale_price": 1.0,
  "size_id": "b0fcc160-d378-430f-a9df-ce87f3353696",
  "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>e024dc4d-bfab-42a7-8216-095adf259193</color_id>
  <customer_id>d06b90a9-a8cf-4d58-a09a-d4208d06c18d</customer_id>
  <grouping_quantity>1</grouping_quantity>
  <id>627bb60d-27e0-409f-9b1f-6a1b7769473d</id>
  <item_garment_type_id>9fc28d0e-8cc6-4d42-bae6-815e9b9be1a3</item_garment_type_id>
  <item_segment_id>9176a91d-c638-46ae-89e7-1dd93e1a63d2</item_segment_id>
  <item_service_id>988d2b7e-78c4-4191-9f97-9e59cb0467a0</item_service_id>
  <item_type_id>cf2bb2bc-1681-471f-a446-0716e1a38d11</item_type_id>
  <purchase_price>1</purchase_price>
  <root_code>sample string 9</root_code>
  <sale_price>1</sale_price>
  <size_id>b0fcc160-d378-430f-a9df-ce87f3353696</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:
"32cdeec6-67b5-452f-8417-8da8b96c8743"

application/xml, text/xml

Sample:
<guid xmlns="http://schemas.microsoft.com/2003/10/Serialization/">32cdeec6-67b5-452f-8417-8da8b96c8743</guid>