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

Request Information

URI Parameters

NameDescriptionTypeAdditional information
siteId

globally unique identifier

None.

Body Parameters

WitnessViewModel
NameDescriptionTypeAdditional information
active

boolean

Required

code

integer

Required

id

globally unique identifier

None.

date_hu

date

None.

local_update

date

None.

site_id

globally unique identifier

Required

status

integer

None.

wash_count

integer

None.

Request Formats

application/json, text/json

Sample:
{
  "active": true,
  "code": 2,
  "id": "cd2293c3-50f9-4b41-a5a5-992c95ecbcb9",
  "date_hu": "2026-03-07T07:36:47.972337+00:00",
  "local_update": "2026-03-07T07:36:47.972337+00:00",
  "site_id": "6fe77292-faad-49f5-b991-6b494d143c9a",
  "status": 1,
  "wash_count": 1
}

application/xml, text/xml

Sample:
<witness xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/EntityModel">
  <active>true</active>
  <code>2</code>
  <date_hu>2026-03-07T07:36:47.972337+00:00</date_hu>
  <id>cd2293c3-50f9-4b41-a5a5-992c95ecbcb9</id>
  <local_update>2026-03-07T07:36:47.972337+00:00</local_update>
  <site_id>6fe77292-faad-49f5-b991-6b494d143c9a</site_id>
  <status>1</status>
  <wash_count>1</wash_count>
</witness>

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

Response Information

Resource Description

globally unique identifier

Response Formats

application/json, text/json

Sample:
"0e4a44a0-b8af-4b8b-89a6-3fbab5250a62"

application/xml, text/xml

Sample:
<guid xmlns="http://schemas.microsoft.com/2003/10/Serialization/">0e4a44a0-b8af-4b8b-89a6-3fbab5250a62</guid>