POST api/shifts/addShift

Request Information

URI Parameters

None.

Body Parameters

Shift
NameDescriptionTypeAdditional information
iShift

globally unique identifier

None.

code

string

None.

startTime

time interval

None.

endTime

time interval

None.

description

string

None.

visible

boolean

None.

createdAt

date

None.

updatedAt

date

None.

customFields

Collection of CustomFieldValue

None.

Request Formats

application/json, text/json

Sample:
{
  "iShift": "666debba-a195-4441-8e90-4089613b363f",
  "code": "sample string 2",
  "startTime": "00:00:00.1234567",
  "endTime": "00:00:00.1234567",
  "description": "sample string 5",
  "visible": true,
  "createdAt": "2025-12-11T06:41:45.2337939-08:00",
  "updatedAt": "2025-12-11T06:41:45.2337939-08:00",
  "customFields": [
    {
      "iCustomFieldValue": "5a68ea5d-6ddb-4092-b5aa-370278219e7d",
      "iCustomField": "043f01d1-be6f-4807-be63-a389890d9fec",
      "iCustomTable": "a8577e77-87d7-4f17-ae11-0e8c1fe311e4",
      "iContext": "f60532b9-39c8-439c-86e8-c1e28f405a6c",
      "name": "sample string 5",
      "datatype": "sample string 6",
      "defaultValue": "sample string 7",
      "options": "sample string 8",
      "required": true,
      "value": "sample string 10"
    },
    {
      "iCustomFieldValue": "5a68ea5d-6ddb-4092-b5aa-370278219e7d",
      "iCustomField": "043f01d1-be6f-4807-be63-a389890d9fec",
      "iCustomTable": "a8577e77-87d7-4f17-ae11-0e8c1fe311e4",
      "iContext": "f60532b9-39c8-439c-86e8-c1e28f405a6c",
      "name": "sample string 5",
      "datatype": "sample string 6",
      "defaultValue": "sample string 7",
      "options": "sample string 8",
      "required": true,
      "value": "sample string 10"
    }
  ]
}

application/xml, text/xml

Sample:
<Shift xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/eDHRApi.Models.Shifts">
  <code>sample string 2</code>
  <createdAt>2025-12-11T06:41:45.2337939-08:00</createdAt>
  <customFields xmlns:d2p1="http://schemas.datacontract.org/2004/07/eDHRApi.Models.Custom">
    <d2p1:CustomFieldValue>
      <d2p1:datatype>sample string 6</d2p1:datatype>
      <d2p1:defaultValue>sample string 7</d2p1:defaultValue>
      <d2p1:iContext>f60532b9-39c8-439c-86e8-c1e28f405a6c</d2p1:iContext>
      <d2p1:iCustomField>043f01d1-be6f-4807-be63-a389890d9fec</d2p1:iCustomField>
      <d2p1:iCustomFieldValue>5a68ea5d-6ddb-4092-b5aa-370278219e7d</d2p1:iCustomFieldValue>
      <d2p1:iCustomTable>a8577e77-87d7-4f17-ae11-0e8c1fe311e4</d2p1:iCustomTable>
      <d2p1:name>sample string 5</d2p1:name>
      <d2p1:options>sample string 8</d2p1:options>
      <d2p1:required>true</d2p1:required>
      <d2p1:value>sample string 10</d2p1:value>
    </d2p1:CustomFieldValue>
    <d2p1:CustomFieldValue>
      <d2p1:datatype>sample string 6</d2p1:datatype>
      <d2p1:defaultValue>sample string 7</d2p1:defaultValue>
      <d2p1:iContext>f60532b9-39c8-439c-86e8-c1e28f405a6c</d2p1:iContext>
      <d2p1:iCustomField>043f01d1-be6f-4807-be63-a389890d9fec</d2p1:iCustomField>
      <d2p1:iCustomFieldValue>5a68ea5d-6ddb-4092-b5aa-370278219e7d</d2p1:iCustomFieldValue>
      <d2p1:iCustomTable>a8577e77-87d7-4f17-ae11-0e8c1fe311e4</d2p1:iCustomTable>
      <d2p1:name>sample string 5</d2p1:name>
      <d2p1:options>sample string 8</d2p1:options>
      <d2p1:required>true</d2p1:required>
      <d2p1:value>sample string 10</d2p1:value>
    </d2p1:CustomFieldValue>
  </customFields>
  <description>sample string 5</description>
  <endTime>PT0.1234567S</endTime>
  <iShift>666debba-a195-4441-8e90-4089613b363f</iShift>
  <startTime>PT0.1234567S</startTime>
  <updatedAt>2025-12-11T06:41:45.2337939-08:00</updatedAt>
  <visible>true</visible>
</Shift>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

IHttpActionResult

None.

Response Formats

application/json, text/json, application/xml, text/xml

Sample:

Sample not available.