Shyft Statistics API (1.0.0)

Download OpenAPI specification:

statistics

Here are all APIs for pulling statistics data.

statistics > user privileges

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.

get user privileges

Description


Use this API to pull user data into your BI system. This can be used to generate data for registration, roster etc. across your organization.

Path Params

Param Values R Description

Input

Attribute Values R Description

Output

Attribute Type Description
employee_id string User's global uniq ID in partner's system.
site_reference_id string The location user is associated with.
created_at datetime The time user is created in Shyft system.
updated_at datetime The most recent time user updated in Shyft system.
last_see date The last date the user used the app.
is_admin boolean Whether or not the user is admin of this location.
header Parameters
X-Api-Key
string
Example: {{api_key}}
X-Api-Uuid
string
Example: {{api_uuid}}

Responses

Response samples

Content type
application/json
{
  • "user_privileges": [
    ],
  • "meta": {
    }
}

statistics > shifts

Shifts stands for the schedules already assigned to employees or need to be covered(open shifts).

get shifts

Description


Use this API to pull shift data into your BI system. This can be used generate reporting regarding the various functions of Shyft across your organization.

Path Params

Param Values R Description

Input

Attribute Values R Description
updated_after datetime only pull shifts that are updated since the date-time.
created_at datetime only pull shifts that are created since the date-time.

Output

Attribute Values Description
id integer The ID Shyft assigns to the shift.
shift_reference_id string The ID WFM system assigns to the shift.
name string Shyft assign names to shift to indicate its type.
shift: shift posted for trade within the Shyft application.
inventory: shift that was imported and have not been traded.
open_shift: open shift created within Shyft.
vto: voluntary time off generated within Shyft.
person_id string Employee ID of user who originally owns the shift.
cover_person_id string Employee ID of user who covered the shift (empty unless shift is covered).
approve_person_id string Employee ID of user who approved or denied the shift trade (empty unless shift is approved or denied).
kronos_path string The org path that the shift was originally assigned in the Kronos system.
start_at datetime Start time of the shift in (GMT).
end_at datetime End time of the shift (GMT).
start_at_local datetime Start time of the shift as sent to Shyft.
end_at_local datetime End time of the shift as sent to Shyft.
created_at datetime Timestamp when the shift was imported (or posted if it is posted to trade) (GMT).
updated_at datetime Timestamp when the shift was last updated (GMT).
cover_time datetime Timestamp when shift was covered (GMT).
manage_time datetime Timestamp when shift was approved/denied (GMT).
status string The status of a shift.
unclaimed: imported shift of a owner who is not on Shyft yet.
inventory: imported shifts.
posted: this shift is being traded.
auto approved: this shift trade was automatically approved.
pending: this shift is pending manager action.
approved: this shift trade was approved by manager.
rejected: this shift trade was denied by manager.
post_reference_id integer The reference ID to the post containing social communications attached to this shift trade.
shift_reason string The reason (if attached) of the shift trade from original owner.
comments_count integer The number of comments attached to this shift trade.
view_count integer The number of views attached to this shift trade.
is_valid boolean If the shift is deleted.
header Parameters
X-Api-Key
string
Example: {{api_key}}
X-Api-Uuid
string
Example: {{api_uuid}}

Responses

Response samples

Content type
application/json
{
  • "schedule_elements": [
    ],
  • "meta": {
    }
}

statistics > locatiions

get locations usage

Description


Pull locations usage data.
dau: daily active users.
wau: weekly active users.
mau: monthly active users.

Path Params

Param Values R Description

Input

Attribute Values R Description

Output

Attribute Type R Description
site_reference_id string the reference id of target location
date date the target date
dau number # of daily active users
wau number # of weekly active users
mau number # of monthly active users
member_count number # of total registered users for target location on target date
header Parameters
X-Api-Key
string
Example: {{api_key}}
X-Api-Uuid
string
Example: {{api_uuid}}

Responses

Response samples

Content type
application/json
Example
{
  • "locations": [
    ]
}

statistics > Overall

get overall usage

Description


Pull locations usage data.
dau: daily active users.
wau: weekly active users.
mau: monthly active users.

Path Params

Param Values R Description

Input

Attribute Values R Description

Output

Attribute Type R Description
site_reference_id string the reference id of target location
date date the target date
dau number # of daily active users
wau number # of weekly active users
mau number # of monthly active users
member_count number # of total registered users for target location on target date
query Parameters
X-Api-Key
string
Example: X-Api-Key={{api_key}}
X-Api-Uuid
string
Example: X-Api-Uuid={{api_uuid}}
header Parameters
X-Api-Key
string
Example: {{api_key}}
X-Api-Uuid
string
Example: {{api_uuid}}

Responses

Response samples

Content type
application/json
Example
{
  • "locations": [
    ]
}

statistics > posts

get posts

Description


Pull partner's comments usage data.

Path Params

Param Values R Description

Input

Attribute Values Description
updated_after datetime only pull comments that are updated since the date-time.
created_at datetime only pull comments that are created since the date-time.

Output

Attribute Type Description
id integer The ID Shyft assigns to the comment.
post_reference_id integer The reference ID to the post containing social communications.
person_id string Employee ID of user who originally owns the comment.
content string The content of the comment.
created_at datetime Timestamp when the comment was created (GMT).
updated_at datetime Timestamp when the comment was last updated (GMT).
is_valid boolean If the comment is deleted.
header Parameters
X-Api-Key
string
Example: {{api_key}}
X-Api-Uuid
string
Example: {{api_uuid}}

Responses

Response samples

Content type
application/json
{
  • "posts": [
    ],
  • "meta": {
    }
}

statistics > comments

get comments

Description


Pull partner's comments usage data.

Path Params

Param Values R Description

Input

Attribute Values Description
updated_after datetime only pull comments that are updated since the date-time.
created_at datetime only pull comments that are created since the date-time.

Output

Attribute Type Description
id integer The ID Shyft assigns to the comment.
post_reference_id integer The reference ID to the post containing social communications.
person_id string Employee ID of user who originally owns the comment.
content string The content of the comment.
created_at datetime Timestamp when the comment was created (GMT).
updated_at datetime Timestamp when the comment was last updated (GMT).
is_valid boolean If the comment is deleted.
header Parameters
X-Api-Key
string
Example: {{api_key}}
X-Api-Uuid
string
Example: {{api_uuid}}

Responses

Response samples

Content type
application/json
{
  • "comments": [
    ],
  • "meta": {
    }
}

statistics > chat messages

get chat messages

Description


Pull partner's comments usage data.

Path Params

Param Values R Description

Input

Attribute Values Description
updated_after datetime only pull comments that are updated since the date-time.
created_at datetime only pull comments that are created since the date-time.

Output

Attribute Type Description
id integer The ID Shyft assigns to the comment.
post_reference_id integer The reference ID to the post containing social communications.
person_id string Employee ID of user who originally owns the comment.
content string The content of the comment.
created_at datetime Timestamp when the comment was created (GMT).
updated_at datetime Timestamp when the comment was last updated (GMT).
is_valid boolean If the comment is deleted.
header Parameters
X-Api-Key
string
Example: {{api_key}}
X-Api-Uuid
string
Example: {{api_uuid}}

Responses

Response samples

Content type
application/json
{
  • "chat_messages": [
    ],
  • "meta": {
    }
}