Download OpenAPI specification:
Welcome to the Shyft API!
Shyft Integration API is designed for helping data integration between Shyft and Shyft partners' systems. It provides a real time, two-way data synchronization solution.
Shyft Integration API can perform differently based on customer's configuration and requirements.
NOTES:
R stands for Required. API keys are required to access Shyft integration APIs. Please contact Shyft's sales team if you do not have one.
API keys should be attached in API headers with key/value format listed below:
| Header | Value |
|---|---|
| X-Api-Key | {{api_key}} |
| X-Api-Uuid | {{api_uuid}} |
Global information are applicable for all APIs with same categories.
| Name | Values | R | Description |
|---|---|---|---|
| Version | 6_0_0 | * | Version number. Ex: 6_0_0 |
| Content-Type | application/json | * |
Please ignore these attributes in API response, it is used by Shyft.
"_associations_removed": true,
"_parent_object_id": null,
| Success Code | Meaning |
|---|---|
| 200 | Created -- Objet created. |
| 201 | Unauthorized -- Your API key is wrong. |
| 204 | No Content -- Success without returning resource. |
| Error Code | Meaning |
|---|---|
| 400 | Bad Request -- Your is invalid. |
| 401 | Unauthorized -- Your API key is wrong. |
| 403 | Forbidden -- The records requested is hidden for administrators only. |
| 404 | Not Found -- The specified record could not be found. |
| 405 | Method Not Allowed -- You tried to access a record with an invalid method. |
| 406 | Not Acceptable -- You requested a format that isn't json. |
| 410 | Gone -- The record requested has been removed from our servers. |
| 422 | Unprocessable Entity -- Invalid input data. |
| 429 | Too Many Requests -- You're requesting too many requests! Slow down! |
| 500 | Internal Server Error -- We had a problem with our server. Try again later. |
| 502 | Bad Gateway -- |
| 504 | Gateway Timeout -- |
| 503 | Service Unavailable -- We're temporarily offline for maintenance. Please try again later. |
422
{
"errors": {
"base": [
"a private session for same two users already exists: 3034"
]
}
}
422
{
"errors": {
"google_map_id": [
"can't be blank"
],
"time_zone": [
"can't be blank"
],
"longitude": [
"can't be blank"
]
}
}
404
{
"errors": {
"not_found": [
"Couldn't find Post"
]
}
}
500
{
"errors": {
"internal_server_error": [
"Invalid nil value"
]
}
}
User Privilege stands for the connection between user and location.
Each user can be associated with many different locations, and each location can have many different users.
Description
Remove specific user from the locations within your organization.
Path Params
| Param | Values | R | Description |
|---|---|---|---|
| internal_id | employee ID | * | The global unique employee ID in your organization |
Input
| Attribute | Values | R | Description |
|---|
| internal_id required | string |
string |
| X-Api-Key | string Example: {{api_key}} |
| X-Api-Uuid | string Example: {{api_uuid}} |
{ }Shifts stands for the schedules already assigned to employees or need to be covered(open shifts).
Description
Synchronize multiple shifts (create, update, delete)
This API can import existing users' shifts.
This API can update existing shifts' changes.
This API can remove existing shifts.
This API can update existing shift or create it if not created yet.
With async_mode=false, the server will process the data immediately and return the processed data. It should only be used for small amount of data.
With async_mode=true, the server will process the data in background and return a job ID. The job processing result can be pulled by calling Action Job API.
Input
2018-04-01 09:00:00 UTC. Otherwise it will be treated as shift location
's local time in case like 2018-04-01 09:00:00.| Attribute | Values | R | Description |
|---|---|---|---|
| _record_action | create| update| delete| update_or_create | * | For update_or_create, it will update existing shift or create it if not found |
| shift_reference_id | * | Shift's global unique ID from partner's system | |
| employee_id | * | Employee assigned to this shift. Not supply it for open shift |
|
| start_at | * | Shift's start time. | |
| end_at | * | Shift's end time. | |
| site_reference_id | * | Shift location's global unique ID from partner's system. | |
| segments | Sub Array | If there are segments | |
| segment_reference_id | Segment's global unique ID | ||
| start_at | Segment start time. | ||
| start_at | Segment end time. | ||
| job_code | Segment job code | ||
| department_code | Segment department code |
| async_mode | boolean Example: async_mode=true |
| X-Api-Key | string Example: {{api_key}} |
| X-Api-Uuid | string Example: {{api_uuid}} |
{- "shifts": [
- {
- "_record_action": "create",
- "shift_reference_id": "sample_shift_001",
- "employee_id": "sample_employee_001",
- "start_at": "2021-04-01 09:00:00 UTC",
- "end_at": "2021-04-01 16:00:00 UTC",
- "site_reference_id": "sample_site_001",
- "segments": [
- {
- "segment_reference_id": "sample_segment_001_001",
- "start_at": "2021-04-01 09:00:00 UTC",
- "end_at": "2021-04-01 16:00:00 UTC",
- "job_code": "chef",
- "department_code": "panda_express"
}, - {
- "segment_reference_id": "sample_segment_001_002",
- "start_at": "2021-04-01 17:00:00 UTC",
- "end_at": "2021-04-01 21:00:00 UTC",
- "job_code": "chef",
- "department_code": "panda_express"
}
]
}, - {
- "_record_action": "update",
- "shift_reference_id": "sample_shift_002",
- "employee_id": "sample_employee_001",
- "start_at": "2021-04-01 09:00:00 UTC",
- "end_at": "2021-04-01 16:00:00 UTC",
- "site_reference_id": "sample_site_001",
- "segments": [
- {
- "segment_reference_id": "sample_segment_002_001",
- "start_at": "2021-04-01 09:00:00 UTC",
- "end_at": "2021-04-01 16:00:00 UTC",
- "job_code": "chef",
- "department_code": "panda_express"
}, - {
- "segment_reference_id": "sample_segment_002_002",
- "start_at": "2021-04-01 17:00:00 UTC",
- "end_at": "2021-04-01 21:00:00 UTC",
- "job_code": "chef",
- "department_code": "panda_express"
}
]
}, - {
- "_record_action": "update",
- "shift_reference_id": "sample_shift_003"
}
]
}{- "shifts": [
- {
- "_parent_object_id": null,
- "id": 2608325,
- "start_at": "2021-04-01 16:00:00 UTC",
- "end_at": "2021-04-01 23:00:00 UTC",
- "taker_id": 14274,
- "shift_reference_id": "sample_shift_001",
- "employee_id": "sample_employee_001",
- "site_reference_id": "sample_site_001",
- "segments": [
- {
- "_parent_object_id": 2608325,
- "id": 4335279,
- "department_code": "panda_express",
- "job_code": "chef",
- "start_at": "2021-04-01 16:00:00 UTC",
- "end_at": "2021-04-01 23:00:00 UTC"
}, - {
- "_parent_object_id": 2608325,
- "id": 4335280,
- "department_code": "panda_express",
- "job_code": "chef",
- "start_at": "2021-04-02 00:00:00 UTC",
- "end_at": "2021-04-02 04:00:00 UTC"
}
]
}
]
}Description
Get the job status by giving a action_job ID.
It will return the result of Job processed at background. For example, the API result for a bulk_upsync API called with async_mode=true
Path Params
| Attribute | Values | R | Description |
|---|---|---|---|
| action_job_id | * | The action_job ID got from other API called under async_mode=true |
Input
| Attribute | Values | R | Description |
|---|
| action_job_id required | string |
| X-Api-Key | string Example: {{api_key}} |
| X-Api-Uuid | string Example: {{api_uuid}} |
{- "action_job": {
- "_associations_removed": true,
- "_parent_object_id": null,
- "uuid": "4577f845-6d96-4211-bfe2-c6bd49bbae29",
- "total_count": 1,
- "success_count": 1,
- "failed_count": 0,
- "output": [
- {
- "_parent_object_id": null,
- "id": 1772224,
- "start_at": "2018-04-01 09:00:00 UTC",
- "end_at": "2019-04-01 16:00:00 UTC",
- "taker_id": null,
- "shift_reference_id": "sample_shift_001",
- "employee_id": "sample_employee_001",
- "site_reference_id": "sample_site_001",
- "segments": [
- {
- "_associations_removed": true,
- "_parent_object_id": 1772224,
- "id": 1367902,
- "department_code": "sample_department",
- "job_code": "chef",
- "start_at": "2018-04-01 09:00:00 UTC",
- "end_at": "2019-04-01 16:00:00 UTC"
}
]
}
]
}
}Description
Synchronize multiple employees (create, update, delete)
With async_mode=false, the server will process the data immediately and return the processed data. It should only be used for small amount of data.
With async_mode=true, the server will process the data in background and return a job ID. The job processing result can be pulled by calling Action Job API.
Input
| Attribute | Values | R | Description |
|---|
| async_mode | boolean Example: async_mode=true |
| api_default_record_action | string Example: api_default_record_action=update_or_create |
| X-Api-Key | string Example: {{api_key}} |
| X-Api-Uuid | string Example: {{api_uuid}} |
{- "employees": [
- {
- "first_name": "John",
- "last_name": "Doe",
- "employee_id": "00000000",
- "birthday": "2021-01-01",
- "is_terminated": "false",
- "labor_field": [
- {
- "full_path": "Compnay/Clubs/Market 01/Region 03/0055 SOUTH ATTLEBORO/",
- "labor_path": " "
}
], - "associations": [
- {
- "path_id": "1190",
- "full_path": "Compnay/Clubs/Market 01/Region 03/0055 SOUTH ATTLEBORO/Frontline/Carts/Cart Retriever",
- "site_id": "Compnay/Clubs/Market 01/Region 03/0055 SOUTH ATTLEBORO",
- "position": "Cart Retriever"
}
]
}
]
}