#Human Resources API Overview:
This human resources API is for providing fictitious information about corporate personnel and their payment card details; each table of employees and cards can include up to 900 records. You can use different listed endpoints to get all table records or a record by a specific ID. Using the paginate method, you may also receive a set number of rows for each table. Or use the relation endpoint to get card information associated with an employee ID or the opposite.
##Below is the list of all included endpoints for this API:
/api/cards
( Get all payment cards )
/api/employees
( Get all company’s employees )
/api/cards/:id
( Get a specific card by ID )
/api/employees/:id
( Get a specific employee by ID )
/api/cards/paginate/:start/:end
( Select specific records from payment card table )
/api/employees/paginate/:start/:end
( Select specific records from employees table )
/api/relation/cards/:id/employee
( Select the employee associated with a card ID )
/api/relation/employees/:id/cards
( Select cards associated with an employee ID )
##Example of response for the employees endpoints:
{
"metadata": {
"message": "Thank you for using our API! you are awesome!"
},
"data": [
{
"empID": 158108,
"namePrefix": "Mr.",
"firstName": "Bernard",
"middleInitial": "N",
"lastName": "Weatherly",
"gender": "M",
"email": "bernard.weatherly@gmail.com",
"fatherName": "Wilbur Weatherly",
"motherName": "Liana Weatherly",
"dateOfBirth": "8/19/1961",
"timeOfBirth": "8:27:47 PM",
"ageInYears": 55.98,
"weightInKgs": 69,
"dateOfJoining": "7/21/2017",
"yearOfJoining": 2017,
"monthOfJoining": 7,
"monthNameOfJoining": "July",
"shortMonth": "Jul",
"dayOfJoining": 21,
"DOWofJoining": "Friday",
"shortDOW": "Fri",
"ageInCompany_Years": 0.02,
"salary": 81323,
"lastPercentHike": "13%",
"ssn": "701-18-3166",
"phoneNumber": "423-283-5871",
"placeName": "Shelbyville",
"county": "Bedford",
"city": "Shelbyville",
"state": "TN",
"zip": 37160,
"region": "South",
"username": "bnweatherly",
"password": "Uzb4X[S_",
"bankCardNumber": 4068055549351680
},
{
.....Rest of employees here ....
}
]
}
##Example of response for the payment cards endpoints:
{
"metadata": {
"message": "Thank you for using our API! you are awesome!"
},
"data": [
{
"cardTypeCode": "VI",
"cardTypeFullName": "Visa",
"issuingBank": "PNC",
"cardNumber": 4068055549351680,
"cardHolderName": "Bernard N Weatherly",
"ccv_ccv2": 615,
"issueDate": "15-Dec",
"expiryDate": "28-Dec",
"billingDate": 8,
"cardPIN": 6633,
"creditLimit": 21300,
"cardHolderID": 158108
},
{
......Rest of payment cards here .....
}
]
}
##Pagination endpoints:
Pagination endpoints will get you the same responses as mentioned above plus metadata to help with pagination in your frontend application,
below is an example of this pagination
{
"metadata": {
"message": "Thank you for using our API! you are awesome!",
"start": 1,
"end": 25,
"previousPage": null,
"currentPage": 1,
"nextPage": 2,
"totalPages": 39
},
"data": [
{
..... your data here .....
}
}
}
For any questions regarding the API don’t hesitate to contact us by using our profile contact button.