In this article we going to take a closer look the Contact/Employee endpoint and some of the fields that are used in this endpoint.
This endpoint supports all four HTTP methods of GET, POST, PUT, DELETE. Here we are going to take a closer look at POST and GET.
POST
When needing to create an employee, this is the endpoint that you would use with the POST method.
In the body of your request, the required fields that you need to include at bare minimum are:
{
"LastName": "Test2",
"FirstName": "API",
"IsIndividual": true,
"IsActive": true
}
GET
Once the Employee is created, a GET request to this endpoint will return a list of employees. In the response body, along side the standard fields like Name, Address etc you will also notice a few other fields. These additional fields act like a directory of where to head next when adjusting or retrieving payroll information for an employee.
They are:
- Employee Payroll Details
"EmployeePayrollDetails": {
"UID": "97bf629b-01d0-4d2d-a634-026aa447f027",
"URI": "{cf_uri}/Contact/EmployeePayrollDetails/97bf629b-01d0-4d2d-a634-026aa447f027"
},
This object provides you with the URL to call for this particular employees payroll details. For more information about the Employee Payroll Details endpoint, check out the endpoint documentation or head on over to our Employee Payroll details article.
- Employee Payment Details
"EmployeePaymentDetails": {
"UID": "974c9258-90dd-462f-8463-c81022b47504",
"URI": "{cf_uri}/Contact/EmployeePaymentDetails/974c9258-90dd-462f-8463-c81022b47504"
},
This object provides you with the URL to call for this particular employees payment details. For more information about the Employee Payment Details endpoint, check out the endpoint documentation or head on over to our Employee Standard Pay article.
- Employee Standard Pay
"EmployeeStandardPay": {
"UID": "97bf629b-01d0-4d2d-a634-026aa447f027",
"URI": "{cf_uri}/Contact/EmployeeStandardPay/97bf629b-01d0-4d2d-a634-026aa447f027"
},
This object provides you with the URL to call for this particular employees standard pay information. For more information about the Employee Standard Pay endpoint, check out the endpoint documentation.
This endpoint also has a LastModified field, this will allow you to keep check of any changes that have occurred directly to the information that is being returned.
If you would like to see how the Employee Contact endpoint relates to what is seen with in product, Check out the Add an employee help article.
Comments
0 comments
Article is closed for comments.