7shifts

App · 21 actions

Read restaurant staffing and time records, manage roles and draft shifts, and watch for changes in 7shifts.

Actions

ActionWhat it does
Create roleCreate role.
Create shiftCreate shift.
Delete roleDelete role.
Delete shiftDelete shift.
Get employeeGet employee.
Get identityGet identity.
Get locationGet location.
Get roleGet role.
Get shiftGet shift.
Get time punchGet time punch.
List availabilityList availability.
List companiesList companies.
List departmentsList departments.
List employeesList employees.
List locationsList locations.
List rolesList roles.
List shiftsList shifts.
List time offList time off.
List time punchesList time punches.
Update roleUpdate role.
Update shiftUpdate shift.

Create role

Create role.

Inputs

Companycompany_idnumberRequired
The company id
NamenametextRequired
Role name
ColorcolortextRequired
A hex number representing the color
Locationlocation_idnumberRequired
Location ID
Departmentdepartment_idnumberRequired
Department ID. If this role is not assigned to a department, this value will be zero
Sortsortnumber
The order in which the roles will be listed in the web appAt least 0. Default: 0.
Job codejob_codetext
Job code
Stationsstationslist
Stations this role contains
Is tipped roleis_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

Companycompany_idnumberRequired
Company ID
Locationlocation_idnumberRequired
Shift ID
Useremployee_idnumber
User ID
Departmentdepartment_idnumber
Department ID. Required if the location uses departments.
Rolerole_idnumber
Role ID. Required if the location uses roles.
Station idstation_idnumber
Station Number
Startstartdate and timeRequired
Start date time of the shift. UTC in ISO8601 format.
Endenddate and timeRequired
End date time of the shift. UTC in ISO8601 format.
Closeclosetrue/false
Set to true if the shift ends at closing time. If set, end is not used.
Business declinebusiness_declinetrue/false
Set to true if the shift ends at business decline.
Notesnotestext
Notes displayed on a shift.
Draftdrafttrue/false
If true the shift is not published.
Notifiednotifiedtrue/false
If true the user has been notified of the published shift.
Openopentrue/false
Set to true if the shift is not assigned to any user. Open shifts can be requested by users.
Open offer typeopen_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 networklist_in_job_networktrue/false
Set to true if the shift should be made available to the 7shifts job network.
Job network wagejob_network_wagenumber
The wage to offer the shift at in the 7shifts job network.
Unassignedunassignedtrue/false
Internal use only
Unassigned skill levelunassigned_skill_levelnumber
The skill level required for this shift.One of: 1, 2, 3.
Statusstatusnumber
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 minuteslate_minutesnumber
Number of minutes a user can clock in late after the shift starts.
Breaksbreakslist
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

Companycompany_idnumberRequired
Company ID
Rolerole_idnumberRequired
Role ID

Outputs

dataobject
Returned value.
Example output
{
  "data": {}
}

Delete shift

Delete shift.

Inputs

Companycompany_idnumberRequired
Company ID
Shift idshift_idnumberRequired
Shift ID

Outputs

dataobject
Returned value.
Example output
{
  "data": {}
}

Get employee

Get employee.

Inputs

Companycompany_idnumberRequired
Company ID
IdentifieridentifiertextRequired
User ID. Accepted values are 7shifts user id or punch id. Use prefix punch: for punch id
Include inactiveinclude_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

Companycompany_idnumberRequired
Company ID
Locationlocation_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

Companycompany_idnumberRequired
Company ID
Rolerole_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

Companycompany_idnumberRequired
Company ID
Shift idshift_idnumberRequired
Shift ID
Include deletedinclude_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

Companycompany_idnumberRequired
Company ID
Time punch idtime_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

Companycompany_idnumberRequired
Company ID
Cursorcursortext
Cursor for the next or previous page of results.
Limitlimitnumber
The number results desired per page.From 1 to 500. Default: 100.
Locationlocation_idnumber
Location ID
Useremployee_idnumber
User ID
Statusstatusnumber
Return availabilities for a specified status (pending = 0, approved = 1, declined = 2).
Repeatingrepeatingtrue/false
Return repeating or weekly availabilities.
Week gteweek_gtetext
Return availabilities for a specific week.
Week to include repeating gteweek_to_include_repeating_gtetext
Return repeating availabilities that end before or on a specified week.
Order fieldorder_fieldtext
The field that availabilities will be sorted by.
Order dirorder_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 sincemodified_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

Companycompany_idnumberRequired
Company ID
Modified sincemodified_sincetext
Return departments that have been modified since the specified date. Format YYYY-MM-DD
Cursorcursortext
Cursor for the next or previous page of results.
Limitlimitnumber
The number of results desired per page.
Locationlocation_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

Companycompany_idnumberRequired
Company ID
Modified sincemodified_sincetext
Return users that have been modified since the specified date. Format YYYY-MM-DD
Locationlocation_idnumber
Location ID (cannot be used in conjunction with Department ID and Role ID)
Departmentdepartment_idnumber
Department ID (cannot be used in conjunction with Location ID and Role ID)
Rolerole_idnumber
Role ID (cannot be used in conjunction with Location ID and Department ID)
Statusstatustext
The user statusOne of: active, inactive.
Namenametext
Filter by partial or full employee name
Sort bysort_bytext
Sort the paginated result by the given field and direction.
Cursorcursortext
Cursor for the next or previous page of results.
Limitlimitnumber
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

Companycompany_idnumberRequired
Company ID
Modified sincemodified_sincetext
Return locations that have been modified since the specified date. Format YYYY-MM-DD
Deleteddeletedtrue/false
When TRUE the search will return deleted locationsDefault: false.
Cursorcursortext
Cursor for the next or previous page of results.
Limitlimitnumber
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

Companycompany_idnumberRequired
Company ID
Locationlocation_idnumber
Location ID - if provided all roles from this location will be included in the response
Departmentdepartment_idnumber
Department ID - if provided all roles from this Department will be included in the response
Idsidslist
Role IDs
Modified sincemodified_sincetext
Return roles that have been modified since the specified date. Format YYYY-MM-DD
Cursorcursortext
Cursor for the next or previous page of results.
Limitlimitnumber
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

Companycompany_idnumberRequired
Company ID
Cursorcursortext
Cursor for the next or previous page of results.
Limitlimitnumber
The number of results desired per page.From 1 to 500. Default: 100.
Locationlocation_idnumber
Location ID
Shift idsshift_idslist
A comma separated list of Shift IDs
Departmentdepartment_idnumber
Department ID
Department idsdepartment_idslist
Department IDs
Rolerole_idnumber
Role ID
Useremployee_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
Deleteddeletedtrue/false
Return shifts that were published and have been deleted. Cannot be combined with draft.Default: false.
Include deletedinclude_deletedtrue/false
Return shifts that are deleted.Default: false.
Draftdrafttrue/false
Return shifts that are in draft. Draft shifts have created, edited or deleted but not been published. Overrides deleted flag.Default: false.
Include draftinclude_drafttrue/false
Return shifts that are published, and also shifts in draft. Overrides deleted flag and draft flag.Default: false.
Openopentrue/false
Return shifts that are open. Open shifts means anyone can request to take it and not assigned to any individual.
Modified sincemodified_sincedate and time
Return only shifts that have been modified from specified date time. In ISO8601 Format
Sort bysort_bytext
Sort by either start or end
Sort dirsort_dirtext
Sort by direction (asc, desc)
Consider tz in rangesconsider_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

Companycompany_idnumberRequired
Company ID
Locationlocation_idnumber
Location ID
Useremployee_idnumber
User ID
Statusstatusnumber
Status code from your 7shifts time-off records. Leave empty for every status.
Categorycategorytext
CategoryOne of: paid, unpaid, paid_sick (Paid sick).
To date gteto_date_gtetext
Return time offs that end after a specified date.
Sort bysort_bytext
Sort by columnOne of: created, from_date (From date).
Sort dirsort_dirtext
Sort by direction (asc, desc)One of: asc, desc.
Cursorcursortext
Cursor for the next or previous page of results.
Limitlimitnumber
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

Companycompany_idnumberRequired
Company ID
Locationlocation_idnumber
Location ID
Departmentdepartment_idnumber
Department ID
Rolerole_idnumber
Role ID
Useremployee_idnumber
User ID
Approvedapprovedtrue/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.
Limitlimitnumber
The limit of results that will be returned.Default: 20.
Modified sincemodified_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 deletedinclude_deletedtrue/false
Deprecated, see 'deleted'Default: false.
Deleteddeletedtrue/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 timelocalize_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.
Flagsflagslist
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 statusesemployee_approval_statuseslist
A comma-separated list of employee approval statuses to filter time punches by.One or more of: pending, approved, disputed.
Cursorcursortext
Cursor for the next or previous page of results.
Sort bysort_bytext
The name of the field and direction you want the results ordered by.
Business date startbusiness_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 endbusiness_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

Companycompany_idnumberRequired
Company ID
Rolerole_idnumberRequired
Role ID
Departmentdepartment_idnumber
Department ID. If this role is not assigned to a department, this value will be zero
Sortsortnumber
The order in which the roles will be listed in the web appAt least 0.
Colorcolortext
A hex number representing the color
Namenametext
Role name
Job codejob_codetext
Job code
Stationsstationslist
Stations this role contains
Is tipped roleis_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

Companycompany_idnumberRequired
Company ID
Shift idshift_idnumberRequired
Shift ID
Locationlocation_idnumber
Location ID
Useremployee_idnumber
User ID
Departmentdepartment_idnumber
Department ID. Required if the location uses departments
Rolerole_idnumber
Role ID. Required if the location uses roles
Station idstation_idnumber
The station assigned to the shift
Startstartdate and time
Start date time of the shift. UTC in ISO8601 format
Endenddate and time
End date time of the shift. UTC in ISO8601 format
Closeclosetrue/false
Set to true if the shift ends at closing time. If set end is not used.
Business declinebusiness_declinetrue/false
Set to true if the shift ends at business decline.
Notesnotestext
Notes displayed on a shift
Draftdrafttrue/false
If true the shift is not published.
Openopentrue/false
Set to true if the shift is not assigned to any user. Open shifts can be requested by users.
Open offer typeopen_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.
Unassignedunassignedtrue/false
When true the shift is unassigned. Internal use only.
Unassigned skill levelunassigned_skill_levelnumber
The skill level required for this shift. * 1: Beginner * 2: Intermediate * 3: ExperiencedOne of: 1, 2, 3.
Statusstatusnumber
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 idcustom_flag_idnumber
Custom shift flag ID. Required when status is -1. Must match a company custom shift flag.
Late minuteslate_minutesnumber
Number of minutes a user can clock in late after the shift starts.
Breaksbreakslist
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"
  }
}

On this page