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

Request Information

URI Parameters

NameDescriptionTypeAdditional information
siteId

globally unique identifier

None.

Body Parameters

ContractViewModel
NameDescriptionTypeAdditional information
washing_processes

Collection of WashingProcessViewModel

None.

selected_sticker_id

globally unique identifier

None.

selected_nameplate_id

globally unique identifier

None.

active

boolean

Required

certificate_type_id

globally unique identifier

Required

code

integer

None.

id

globally unique identifier

None.

internal_reference

string

String length: inclusive between 0 and 50

item_wash_max

integer

None.

language_code

string

Required

String length: inclusive between 0 and 10

name

string

Required

String length: inclusive between 0 and 100

packaging_type_id

globally unique identifier

Required

packing_type_id

globally unique identifier

Required

particles_control

boolean

Required

peremption_month

integer

None.

peremption_print_cleanroom

boolean

Required

peremption_print_date

boolean

Required

peremption_print_expedition

boolean

Required

permanent_management

boolean

Required

pool_id

globally unique identifier

None.

remark

string

None.

site_customer_id

globally unique identifier

Required

sorting_type_id

globally unique identifier

Required

type

string

Required

String length: inclusive between 0 and 1

Request Formats

application/json, text/json

Sample:
{
  "washing_processes": [
    {
      "descriptions": {
        "sample string 1": "sample string 2",
        "sample string 3": "sample string 4"
      },
      "active": true,
      "code": "sample string 2",
      "id": "1fa69261-3150-41d2-a9f4-eacfaec5fb6c",
      "site_id": "a1fcba0c-5e7c-4dad-bf49-65b6deb316a2"
    },
    {
      "descriptions": {
        "sample string 1": "sample string 2",
        "sample string 3": "sample string 4"
      },
      "active": true,
      "code": "sample string 2",
      "id": "1fa69261-3150-41d2-a9f4-eacfaec5fb6c",
      "site_id": "a1fcba0c-5e7c-4dad-bf49-65b6deb316a2"
    }
  ],
  "selected_sticker_id": "53930ff2-7ff8-4af3-93ee-de31ef0b7e45",
  "selected_nameplate_id": "6e648562-fb7c-419e-8bdd-0acbfef83207",
  "active": true,
  "certificate_type_id": "a29a8687-37b7-4262-9816-a491578e9a78",
  "code": 1,
  "id": "964a32ec-0dc5-4b0e-a772-89c2979ac133",
  "internal_reference": "sample string 4",
  "item_wash_max": 1,
  "language_code": "sample string 5",
  "name": "sample string 6",
  "packaging_type_id": "71e0b99f-b4ca-4603-9db9-f9d53b181aff",
  "packing_type_id": "6cb7caca-2cb5-4d2c-b56e-1090dca96cf5",
  "particles_control": true,
  "peremption_month": 1,
  "peremption_print_cleanroom": true,
  "peremption_print_date": true,
  "peremption_print_expedition": true,
  "permanent_management": true,
  "pool_id": "b5a3eb1b-fcea-45d0-b4a3-4a7effd3217f",
  "remark": "sample string 14",
  "site_customer_id": "db30815a-bc4f-46dd-bdd3-b13ecb1e9a52",
  "sorting_type_id": "41b71185-e594-4677-96d3-eecc15eb57f6",
  "type": "sample string 17"
}

application/xml, text/xml

Sample:
<contract xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/EntityModel">
  <active>true</active>
  <certificate_type_id>a29a8687-37b7-4262-9816-a491578e9a78</certificate_type_id>
  <code>1</code>
  <id>964a32ec-0dc5-4b0e-a772-89c2979ac133</id>
  <internal_reference>sample string 4</internal_reference>
  <item_wash_max>1</item_wash_max>
  <language_code>sample string 5</language_code>
  <name>sample string 6</name>
  <packaging_type_id>71e0b99f-b4ca-4603-9db9-f9d53b181aff</packaging_type_id>
  <packing_type_id>6cb7caca-2cb5-4d2c-b56e-1090dca96cf5</packing_type_id>
  <particles_control>true</particles_control>
  <peremption_month>1</peremption_month>
  <peremption_print_cleanroom>true</peremption_print_cleanroom>
  <peremption_print_date>true</peremption_print_date>
  <peremption_print_expedition>true</peremption_print_expedition>
  <permanent_management>true</permanent_management>
  <pool_id>b5a3eb1b-fcea-45d0-b4a3-4a7effd3217f</pool_id>
  <remark>sample string 14</remark>
  <site_customer_id>db30815a-bc4f-46dd-bdd3-b13ecb1e9a52</site_customer_id>
  <sorting_type_id>41b71185-e594-4677-96d3-eecc15eb57f6</sorting_type_id>
  <type>sample string 17</type>
  <selected_nameplate_id>6e648562-fb7c-419e-8bdd-0acbfef83207</selected_nameplate_id>
  <selected_sticker_id>53930ff2-7ff8-4af3-93ee-de31ef0b7e45</selected_sticker_id>
  <washing_processes>
    <washing_process>
      <active>true</active>
      <code>sample string 2</code>
      <id>1fa69261-3150-41d2-a9f4-eacfaec5fb6c</id>
      <site_id>a1fcba0c-5e7c-4dad-bf49-65b6deb316a2</site_id>
      <descriptions xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:KeyValueOfstringstring>
          <d4p1:Key>sample string 1</d4p1:Key>
          <d4p1:Value>sample string 2</d4p1:Value>
        </d4p1:KeyValueOfstringstring>
        <d4p1:KeyValueOfstringstring>
          <d4p1:Key>sample string 3</d4p1:Key>
          <d4p1:Value>sample string 4</d4p1:Value>
        </d4p1:KeyValueOfstringstring>
      </descriptions>
    </washing_process>
    <washing_process>
      <active>true</active>
      <code>sample string 2</code>
      <id>1fa69261-3150-41d2-a9f4-eacfaec5fb6c</id>
      <site_id>a1fcba0c-5e7c-4dad-bf49-65b6deb316a2</site_id>
      <descriptions xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:KeyValueOfstringstring>
          <d4p1:Key>sample string 1</d4p1:Key>
          <d4p1:Value>sample string 2</d4p1:Value>
        </d4p1:KeyValueOfstringstring>
        <d4p1:KeyValueOfstringstring>
          <d4p1:Key>sample string 3</d4p1:Key>
          <d4p1:Value>sample string 4</d4p1:Value>
        </d4p1:KeyValueOfstringstring>
      </descriptions>
    </washing_process>
  </washing_processes>
</contract>

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

Response Information

Resource Description

globally unique identifier

Response Formats

application/json, text/json

Sample:
"e2f5ff94-aaea-410d-ba8f-5f03eced87ab"

application/xml, text/xml

Sample:
<guid xmlns="http://schemas.microsoft.com/2003/10/Serialization/">e2f5ff94-aaea-410d-ba8f-5f03eced87ab</guid>