Admin_Sick_Vacation

Self-service web service to update sick and vacation time and returns balances for the calling user.

More information: https://it.byu.edu
Contact Info: api@byu.edu

Base URL: /domains/erp/hr/Admin_Sick_Vacation

Version: v1

Default response content-types: application/json
Schemes: https

Summary

Path Operation Description
/employees GET

Admin Sick/Vacation Summaries for a Department User

/employees/{byu_id} POST

Admin Sick/Vacation Entry

Paths

Admin Sick/Vacation Summaries for a Department User

GET /employees

Get sick/vacation unreported months or leave balances summaries

byu_id

Mutually exclusive with department_id. The nine-digit computer-generated ID assigned to each identity in BYU-IAM, which is printed on the BYU ID Card in the format xx-xxx-xxxx and serves as a unique identifier

query string , must match [0-9]{9}
department_id

Mutually exclusive with byu_id. A four digit alphanumeric identifier that uniquely specifies a campus Department

query string , must match ([a-zA-z] | [0-9]){4}

Uses default content-types: application/json

200 OK

Service request is OK and a response has been generated.

Example for application/json
{
"oneOf": [
{
"employees": [
{
"byu_id": "111111111",
"name": "employee, first",
"sick_balance": 154,
"unreported_months": [
9,
10
]
,
"vacation_balance": 22.66669
},
{
"byu_id": "222222222",
"name": "employee, second",
"sick_balance": 24,
"unreported_months": [
10
]
,
"vacation_balance": 14.333334
},
{
"byu_id": "333333333",
"name": "employee, third",
"sick_balance": 4,
"vacation_balance": 21.666674
}
]
},
{
"byu_id": "333333333",
"name": "employee, third",
"sick_balance": 4,
"unreported_months": [
9,
10
]
,
"vacation_balance": 21.666674
}
]
}
400 Bad Request

An error is shown if the query parameters are wrong, which could either be having both department_id and byu_id at the same time or not having either one of them that is valid.

Example for application/json
{
"oneOf": [
{
"error_message": "byu_id and deptid query parameters are mutually exclusive"
},
{
"error_message": "You must include a valid department_id or byu_id"
}
]
}
401 Unauthorized #/responses/401

Authentication required to access data

403 Forbidden

An error will come up if there person calling the web service does not have access to see information for their department or for the person specified.

Example for application/json
{
"oneOf": [
{
"error_message": "You do not have permission to access information from this department"
},
{
"error_message": "You cannot call this web service for this person"
}
]
}
500 Internal Server Error #/responses/500

Internal Server Error - Error occurred that wasn't the user's fault

504 Gateway Timeout #/responses/504

Gateway Timeout

default #/responses/default

Unexpected error

Admin Sick/Vacation Entry

POST /employees/{byu_id}

Update sick/vacation hours taken for an administrative employee

application/json

Sick and Vacation Parameters

byu_id

The nine-digit computer-generated ID assigned to each identity in BYU-IAM, which is printed on the BYU ID Card in the format xx-xxx-xxxx and serves as a unique identifier

path string , must match [0-9]{9}

Uses default content-types: application/json

200 OK

Service request is OK and a response has been generated.

Example for application/json
{
"byu_id": "333333333",
"name": "employee, third",
"sick_balance": 4,
"vacation_balance": 21.666674
}
400 Bad Request

There appears to be a syntax error in the composition of the service request. The response structure may contain information about the error.

Example for application/json
{
"oneOf": [
{
"error_message": "Employee has unreported months",
"unreported_months": [
9,
10
]
},
{
"error_message": "In order to have 0 hours taken, you must also indicate that you did not take any hours for that month in the no_sick_hours or no_vac_hours value."
},
{
"error_message": "byu_id is invalid"
}
]
}
401 Unauthorized #/responses/401

Authentication required to access data

403 Forbidden

The person calling the web service does not have access to call it for the person specified in the path

Example for application/json
{
"error_message": "You cannot call this web service for this person"
}
500 Internal Server Error #/responses/500

Internal Server Error - Error occurred that wasn't the user's fault

504 Gateway Timeout #/responses/504

Gateway Timeout

default #/responses/default

Unexpected error

Response definitions

401

Authentication required to access data

500

Internal Server Error - Error occurred that wasn't the user's fault

504

Gateway Timeout

default

Unexpected error

Schema definitions

byu_id: string , must match ^[0-9]{9}$

department_leave_data: object

values: object[]

employee_leave_data: object

values: object[]
name: name
byu_id: byu_id
sick_balance: sick_balance
vacation_balance: vacation_balance

error: string

error message

error_response: object

error_message: error
unreported_months: unreported_months_error

month: integer , x ∈ { 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 }

The number corresponding to the month of the year for which the sick/vacation time will be entered

name: string (up to 50 chars)

The employee's name

no_sick_hours: boolean

A boolean value stating if the employee took zero sick hours for the month.

no_vac_hours: boolean

A boolean value stating if the employee took zero vacation hours for the month.

parameters: object

vacation_amount: vacation_amount
no_vac_hours: no_vac_hours
sick_amount: sick_amount
no_sick_hours: no_sick_hours
values: object[]

sick_amount: integer

Amount of sick hours taken for the last month in whole numbers.

sick_balance: number

The current balance of sick hours that an employee has available.

unreported_month: object

month: month
sick_amount: sick_amount
no_sick_hours: no_sick_hours
vacation_amount: vacation_amount
no_vac_hours: no_vac_hours

unreported_months: integer , x ∈ { 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 }

The number corresponding to the month of the year for which the sick/vacation time will be entered

unreported_months_error: number[]

A summary of the unreported months that are preventing the employee from submitting time

number

vacation_amount: integer

Amount of vacation hours taken for the last month in whole numbers.

vacation_balance: number

The current balance of vacation hours that an employee has available.

Service Path: 
/domains/erp/hr/Admin_Sick_Vacation
Domain or University API: 
/domains/erp/hr/Admin_Sick_Vacation

Community

 

Don't see your question listed here? Ask!