upsertShift
WRITEUpsert shift.
POST /api/v1/people/upsertShift
curl -X POST '<your-host>/api/v1/people/upsertShift' \
-H 'Authorization: Bearer <api-key>' \
-H 'Content-Type: application/json' \
-d '{
"name": "string",
"startTime": "string",
"endTime": "string",
"locationId": "string",
"_operation": "create"
}'Response
{
"active": true,
"companyId": "string",
"createdAt": "string",
"createdBy": "string",
"customFields": "…",
"endTime": "string",
"friday": true,
"id": "string",
"locationId": "string",
"monday": true,
"name": "string",
"saturday": true,
"startTime": "string",
"sunday": true,
"tags": [
"string"
],
"thursday": true,
"tuesday": true,
"updatedAt": "string",
"updatedBy": "string",
"wednesday": true
}Parameters
ParameterType
Required. 'create' inserts a new record, 'update' modifies the existing record with this id.
"create""update"
min length 1
min length 1
min length 1
min length 1
Input schema
schema
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1
},
"startTime": {
"type": "string",
"minLength": 1
},
"endTime": {
"type": "string",
"minLength": 1
},
"locationId": {
"type": "string",
"minLength": 1
},
"monday": {
"type": "boolean"
},
"tuesday": {
"type": "boolean"
},
"wednesday": {
"type": "boolean"
},
"thursday": {
"type": "boolean"
},
"friday": {
"type": "boolean"
},
"saturday": {
"type": "boolean"
},
"sunday": {
"type": "boolean"
},
"customFields": {},
"id": {
"type": "string"
},
"_operation": {
"type": "string",
"enum": [
"create",
"update"
],
"description": "Required. 'create' inserts a new record, 'update' modifies the existing record with this id."
}
},
"required": [
"name",
"startTime",
"endTime",
"locationId",
"_operation"
]
}