7shifts
App · 21 actions
Read restaurant staffing and time records, manage roles and draft shifts, and watch for changes in 7shifts.
Actions
| Action | What it does |
|---|---|
| Create role | Create role. |
| Create shift | Create shift. |
| Delete role | Delete role. |
| Delete shift | Delete shift. |
| Get employee | Get employee. |
| Get identity | Get identity. |
| Get location | Get location. |
| Get role | Get role. |
| Get shift | Get shift. |
| Get time punch | Get time punch. |
| List availability | List availability. |
| List companies | List companies. |
| List departments | List departments. |
| List employees | List employees. |
| List locations | List locations. |
| List roles | List roles. |
| List shifts | List shifts. |
| List time off | List time off. |
| List time punches | List time punches. |
| Update role | Update role. |
| Update shift | Update shift. |
Create role
Create role.
Inputs
- Company
company_idnumberRequired - The company id
- Name
nametextRequired - Role name
- Color
colortextRequired - A hex number representing the color
- Location
location_idnumberRequired - Location ID
- Department
department_idnumberRequired - Department ID. If this role is not assigned to a department, this value will be zero
- Sort
sortnumber - The order in which the roles will be listed in the web appAt least 0. Default:
0. - Job code
job_codetext - Job code
- Stations
stationslist - Stations this role contains
- Is tipped role
is_tipped_roletrue/false - When true, role is tipped. Otherwise the role is non tippedDefault:
false.
Outputs
dataobject- Returned value.
Example output
{
"data": {
"data": {
"color": "example",
"color_code": "example",
"color_dark": "example",
"company_id": 1,
"created": "example",
"department_id": 1,
"id": 1,
"is_tipped_role": false,
"job_code": "example",
"location_id": 1,
"modified": "example",
"name": "example",
"num_stations": 1,
"sort": 1,
"stations": []
},
"object": "role"
}
}Create shift
Create shift.
Inputs
- Company
company_idnumberRequired - Company ID
- Location
location_idnumberRequired - Shift ID
- User
employee_idnumber - User ID
- Department
department_idnumber - Department ID. Required if the location uses departments.
- Role
role_idnumber - Role ID. Required if the location uses roles.
- Station id
station_idnumber - Station Number
- Start
startdate and timeRequired - Start date time of the shift. UTC in ISO8601 format.
- End
enddate and timeRequired - End date time of the shift. UTC in ISO8601 format.
- Close
closetrue/false - Set to true if the shift ends at closing time. If set, end is not used.
- Business decline
business_declinetrue/false - Set to true if the shift ends at business decline.
- Notes
notestext - Notes displayed on a shift.
- Draft
drafttrue/false - If true the shift is not published.
- Notified
notifiedtrue/false - If true the user has been notified of the published shift.
- Open
opentrue/false - Set to true if the shift is not assigned to any user. Open shifts can be requested by users.
- Open offer type
open_offer_typenumber - Set when open is true. Set to 1 for everyone can request an open shift; set to 1 if only offered to specified role.
- List in job network
list_in_job_networktrue/false - Set to true if the shift should be made available to the 7shifts job network.
- Job network wage
job_network_wagenumber - The wage to offer the shift at in the 7shifts job network.
- Unassigned
unassignedtrue/false - Internal use only
- Unassigned skill level
unassigned_skill_levelnumber - The skill level required for this shift.One of:
1,2,3. - Status
statusnumber - Shift status type. 0 - none, 1 - sick, 2 - no show, 3 - late, 4 - call out, 5 - left late.One of:
0,1,2,3,4,5. - Late minutes
late_minutesnumber - Number of minutes a user can clock in late after the shift starts.
- Breaks
breakslist - Breaks to be created with the shift
Outputs
dataobject- Returned value.
Example output
{
"data": {
"data": {
"attendance_status": "none",
"breaks": [],
"business_decline": false,
"close": false,
"created": "example",
"custom_flag": {
"color": "example",
"id": 1,
"name": "example"
},
"deleted": false,
"department_id": 1,
"draft": false,
"end": "example",
"hourly_wage": 1.0,
"id": 1,
"late_minuets": 1,
"location_id": 1,
"modified": "example",
"notes": "example",
"notified": false,
"open": false,
"open_offer_type": "all_location_members",
"publish_status": "draft",
"role_id": 1,
"soft_deleted": "example",
"start": "example",
"station": 1,
"station_id": 1,
"station_name": "example",
"unassigned": false,
"unassigned_skill_level": 1,
"user_id": 1
},
"object": "shift"
}
}Delete role
Delete role.
Inputs
- Company
company_idnumberRequired - Company ID
- Role
role_idnumberRequired - Role ID
Outputs
dataobject- Returned value.
Example output
{
"data": {}
}Delete shift
Delete shift.
Inputs
- Company
company_idnumberRequired - Company ID
- Shift id
shift_idnumberRequired - Shift ID
Outputs
dataobject- Returned value.
Example output
{
"data": {}
}Get employee
Get employee.
Inputs
- Company
company_idnumberRequired - Company ID
- Identifier
identifiertextRequired - User ID. Accepted values are 7shifts user id or punch id. Use prefix punch: for punch id
- Include inactive
include_inactivetrue/false - include inactive users
Outputs
dataobject- Returned value.
Example output
{
"data": {
"data": {
"active": false,
"address": "example",
"appear_as_employee": false,
"birth_date": "example",
"city": "example",
"company_id": 1,
"created": "example",
"email": "example",
"employee_id": "example",
"first_name": "example",
"home_number": "example",
"hourly_wage": 1,
"id": 1,
"identity_id": 1,
"invite_accepted": "example",
"invite_status": "accepted",
"invited": "example",
"is_new": false,
"language": "example",
"last_name": "example",
"max_weekly_hours": "example",
"meta": {
"identity_status": "created",
"readonly_fields": []
},
"mobile_number": "example",
"modified": "example",
"notes": "example",
"notify_ot_risk": false,
"permissions_template_id": 1,
"photo": "example",
"postal_zip": "example",
"preferred_first_name": "example",
"preferred_last_name": "example",
"pronouns": "example",
"prov_state": "example",
"punch_id": "example",
"push": false,
"reactivation_status": "accepted",
"skill_level": 1,
"sms_me_schedules": false,
"subscribe_to_updates": false,
"timezone": "example",
"type": "employee",
"wage_type": "example"
},
"object": "user"
}
}Get identity
Get identity.
Inputs
None.
Outputs
dataobject- Returned value.
Example output
{
"data": {
"data": {
"identity_id": 1,
"users": []
},
"object": "whoami"
}
}Get location
Get location.
Inputs
- Company
company_idnumberRequired - Company ID
- Location
location_idnumberRequired - Location ID
Outputs
dataobject- Returned value.
Example output
{
"data": {
"data": {
"auto_send_log_book_time": "example",
"city": "example",
"company_id": 1,
"country": "example",
"created": "example",
"deleted": false,
"department_based_budget": false,
"formatted_address": "example",
"fri_hours_close": "example",
"fri_hours_open": "example",
"fri_is_closed": false,
"hash": "example",
"holiday_pay": false,
"id": 1,
"lat": 1.0,
"lng": 1.0,
"mapping_id": "example",
"message": "example",
"modified": "example",
"mon_hours_close": "example",
"mon_hours_open": "example",
"mon_is_closed": false,
"name": "example",
"place_id": "example",
"sat_hours_close": "example",
"sat_hours_open": "example",
"sat_is_closed": false,
"shift_feedback": false,
"state": "example",
"sun_hours_close": "example",
"sun_hours_open": "example",
"sun_is_closed": false,
"thu_hours_close": "example",
"thu_hours_open": "example",
"thu_is_closed": false,
"timezone": "example",
"timezone_updated": false,
"tue_hours_close": "example",
"tue_hours_open": "example",
"tue_is_closed": false,
"wed_hours_close": "example",
"wed_hours_open": "example",
"wed_is_closed": false
},
"object": "location"
}
}Get role
Get role.
Inputs
- Company
company_idnumberRequired - Company ID
- Role
role_idnumberRequired - Role ID
Outputs
dataobject- Returned value.
Example output
{
"data": {
"data": {
"color": "example",
"color_code": "example",
"color_dark": "example",
"company_id": 1,
"created": "example",
"department_id": 1,
"id": 1,
"is_tipped_role": false,
"job_code": "example",
"location_id": 1,
"modified": "example",
"name": "example",
"num_stations": 1,
"sort": 1,
"stations": []
},
"object": "role"
}
}Get shift
Get shift.
Inputs
- Company
company_idnumberRequired - Company ID
- Shift id
shift_idnumberRequired - Shift ID
- Include deleted
include_deletedtrue/false - Return the shift even if its deleted
Outputs
dataobject- Returned value.
Example output
{
"data": {
"data": {
"attendance_status": "none",
"breaks": [],
"business_decline": false,
"close": false,
"created": "example",
"custom_flag": {
"color": "example",
"id": 1,
"name": "example"
},
"deleted": false,
"department_id": 1,
"draft": false,
"end": "example",
"hourly_wage": 1.0,
"id": 1,
"late_minuets": 1,
"location_id": 1,
"modified": "example",
"notes": "example",
"notified": false,
"open": false,
"open_offer_type": "all_location_members",
"publish_status": "draft",
"role_id": 1,
"soft_deleted": "example",
"start": "example",
"station": 1,
"station_id": 1,
"station_name": "example",
"unassigned": false,
"unassigned_skill_level": 1,
"user_id": 1
},
"object": "shift"
}
}Get time punch
Get time punch.
Inputs
- Company
company_idnumberRequired - Company ID
- Time punch id
time_punch_idnumberRequired - Time punch ID
Outputs
dataobject- Returned value.
Example output
{
"data": {
"data": {
"approved": false,
"auto_clocked_out": false,
"breaks": [],
"clocked_in": "example",
"clocked_in_offline": false,
"clocked_out": "example",
"clocked_out_offline": false,
"company_id": 1,
"created": "example",
"deleted": false,
"department_id": 1,
"editable_punch": false,
"hourly_wage": 1,
"id": 1,
"location_id": 1,
"modified": "example",
"notes": "example",
"pos_type": "example",
"role_id": 1,
"shift_id": 1,
"tips": 1,
"user_id": 1
},
"object": "time_punch"
}
}List availability
List availability. Returns one page; use its continuation fields to request the next page.
Inputs
- Company
company_idnumberRequired - Company ID
- Cursor
cursortext - Cursor for the next or previous page of results.
- Limit
limitnumber - The number results desired per page.From 1 to 500. Default:
100. - Location
location_idnumber - Location ID
- User
employee_idnumber - User ID
- Status
statusnumber - Return availabilities for a specified status (pending = 0, approved = 1, declined = 2).
- Repeating
repeatingtrue/false - Return repeating or weekly availabilities.
- Week gte
week_gtetext - Return availabilities for a specific week.
- Week to include repeating gte
week_to_include_repeating_gtetext - Return repeating availabilities that end before or on a specified week.
- Order field
order_fieldtext - The field that availabilities will be sorted by.
- Order dir
order_dirtext - The direction that availabilities will be sorted by.
Outputs
dataobject- Returned value.
Example output
{
"data": {
"data": [],
"meta": {
"cursor": {
"count": 1,
"current": "example",
"next": "example",
"prev": "example"
}
},
"object": "availability"
}
}List companies
List companies.
Inputs
- Modified since
modified_sincetext - Return companies that have been modified since the specified date. Format YYYY-MM-DD
Outputs
dataobject- Returned value.
Example output
{
"data": {
"data": [],
"object": "companies"
}
}List departments
List departments. Returns one page; use its continuation fields to request the next page.
Inputs
- Company
company_idnumberRequired - Company ID
- Modified since
modified_sincetext - Return departments that have been modified since the specified date. Format YYYY-MM-DD
- Cursor
cursortext - Cursor for the next or previous page of results.
- Limit
limitnumber - The number of results desired per page.
- Location
location_idnumber - Return departments that match the provided location ID
Outputs
dataobject- Returned value.
Example output
{
"data": {
"data": [],
"meta": {
"cursor": {
"count": 1,
"current": "example",
"next": "example",
"prev": "example"
}
},
"object": "departments"
}
}List employees
List employees. Returns one page; use its continuation fields to request the next page.
Inputs
- Company
company_idnumberRequired - Company ID
- Modified since
modified_sincetext - Return users that have been modified since the specified date. Format YYYY-MM-DD
- Location
location_idnumber - Location ID (cannot be used in conjunction with Department ID and Role ID)
- Department
department_idnumber - Department ID (cannot be used in conjunction with Location ID and Role ID)
- Role
role_idnumber - Role ID (cannot be used in conjunction with Location ID and Department ID)
- Status
statustext - The user statusOne of:
active,inactive. - Name
nametext - Filter by partial or full employee name
- Sort by
sort_bytext - Sort the paginated result by the given field and direction.
- Cursor
cursortext - Cursor for the next or previous page of results.
- Limit
limitnumber - The number of results desired per page.From 1 to 500. Default:
100.
Outputs
dataobject- Returned value.
Example output
{
"data": {
"data": [],
"meta": {
"cursor": {
"count": 1,
"current": "example",
"next": "example",
"prev": "example"
}
},
"object": "users"
}
}List locations
List locations. Returns one page; use its continuation fields to request the next page.
Inputs
- Company
company_idnumberRequired - Company ID
- Modified since
modified_sincetext - Return locations that have been modified since the specified date. Format YYYY-MM-DD
- Deleted
deletedtrue/false - When TRUE the search will return deleted locationsDefault:
false. - Cursor
cursortext - Cursor for the next or previous page of results.
- Limit
limitnumber - The number of results desired per page.From 1 to 500. Default:
100.
Outputs
dataobject- Returned value.
Example output
{
"data": {
"data": [],
"meta": {
"cursor": {
"count": 1,
"current": "example",
"next": "example",
"prev": "example"
}
},
"object": "locations"
}
}List roles
List roles. Returns one page; use its continuation fields to request the next page.
Inputs
- Company
company_idnumberRequired - Company ID
- Location
location_idnumber - Location ID - if provided all roles from this location will be included in the response
- Department
department_idnumber - Department ID - if provided all roles from this Department will be included in the response
- Ids
idslist - Role IDs
- Modified since
modified_sincetext - Return roles that have been modified since the specified date. Format YYYY-MM-DD
- Cursor
cursortext - Cursor for the next or previous page of results.
- Limit
limitnumber - The number of results desired per page.
Outputs
dataobject- Returned value.
Example output
{
"data": {
"data": [],
"meta": {
"cursor": {
"count": 1,
"current": "example",
"next": "example",
"prev": "example"
}
},
"object": "roles"
}
}List shifts
List shifts. Returns one page; use its continuation fields to request the next page.
Inputs
- Company
company_idnumberRequired - Company ID
- Cursor
cursortext - Cursor for the next or previous page of results.
- Limit
limitnumber - The number of results desired per page.From 1 to 500. Default:
100. - Location
location_idnumber - Location ID
- Shift ids
shift_idslist - A comma separated list of Shift IDs
- Department
department_idnumber - Department ID
- Department ids
department_idslist - Department IDs
- Role
role_idnumber - Role ID
- User
employee_idnumber - User ID
- Start[lte]
start_ltedate and time - Return shifts that start before or on specified date. In ISO8601 Format
- Start[gte]
start_gtedate and time - Return shifts that start after or on specified date time. In ISO8601 Format
- End[lte]
end_ltedate and time - Return shifts that end before or on specified date time. In ISO8601 Format
- End[gte]
end_gtedate and time - Return shifts that end after or on specified date time. In ISO8601 Format
- Deleted
deletedtrue/false - Return shifts that were published and have been deleted. Cannot be combined with draft.Default:
false. - Include deleted
include_deletedtrue/false - Return shifts that are deleted.Default:
false. - Draft
drafttrue/false - Return shifts that are in draft. Draft shifts have created, edited or deleted but not been published. Overrides deleted flag.Default:
false. - Include draft
include_drafttrue/false - Return shifts that are published, and also shifts in draft. Overrides deleted flag and draft flag.Default:
false. - Open
opentrue/false - Return shifts that are open. Open shifts means anyone can request to take it and not assigned to any individual.
- Modified since
modified_sincedate and time - Return only shifts that have been modified from specified date time. In ISO8601 Format
- Sort by
sort_bytext - Sort by either start or end
- Sort dir
sort_dirtext - Sort by direction (asc, desc)
- Consider tz in ranges
consider_tz_in_rangestrue/false - When passing start[lte], start[gte], end[lte], or end[gte] parameters, consider the offset passed. Previously we ignored the offset and treated all datetimes as local location timeDefault:
true.
Outputs
dataobject- Returned value.
Example output
{
"data": {
"data": [],
"meta": {
"cursor": {
"count": 1,
"current": "example",
"next": "example",
"prev": "example"
}
},
"object": "shifts"
}
}List time off
List time off. Returns one page; use its continuation fields to request the next page.
Inputs
- Company
company_idnumberRequired - Company ID
- Location
location_idnumber - Location ID
- User
employee_idnumber - User ID
- Status
statusnumber - Status code from your 7shifts time-off records. Leave empty for every status.
- Category
categorytext - CategoryOne of:
paid,unpaid,paid_sick(Paid sick). - To date gte
to_date_gtetext - Return time offs that end after a specified date.
- Sort by
sort_bytext - Sort by columnOne of:
created,from_date(From date). - Sort dir
sort_dirtext - Sort by direction (asc, desc)One of:
asc,desc. - Cursor
cursortext - Cursor for the next or previous page of results.
- Limit
limitnumber - The number of results desired per page.
Outputs
dataobject- Returned value.
Example output
{
"data": {
"data": [],
"meta": {
"cursor": {
"count": 1,
"current": "example",
"next": "example",
"prev": "example"
}
}
}
}List time punches
List time punches. Returns one page; use its continuation fields to request the next page.
Inputs
- Company
company_idnumberRequired - Company ID
- Location
location_idnumber - Location ID
- Department
department_idnumber - Department ID
- Role
role_idnumber - Role ID
- User
employee_idnumber - User ID
- Approved
approvedtrue/false - Returns time punches that have been approved. Default null, returns both approved and unapproved punches. If true returns only approved punches. If false returns only unapproved punches.
- Limit
limitnumber - The limit of results that will be returned.Default:
20. - Modified since
modified_sincedate and time - Return time punches that have been modified after the specified date time. UTC in ISO8601 Format
- Clocked in[lte]
clocked_in_ltedate and time - Return time punches with clocked in before or on the specified date. UTC in ISO8601 format
- Clocked in[gte]
clocked_in_gtedate and time - Return time punches with clocked in after or on the specified date. UTC in ISO8601 format
- Clocked out[lte]
clocked_out_ltedate and time - Return time punches with clocked out before or on the specified date. UTC in ISO8601 format
- Clocked out[gte]
clocked_out_gtedate and time - Return time punches with clocked out after or on the specified date. UTC in ISO8601 format
- Include deleted
include_deletedtrue/false - Deprecated, see 'deleted'Default:
false. - Deleted
deletedtrue/false - Returns punches filtered by deleted status. Default false, returns undeleted punches. If true returns only deleted punches. if value is null then returns both deleted and undeleted punches.Default:
false. - Localize search time
localize_search_timetrue/false - If true, convert any date ranges to consider the local timezone of the punches. If false, date ranges will be in UTCDefault:
false. - Flags
flagslist - A comma separated list of flags to filter time punches by.One or more of:
late,auto_clocked_out(Auto clocked out),missed_break(Missed break). - Employee approval statuses
employee_approval_statuseslist - A comma-separated list of employee approval statuses to filter time punches by.One or more of:
pending,approved,disputed. - Cursor
cursortext - Cursor for the next or previous page of results.
- Sort by
sort_bytext - The name of the field and direction you want the results ordered by.
- Business date start
business_date_starttext - Return time punches with business date (based on clocked in date) after or on the specified date. UTC in ISO8601 format. If used, it will take priority over all other clocked in/out date filters.
- Business date end
business_date_endtext - Return time punches with business date (based on clocked in date) before or on the specified date. UTC in ISO8601 format. If used, it will take priority over all other clocked in/out date filters.
Outputs
dataobject- Returned value.
Example output
{
"data": {
"data": [],
"meta": {
"cursor": {
"count": 1,
"current": "example",
"next": "example",
"prev": "example"
}
},
"object": "time_punches"
}
}Update role
Update role. Fields left empty keep their current values.
Inputs
- Company
company_idnumberRequired - Company ID
- Role
role_idnumberRequired - Role ID
- Department
department_idnumber - Department ID. If this role is not assigned to a department, this value will be zero
- Sort
sortnumber - The order in which the roles will be listed in the web appAt least 0.
- Color
colortext - A hex number representing the color
- Name
nametext - Role name
- Job code
job_codetext - Job code
- Stations
stationslist - Stations this role contains
- Is tipped role
is_tipped_roletrue/false - When zero, role is a non tipped role, when one, role is tipped role
Outputs
dataobject- Returned value.
Example output
{
"data": {
"data": {
"color": "example",
"color_code": "example",
"color_dark": "example",
"company_id": 1,
"created": "example",
"department_id": 1,
"id": 1,
"is_tipped_role": false,
"job_code": "example",
"location_id": 1,
"modified": "example",
"name": "example",
"num_stations": 1,
"sort": 1,
"stations": []
},
"object": "role"
}
}Update shift
Update shift. Fields left empty keep their current values.
Inputs
- Company
company_idnumberRequired - Company ID
- Shift id
shift_idnumberRequired - Shift ID
- Location
location_idnumber - Location ID
- User
employee_idnumber - User ID
- Department
department_idnumber - Department ID. Required if the location uses departments
- Role
role_idnumber - Role ID. Required if the location uses roles
- Station id
station_idnumber - The station assigned to the shift
- Start
startdate and time - Start date time of the shift. UTC in ISO8601 format
- End
enddate and time - End date time of the shift. UTC in ISO8601 format
- Close
closetrue/false - Set to true if the shift ends at closing time. If set end is not used.
- Business decline
business_declinetrue/false - Set to true if the shift ends at business decline.
- Notes
notestext - Notes displayed on a shift
- Draft
drafttrue/false - If true the shift is not published.
- Open
opentrue/false - Set to true if the shift is not assigned to any user. Open shifts can be requested by users.
- Open offer type
open_offer_typenumber - Set when open is true. Set to 0 when everyone at a location can request an open shift; set to 1 if only offered to specified role.One of:
0,1,2,3. - Unassigned
unassignedtrue/false - When true the shift is unassigned. Internal use only.
- Unassigned skill level
unassigned_skill_levelnumber - The skill level required for this shift. * 1: Beginner * 2: Intermediate * 3: ExperiencedOne of:
1,2,3. - Status
statusnumber - Shift status type. * -1: Custom (requires custom_flag_id) * 0: None * 1: Sick * 2: No Show * 3: Late * 4: Call Out * 5: Left LateOne of:
-1,0,1,2,3,4,5. - Custom flag id
custom_flag_idnumber - Custom shift flag ID. Required when status is -1. Must match a company custom shift flag.
- Late minutes
late_minutesnumber - Number of minutes a user can clock in late after the shift starts.
- Breaks
breakslist - Breaks to be updated with the shift
Outputs
dataobject- Returned value.
Example output
{
"data": {
"data": {
"attendance_status": "none",
"breaks": [],
"business_decline": false,
"close": false,
"created": "example",
"custom_flag": {
"color": "example",
"id": 1,
"name": "example"
},
"deleted": false,
"department_id": 1,
"draft": false,
"end": "example",
"hourly_wage": 1.0,
"id": 1,
"late_minuets": 1,
"location_id": 1,
"modified": "example",
"notes": "example",
"notified": false,
"open": false,
"open_offer_type": "all_location_members",
"publish_status": "draft",
"role_id": 1,
"soft_deleted": "example",
"start": "example",
"station": 1,
"station_id": 1,
"station_name": "example",
"unassigned": false,
"unassigned_skill_level": 1,
"user_id": 1
},
"object": "shift"
}
}