Skip to content

Create a template

Creates a shift template (all-day, timed, or split).

POST
/v1/templates
curl --request POST \
--url https://api.shiftsync.app/v1/templates \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "title": "string", "shortTitle": "string", "notes": "string", "colorId": 0, "icon": { "type": "icon", "name": "moon" }, "visibility": "public", "payRateMinor": 0, "allDay": true, "isSplit": true, "startTime": "string", "endTime": "string", "splitStartTime": "string", "splitEndTime": "string" }'
Media typeapplication/json
object
title
required
string
>= 1 characters <= 255 characters
shortTitle
required
string
<= 255 characters
notes
string
colorId
required
integer
<= 9007199254740991
icon
One of:
object
type
required
string
Allowed values: icon
name
required
string
Allowed values: moon sunrise sun sunset holiday-umbrella
visibility
required
string
Allowed values: public private hidden
payRateMinor
integer
nullable <= 9007199254740991
allDay
boolean
isSplit
boolean
startTime
string
endTime
string
splitStartTime
string
splitEndTime
string
Example
{
"title": "string",
"shortTitle": "string",
"notes": "string",
"colorId": 0,
"icon": {
"type": "icon",
"name": "moon"
},
"visibility": "public",
"payRateMinor": 0,
"allDay": true,
"isSplit": true,
"startTime": "string",
"endTime": "string",
"splitStartTime": "string",
"splitEndTime": "string"
}

The created template

Media typeapplication/json
object
item
required
object
id
required
integer
>= -9007199254740991 <= 9007199254740991
title
required
string
shortTitle
required
string
notes
string
colorId
required
integer
>= -9007199254740991 <= 9007199254740991
icon
One of:
object
type
required
string
Allowed values: icon
name
required
string
Allowed values: moon sunrise sun sunset holiday-umbrella
userId
required
integer
>= -9007199254740991 <= 9007199254740991
visibility
required
string
Allowed values: public private hidden
payRateMinor
integer
nullable >= -9007199254740991 <= 9007199254740991
Any of:
object
allDay
required
boolean
Example
{
"item": {
"id": 0,
"title": "string",
"shortTitle": "string",
"notes": "string",
"colorId": 0,
"icon": {
"type": "icon",
"name": "moon"
},
"userId": 0,
"visibility": "public",
"payRateMinor": 0,
"allDay": true
}
}