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

Request Information

URI Parameters

NameDescriptionTypeAdditional information
siteId

globally unique identifier

None.

Body Parameters

ContractItemViewModel
NameDescriptionTypeAdditional information
item_descriptions

Dictionary of string [key] and string [value]

None.

item_code

string

None.

selected_sticker_id

globally unique identifier

None.

selected_nameplate_id

globally unique identifier

None.

active

boolean

Required

contract_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_descriptions": {
    "sample string 1": "sample string 2",
    "sample string 3": "sample string 4"
  },
  "item_code": "sample string 1",
  "selected_sticker_id": "6624e7f3-21be-4485-8cd4-c5cbe7f05ca2",
  "selected_nameplate_id": "af79169b-5c41-48aa-97dc-d291b5b8178d",
  "active": true,
  "contract_id": "3007b147-062f-47f6-92d5-3441d3acb953",
  "id": "f58b5d1e-8a33-4e27-acfe-95403295a6f1",
  "physical_item_id": "55ff6320-786c-47b1-93fe-a2cd291093bc",
  "service_item_id": "71c26b97-9c5b-44a5-968e-bd97de0d238f",
  "item_wash_max": 1,
  "quantity": 1
}

application/xml, text/xml

Sample:
<contract_item xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/EntityModel">
  <active>true</active>
  <contract_id>3007b147-062f-47f6-92d5-3441d3acb953</contract_id>
  <id>f58b5d1e-8a33-4e27-acfe-95403295a6f1</id>
  <item_wash_max>1</item_wash_max>
  <physical_item_id>55ff6320-786c-47b1-93fe-a2cd291093bc</physical_item_id>
  <quantity>1</quantity>
  <service_item_id>71c26b97-9c5b-44a5-968e-bd97de0d238f</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>af79169b-5c41-48aa-97dc-d291b5b8178d</selected_nameplate_id>
  <selected_sticker_id>6624e7f3-21be-4485-8cd4-c5cbe7f05ca2</selected_sticker_id>
</contract_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 'ContractItemViewModel'.

Response Information

Resource Description

globally unique identifier

Response Formats

application/json, text/json

Sample:
"41e03a80-368b-41a2-856f-9c93c3b76c63"

application/xml, text/xml

Sample:
<guid xmlns="http://schemas.microsoft.com/2003/10/Serialization/">41e03a80-368b-41a2-856f-9c93c3b76c63</guid>