v1/absencesCopy Pagepost https://shyftplan.com/api/v1/absencesCreate an absence for an employment.Body 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_idint32≥ 1ID of a shyftplan account.absence_reason_idint32required≥ 1ID of the absence reason.daysfloatrequired≥ 0Duration of the absence in working days.employment_idint32required≥ 1ID of the employment.ends_atdate-timerequiredDate-time (ISO 8601) for the end of the object's span.paidbooleanrequiredDetermines whether the absence duration is counted as working time. Available options:true: Only retrieve absences that are marked as 'paid' (absence counts as working time).false: Only retrieve unpaid absences.truefalsestarts_atdate-timerequiredDate-time (ISO 8601) for the begin of the object's span.statestringenumState of the absence. Available options:new: Absence application (by manager or employee) on which no decision has been made.accepted: Approved absence (by manager).refused: Application refused by a manager.withdrawn: Application withdrawn by the employee.newacceptednewrefusedwithdrawnAllowed:acceptednewrefusedwithdrawnnotesstringNote saved with the object.is_full_daybooleanIs the absence spanning full days only?truetruefalseforce_collisionbooleanDefaults to falseShould the absence be created in spite of conflicts with shifts or absences of the employee? More info This parameter has no effect when two settings in shyftplan are both disabled - these are: Company profile > Shift schedules > Absence Conflicts Company profile > Absences > Maximum number of absence days Otherwise, this parameter has the following effect: For a conflict with pre-existing absences: If both force_collision and force_collision_and_remove are set to false, the new absence will not be created. Instead, an error will be saved. If at least one of the force* parameters is set to true, the absence will be created. For a conflict with shift assignments: If both force_collision and force_collision_and_remove are set to false, the new absence will not be created. Instead, an error will be saved. The employee stays assigned to conflicting shifts. If force_collision_and_remove is true then the absence will be created and the employee unassigned from conflicting shifts. If force_collision_and_remove is false and "force_collision" is true then the absence is created, but the employee stays assigned to conflicting shifts. truefalseforce_collision_and_removebooleanDefaults to falseShould the absence be created in spite of conflicts with shifts or absences of the employee, and should the employee be unassigned from conflicting shifts? More info This parameter has no effect when two settings in shyftplan are both disabled - these are: Company profile > Shift schedules > Absence Conflicts Company profile > Absences > Maximum number of absence days Otherwise, this parameter has the following effect: For a conflict with pre-existing absences: If both force_collision and force_collision_and_remove are set to false, the new absence will not be created. Instead, an error will be saved. If at least one of the force* parameters is set to true, the absence will be created. For a conflict with shift assignments: If both force_collision and force_collision_and_remove are set to false, the new absence will not be created. Instead, an error will be saved. The employee stays assigned to conflicting shifts. If force_collision_and_remove is true then the absence will be created and the employee unassigned from conflicting shifts. If force_collision_and_remove is false and "force_collision" is true then the absence is created, but the employee stays assigned to conflicting shifts. truefalsefilefileAttachment file (max. 5MB)absence_days_breakdownarray of objectsList of absence minutes per calendar day.absence_days_breakdownADD objectResponses 201Successfully created 400400 errors. 401Unauthorized. 403forbidden 404404 errors 422Invalid request.Updated 3 months ago api/v1/absencesv1/absences/{id}Did this page help you?YesNo