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

Request Information

URI Parameters

NameDescriptionTypeAdditional information
siteId

globally unique identifier

None.

Body Parameters

DepartmentViewModel
NameDescriptionTypeAdditional information
active

boolean

Required

code

integer

Required

contract_id

globally unique identifier

Required

id

globally unique identifier

None.

item_wash_max

integer

None.

name

string

None.

remark

string

None.

selected_nameplate_id

globally unique identifier

None.

selected_sticker_id

globally unique identifier

None.

Request Formats

application/json, text/json

Sample:
{
  "active": true,
  "code": 2,
  "contract_id": "e3ded978-2f4a-47b1-9ef2-c42c03445587",
  "id": "476a54df-8836-46b6-9da0-b9b19282dfa2",
  "item_wash_max": 1,
  "name": "sample string 5",
  "remark": "sample string 6",
  "selected_nameplate_id": "62bf3f2d-2a42-4d03-b187-3bb69215d643",
  "selected_sticker_id": "229724d1-2ddc-4f99-95ae-bc89c0038bce"
}

application/xml, text/xml

Sample:
<department xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/EntityModel">
  <active>true</active>
  <code>2</code>
  <contract_id>e3ded978-2f4a-47b1-9ef2-c42c03445587</contract_id>
  <id>476a54df-8836-46b6-9da0-b9b19282dfa2</id>
  <item_wash_max>1</item_wash_max>
  <name>sample string 5</name>
  <remark>sample string 6</remark>
  <selected_nameplate_id>62bf3f2d-2a42-4d03-b187-3bb69215d643</selected_nameplate_id>
  <selected_sticker_id>229724d1-2ddc-4f99-95ae-bc89c0038bce</selected_sticker_id>
</department>

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 'DepartmentViewModel'.

Response Information

Resource Description

globally unique identifier

Response Formats

application/json, text/json

Sample:
"80e1bc0f-d49d-4c11-9496-9ac0877ea3da"

application/xml, text/xml

Sample:
<guid xmlns="http://schemas.microsoft.com/2003/10/Serialization/">80e1bc0f-d49d-4c11-9496-9ac0877ea3da</guid>