Create Time Off Type

POST {{baseUrl}}/odata/TimeOffTypes

Create new Time Off Type entity.

  • unitId - available values below
export class TimeOffTypeUnit extends EnumEntity {
  public static get hour(): TimeOffTypeUnit {
    return {
      id: '0f340f34-4cc7-4cd7-9617-d9bed5d2e7c2',
      code: 'Hour'
    };
  }
  public static get workingDay(): TimeOffTypeUnit {
    return {
      id: 'd24aec3c-119c-4a8a-a3b9-b6b721985351',
      code: 'WorkingDay'
    };
  }
  public static get calendarDay(): TimeOffTypeUnit {
    return {
      id: '5cbfefa2-2871-4aad-a01a-e5019416cff4',
      code: 'CalendarDay'
    };
  }
}

Request Body

{"name"=>"Some reason leave", "code"=>"SLЗ", "unitId"=>"d24aec3c-119c-4a8a-a3b9-b6b721985351", "paid"=>true}

RESPONSES

status: Created

{"@odata.context":"https://api.timetta.com/odata/$metadata#TimeOffTypes/$entity","description":"Some reason leave","code":"SL3","minimumInterval":"FullDay","requiresTimeString":false,"name":"Some reason leave","createdById":"2010b229-62fb-427b-ad6a-b426d15dd39f","modifiedById":"2010b229-62fb-427b-ad6a-b426d15dd39f","id":"e9a604f7-3941-48bf-814a-746279d9f99e","created":"2022-09-08T12:16:35.7171049+03:00","modified":"2022-09-08T09:16:35.7126469Z","isActive":true,"unitId":"d24aec3c-119c-4a8a-a3b9-b6b721985351","paid":true}