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

Request Information

URI Parameters

NameDescriptionTypeAdditional information
siteId

globally unique identifier

None.

Body Parameters

DepartmentItemViewModel
NameDescriptionTypeAdditional information
item_code

string

None.

item_descriptions

Dictionary of string [key] and string [value]

None.

selected_sticker_id

globally unique identifier

None.

selected_nameplate_id

globally unique identifier

None.

active

boolean

Required

department_id

globally unique identifier

Required

id

globally unique identifier

None.

physical_item_id

globally unique identifier

None.

service_item_id

globally unique identifier

None.

item_wash_max

integer

None.

quantity

integer

None.

Request Formats

application/json, text/json

Sample:
{
  "item_code": "sample string 1",
  "item_descriptions": {
    "sample string 1": "sample string 2",
    "sample string 3": "sample string 4"
  },
  "selected_sticker_id": "550ec9a2-ca99-454c-8769-d1a772d3e688",
  "selected_nameplate_id": "43b151aa-1c6e-4a48-a817-18e61ed8aa57",
  "active": true,
  "department_id": "91d68636-f0fa-45fc-ab8d-a5dcf386cc8f",
  "id": "30197c91-a149-47de-ad8c-79aa5d77bd13",
  "physical_item_id": "d27e8171-2ca2-4ee7-9346-cd0fbcc7223e",
  "service_item_id": "a4cc9032-8462-4ce8-a71c-bf8fb70c8682",
  "item_wash_max": 1,
  "quantity": 1
}

application/xml, text/xml

Sample:
<department_item xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/EntityModel">
  <active>true</active>
  <department_id>91d68636-f0fa-45fc-ab8d-a5dcf386cc8f</department_id>
  <id>30197c91-a149-47de-ad8c-79aa5d77bd13</id>
  <item_wash_max>1</item_wash_max>
  <physical_item_id>d27e8171-2ca2-4ee7-9346-cd0fbcc7223e</physical_item_id>
  <quantity>1</quantity>
  <service_item_id>a4cc9032-8462-4ce8-a71c-bf8fb70c8682</service_item_id>
  <item_code>sample string 1</item_code>
  <item_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>
  </item_descriptions>
  <selected_nameplate_id>43b151aa-1c6e-4a48-a817-18e61ed8aa57</selected_nameplate_id>
  <selected_sticker_id>550ec9a2-ca99-454c-8769-d1a772d3e688</selected_sticker_id>
</department_item>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'DepartmentItemViewModel'.

Response Information

Resource Description

globally unique identifier

Response Formats

application/json, text/json

Sample:
"2f50a196-06bc-4209-b9a3-5f6a8341a66c"

application/xml, text/xml

Sample:
<guid xmlns="http://schemas.microsoft.com/2003/10/Serialization/">2f50a196-06bc-4209-b9a3-5f6a8341a66c</guid>