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": "e7544af8-396a-40c1-b012-4f4c7649153a",
      "site_id": "9f544268-b48b-43fe-b209-338d15c64022"
    },
    {
      "descriptions": {
        "sample string 1": "sample string 2",
        "sample string 3": "sample string 4"
      },
      "active": true,
      "code": "sample string 2",
      "id": "e7544af8-396a-40c1-b012-4f4c7649153a",
      "site_id": "9f544268-b48b-43fe-b209-338d15c64022"
    }
  ],
  "selected_sticker_id": "cf708bc2-3fe7-48a8-829e-81f0087763c5",
  "selected_nameplate_id": "c09ea1bc-f94e-4072-87e8-bfe5fee1d53a",
  "active": true,
  "certificate_type_id": "6456cb32-896e-4ea9-a7a7-5c1f9f8196fd",
  "code": 1,
  "id": "e0ee3f43-fa0f-43a6-86ab-52e3d86f1718",
  "internal_reference": "sample string 4",
  "item_wash_max": 1,
  "language_code": "sample string 5",
  "name": "sample string 6",
  "packaging_type_id": "0e903f4f-dab1-4931-bb78-645994af72fd",
  "packing_type_id": "6299b65d-0326-418b-a0ee-8110279ef3fc",
  "particles_control": true,
  "peremption_month": 1,
  "peremption_print_cleanroom": true,
  "peremption_print_date": true,
  "peremption_print_expedition": true,
  "permanent_management": true,
  "pool_id": "18547061-3d4d-467c-b582-90ab5ed747fa",
  "remark": "sample string 14",
  "site_customer_id": "b8422fc8-9173-4b87-8efb-3ad6136ca427",
  "sorting_type_id": "b7d56020-0950-4dc2-b980-d86275b5245a",
  "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>6456cb32-896e-4ea9-a7a7-5c1f9f8196fd</certificate_type_id>
  <code>1</code>
  <id>e0ee3f43-fa0f-43a6-86ab-52e3d86f1718</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>0e903f4f-dab1-4931-bb78-645994af72fd</packaging_type_id>
  <packing_type_id>6299b65d-0326-418b-a0ee-8110279ef3fc</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>18547061-3d4d-467c-b582-90ab5ed747fa</pool_id>
  <remark>sample string 14</remark>
  <site_customer_id>b8422fc8-9173-4b87-8efb-3ad6136ca427</site_customer_id>
  <sorting_type_id>b7d56020-0950-4dc2-b980-d86275b5245a</sorting_type_id>
  <type>sample string 17</type>
  <selected_nameplate_id>c09ea1bc-f94e-4072-87e8-bfe5fee1d53a</selected_nameplate_id>
  <selected_sticker_id>cf708bc2-3fe7-48a8-829e-81f0087763c5</selected_sticker_id>
  <washing_processes>
    <washing_process>
      <active>true</active>
      <code>sample string 2</code>
      <id>e7544af8-396a-40c1-b012-4f4c7649153a</id>
      <site_id>9f544268-b48b-43fe-b209-338d15c64022</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>e7544af8-396a-40c1-b012-4f4c7649153a</id>
      <site_id>9f544268-b48b-43fe-b209-338d15c64022</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:
"494fc5ac-9026-4958-b4de-e22abe96e621"

application/xml, text/xml

Sample:
<guid xmlns="http://schemas.microsoft.com/2003/10/Serialization/">494fc5ac-9026-4958-b4de-e22abe96e621</guid>