HTTP proxy API in front of TIMIFY GraphQL services. Generated from Express routes and route analysis docs.
- Import or update timeshift
TIMIFY Developer API GraphQL Proxy (0.0.4)
Request
This endpoint creates shifts for a resource on a selected date. It enables the user to create work and booking shifts. There is also an option to create non-workable shifts, for example "VACATION", "SICK" or "BLOCKER" shifts If you select the "BLOCKER" as the denial_reason, parameters working_times and booking_times will be ignored Examples: - Work shift: { "from": "2023-10-02", "to": "2023-10-02", "resource_id": "64759027a6f9909999a59431", "working_times": [ { "begin": "08:00", "end": "14:40" }, { "begin": "15:00", "end": "18:00" } ], "booking_times": [ { "begin": "08:00", "end": "14:40" }, { "begin": "15:00", "end": "18:00" } ] } - Vacation: { "denial_reason": "VACATION", "from": "2020-10-20", "to": "2020-10-22", "resource_id": "5f61c6381a34817e5c7fa220", "denial_times": [ { "begin": "00:00", "end": "24:00" } ] } - Sick: { "denial_reason": "SICK", "from": "2020-10-20", "to": "2020-10-22", "resource_id": "5f61c6381a34817e5c7fa220", "denial_times": [ { "begin": "00:00", "end": "24:00" } ] } - Blocker: working_times and booking_times parameters are ignored { "denial_reason": "BLOCKER", "from": "2020-10-20", "to": "2020-10-22", "resource_id": "5f61c6381a34817e5c7fa220", "denial_times": [ { "begin": "00:00", "end": "24:00" } ] }
- Mock serverhttps://docs2.timify.com/_mock/apis/openapi/v1/timeshifts
- Productionhttps://api.timify.com/v1/timeshifts
- Staginghttps://api-stg.timify.com/v1/timeshifts
- Local developmenthttp://localhost:3030/v1/timeshifts
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://docs2.timify.com/_mock/apis/openapi/v1/timeshifts \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-H 'company-id: 65f4c840b6f1a10012ab34cd' \
-d '{
"resource_id": "65f4c840b6f1a10012ab34cd",
"external_resource_id": "65f4c840b6f1a10012ab34cd",
"from": "2026-03-10",
"to": "2026-03-11",
"denial_times": [
{
"begin": "08:00",
"end": "17:00"
}
],
"working_times": [
{
"begin": "08:00",
"end": "17:00"
}
],
"booking_times": [
{
"begin": "08:00",
"end": "17:00"
}
],
"denial_reason": "VACATION"
}'{ "data": { "id": "65f6e062d8h3c31234cd56eg", "resourceId": "62ee11a91d66269c365407b1", "resourceName": "John Smith", "days": [ … ], "workingTimes": [ … ], "bookingTimes": [ … ], "shiftType": "WORKING", "createdAt": "2024-03-07T10:30:00Z", "updatedAt": "2024-03-07T10:30:00Z", "ts": 1709823000 }, "status": 1 }
Request
This endpoint bulk imports shifts for users. It enables the user to create work and booking shifts. There is also an option to create non-workable shifts, for example "VACATION", "SICK" or "BLOCKER" shifts If you select the "BLOCKER" as the denialReason, parameters workingTimes and bookingTimes will be ignored. You have to be very careful because the variables here are sent in camelCase. Since all records from this method are not added live, but belatedly we give you the ability to receive progress information via a webhook. You will receive information at the address specified by you as soon as some of the chunks have been processed. To make it easier for you to follow what is happening for each record, you have the option of adding an additional field importShiftAllowanceId or importShiftDenialId. Shift examples: - Work shift: { "interval": { "begin": "2023-10-02", "end": "2023-10-02" }, "resourceId": "64759027a6f9909999a59431", "workingTimes": [ { "begin": "08:00", "end": "14:40" }, { "begin": "15:00", "end": "18:00" } ], "bookingTimes": [ { "begin": "08:00", "end": "14:40" }, { "begin": "15:00", "end": "18:00" } ] } - Vacation: { "denialReason": "VACATION", "interval": { "begin": "2023-10-20", "end": "2023-10-22" }, "resourceId": "5f61c6381a34817e5c7fa220", "denialTimes": [ { "begin": "00:00", "end": "24:00" } ] } - Sick: { "denialReason": "SICK", "interval": { "begin": "2023-10-20", "end": "2023-10-22" }, "resourceId": "5f61c6381a34817e5c7fa220", "denialTimes": [ { "begin": "00:00", "end": "24:00" } ] } - Blocker: workingTimes and bookingTimes parameters are ignored { "denialReason": "BLOCKER", "interval": { "begin": "2023-10-20", "end": "2023-10-22" }, "resourceId": "5f61c6381a34817e5c7fa220", "denialTimes": [ { "begin": "00:00", "end": "24:00" } ] }
- Mock serverhttps://docs2.timify.com/_mock/apis/openapi/v1/timeshifts/import/bulk
- Productionhttps://api.timify.com/v1/timeshifts/import/bulk
- Staginghttps://api-stg.timify.com/v1/timeshifts/import/bulk
- Local developmenthttp://localhost:3030/v1/timeshifts/import/bulk
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://docs2.timify.com/_mock/apis/openapi/v1/timeshifts/import/bulk \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-H 'company-id: 65f4c840b6f1a10012ab34cd' \
-d '{
"shifts": [
{
"resourceId": "62ee11a91d66269c365407b1",
"externalResourceId": "string",
"interval": {
"begin": "08:00",
"end": "17:00"
},
"workingTimes": [
{
"begin": "08:00",
"end": "17:00"
}
],
"bookingTimes": [
{
"begin": "08:00",
"end": "17:00"
}
],
"denialTimes": [
{
"begin": "08:00",
"end": "17:00"
}
],
"denialReason": "VACATION"
}
],
"url": "https://example.com",
"secret": "example",
"skip_emitter": "example"
}'{ "data": { "created": 5, "updated": 2, "failed": 0, "results": [ … ] }, "status": 1 }
- Mock serverhttps://docs2.timify.com/_mock/apis/openapi/v1/timeshifts/{timeshiftId}
- Productionhttps://api.timify.com/v1/timeshifts/{timeshiftId}
- Staginghttps://api-stg.timify.com/v1/timeshifts/{timeshiftId}
- Local developmenthttp://localhost:3030/v1/timeshifts/{timeshiftId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
https://docs2.timify.com/_mock/apis/openapi/v1/timeshifts/65f4c840b6f1a10012ab34cd \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'company-id: 65f4c840b6f1a10012ab34cd'{ "data": { "id": "65f4c840b6f1a10012ab34cd", "resourceId": "62ee11a91d66269c365407b1", "resourceName": "John Smith", "days": [ … ], "workingTimes": [ … ], "deletedAt": "2024-03-07T11:30:00Z", "ts": 1709823000 }, "status": 1 }