api/v1/absences

List absences for employments.

Query Params
string
required

This is a testing sandbox. We advise against using credentials for production accounts here.

E-mail address of the API user.

string
required

This is a testing sandbox. We advise against using credentials for production accounts here.

Authentication token - can be fetched by login action.

int32
required
≥ 1

ID of a shyftplan account.

company_ids[]
array of int32s

Filter for a list of company IDs to retrieve only absences belonging to one of the company IDs specified.

company_ids[]
int32
≥ 1

Filter to retrieve only absences with the specified absence reason ID.

absence_reason_ids[]
array of int32s

Filter for a list of absence reason IDs to retrieve only absences with one of the absence reason IDs specified.

absence_reason_ids[]
absence_reason_types[]
array of objects

Filter for a list of absence reason types to retrieve only absences that have one of the absence reason types specified.

absence_reason_types[]
Allowed:
boolean

Filter 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.

date-time

Filter to retrieve only absences created after a date and time.

date-time

Filter to retrieve only absences created before a date and time.

int32
≥ 1

Filter to retrieve only absences for an employment with the specified ID.

employment_ids[]
array of int32s

Filter for a list of employment IDs to retrieve only absences for any of the employment IDs specified.

employment_ids[]
string

Filter to retrieve only absences for an employment with the specified staff number.

emp_staff_numbers[]
array of strings

Filter for a list of staff numbers to retrieve only absences for employments with one of the staff numbers specified.

emp_staff_numbers[]
string
enum

Filter 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.

Allowed:
emp_statuses[]
array of strings

Filter 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:
date-time

Filter to set the end of the retrieval interval in ISO date-time format. Only absences that start before this date-time will be retrieved.

boolean
Defaults to true

Extended info for the absence.

int32
≥ 1

Filter to retrieve only the absence with this ID.

ids[]
array of int32s

Filter for a list of absence IDs. Only information about absences that have one of these IDs will be retrieved.

ids[]
boolean
Defaults to false

Filter 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.

int32
≥ 1

Filter for a locations-position ID. Retrieve only absences for employments that can work at this locations-position.

locations_position_ids[]
array of int32s

Filter for a list of locations-position IDs. Retrieve only absences for employments that can work at any of these locations-positions.

locations_position_ids[]
int32
≥ 1

Filter 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 int32s

Filter 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[]
string
enum
Defaults to desc

String defining the sorting order of retrieved absences regarding the parameter order_key.

    Available options:
  • asc: Ascending order.
  • desc: Default. Descending order.

Allowed:
string
enum
Defaults to starts_at

Key for the sorting order (order-dir) of the retrieved absences.

string

One-time password for export of absences. The export cannot be triggered by API.

int32
≥ 1
Defaults to 1

Number of the page of responses to retrieve. First page: 1.

boolean

Filter 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.

int32
1 to 1000
Defaults to 500

Number of responses on each page.

int32
≥ 1

Filter for a position ID. Retrieve only absences for employees who can work at the specified position.

position_ids[]
array of int32s

Filter 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[]
date-time

Filter to set the start of the retrieval interval in ISO date-time format. Only absences that start after this date-time will be retrieved.

string
enum

Filter 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.

Allowed:
states[]
array of strings

Filter 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:
tag_ids[]
array of objects

Filter for a list of IDs of employee attributes. Retrieve only absences for employees with any of the attributes specified.

tag_ids[]
date-time

Filter to retrieve only absences that were updated after this date-time.

date-time

Filter to retrieve only absences that were updated before this date-time.

Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json