api/v1/absencesCopy Pageget https://shyftplan.com/api/v1/absencesList absences for employments.Query Paramsuser_emailstringrequiredThis is a testing sandbox. We advise against using credentials for production accounts here. E-mail address of the API user.authentication_tokenstringrequiredThis is a testing sandbox. We advise against using credentials for production accounts here. Authentication token - can be fetched by login action.company_idint32required≥ 1ID of a shyftplan account.company_ids[]array of int32sFilter for a list of company IDs to retrieve only absences belonging to one of the company IDs specified.company_ids[]ADD int32absence_reason_idint32≥ 1Filter to retrieve only absences with the specified absence reason ID.absence_reason_ids[]array of int32sFilter for a list of absence reason IDs to retrieve only absences with one of the absence reason IDs specified.absence_reason_ids[]ADD int32absence_reason_types[]array of objectsFilter for a list of absence reason types to retrieve only absences that have one of the absence reason types specified.absence_reason_types[]Allowed:time_accountwith_entitlementwithout_entitlementADD stringattachmentbooleanFilter to retrieve absences based on presence of an attachment.Available options:(No selection): Filter disabled.true: Retrieve only absences with an attachment.false: Retrieve only absences without an attachment.falsetruefalsecreated_afterdate-timeFilter to retrieve only absences created after a date and time.created_beforedate-timeFilter to retrieve only absences created before a date and time.employment_idint32≥ 1Filter to retrieve only absences for an employment with the specified ID.employment_ids[]array of int32sFilter for a list of employment IDs to retrieve only absences for any of the employment IDs specified.employment_ids[]ADD int32emp_staff_numberstringFilter to retrieve only absences for an employment with the specified staff number.emp_staff_numbers[]array of stringsFilter for a list of staff numbers to retrieve only absences for employments with one of the staff numbers specified.emp_staff_numbers[]ADD stringemp_statusstringenumFilter to retrieve only absences for employments with this employment status.Available options:(None selected): Filter deactivated.inactive: Employee has never logged in to any of the shyftplan accounts he is part of.active: Employee has logged in to any of the shyftplan accounts he is part of.destroyed: Employee was soft-deleted.noemail: No e-mail address is set for this employment.noemailactivedestroyedinactivenoemailAllowed:activedestroyedinactivenoemailemp_statuses[]array of stringsFilter for a list of employment status to retrieve only absences for employments with one of these employment status.Available options:(None selected): Filter deactivated.inactive: Employee has never logged in to any of the shyftplan accounts he is part of.active: Employee has logged in to any of the shyftplan accounts he is part of.destroyed: Employee was soft-deleted.noemail: No e-mail address is set for this employment.emp_statuses[]Allowed:activedestroyedinactivenoemailADD stringends_atdate-timeFilter to set the end of the retrieval interval in ISO date-time format. Only absences that start before this date-time will be retrieved.extended_infobooleanDefaults to trueExtended info for the absence.truefalseidint32≥ 1Filter to retrieve only the absence with this ID.ids[]array of int32sFilter for a list of absence IDs. Only information about absences that have one of these IDs will be retrieved.ids[]ADD int32include_deleted_staff_shifts_infobooleanDefaults to falseFilter to determine whether info should be retrieved about shifts unassigned when creating an absence. Available options:true: Include info about unassigned shifts.false: Don't include info about these shifts.truefalselocations_position_idint32≥ 1Filter for a locations-position ID. Retrieve only absences for employments that can work at this locations-position.locations_position_ids[]array of int32sFilter for a list of locations-position IDs. Retrieve only absences for employments that can work at any of these locations-positions.locations_position_ids[]ADD int32location_idint32≥ 1Filter for an ID of a location. Only absences for employees who can work in a position that is part of a location with this ID will be retrieved.location_ids[]array of int32sFilter for a list of location IDs. Only absences of employees who can work in a position that is part of a location with any of these IDs will be retrieved.location_ids[]ADD int32order_dirstringenumDefaults to descString defining the sorting order of retrieved absences regarding the parameter order_key. Available options:asc: Ascending order.desc: Default. Descending order.ascdescAllowed:ascdescorder_keystringenumDefaults to starts_atKey for the sorting order (order-dir) of the retrieved absences.created_atemployee_last_nameends_atidpaidreasonstarts_atstateShow 8 enum valuesotpstringOne-time password for export of absences. The export cannot be triggered by API.pageint32≥ 1Defaults to 1Number of the page of responses to retrieve. First page: 1.paidbooleanFilter to retrieve absences based on whether they count as working time. Available options:(None selected): Filter deactivated.true: Only retrieve absences that are marked as 'paid' (absence counts as working time).false: Only retrieve unpaid absences.truetruefalseper_pageint321 to 1000Defaults to 500Number of responses on each page.position_idint32≥ 1Filter for a position ID. Retrieve only absences for employees who can work at the specified position.position_ids[]array of int32sFilter for a list of position IDs. Retrieve only absences for employees who can work at any of the specified positions. Note: the position may be part of several different locations. To query for a specific position in a location, use the locations-position filter.position_ids[]ADD int32starts_atdate-timeFilter to set the start of the retrieval interval in ISO date-time format. Only absences that start after this date-time will be retrieved.statestringenumFilter to retrieve only absences with the specified state. Available options:(Parameter omitted or set to null): Filter deactivated.new: Absence application.accepted: Approved absences.refused: Application refused by a manager.withdrawn: Application withdrawn by the employee.newacceptednewrefusedwithdrawnAllowed:acceptednewrefusedwithdrawnstates[]array of stringsFilter for a list of absence states. Retrieve only absences with one of the specified states. Available options:(Parameter omitted or set to null): Filter deactivated.new: Absence application.accepted: Approved absences.refused: Application refused by a manager.withdrawn: Application withdrawn by the employee.states[]Allowed:acceptednewrefusedwithdrawnADD stringtag_ids[]array of objectsFilter for a list of IDs of employee attributes. Retrieve only absences for employees with any of the attributes specified.tag_ids[]ADD int32updated_afterdate-timeFilter to retrieve only absences that were updated after this date-time.updated_beforedate-timeFilter to retrieve only absences that were updated before this date-time.Responses 200Successfully listed 401401 UnauthorizedUpdated 3 months ago Demand-driven shift updatesv1/absencesDid this page help you?YesNo