Start the Attestation Process
After an employee presses a configured button, such as a Punch button, and the conditions are met to require an employee attestation, your application must call the Start Attestation Process (POST /v1/timekeeping/attestation_process
) API operation.
In this example, we start the Attestation process for an employee.
The request:
- uses the
employee
object reference to identify the person - uses the
button
object reference to identify the button pressed by the employee in your application - uses
source
to identify the source of the attestation request; at this time, UDM (Universal Device Manager) and WFD are supported.
Example request
Call the Start Attestation Process (POST /v1/timekeeping/attestation_process
) operation with the following request payload.
{
"employee": {
"qualifier": "20335"
},
"button": {
"id": 2
},
"source": "WFD"
}
Example response
A success response returns HTTP status code 200 and a response body similar to the following example.
{
"attestationProcess": {
"id": 9
},
"flows": [
{
"id": 10509,
"qualifier": "Simple Question Form v2",
"name": "Simple Question Form v2"
}
],
"params": {
"estimatedPunchTime": "2021-05-11T15:42:35.762127461",
"empDstStart": "2021-03-14T02:00",
"userAgentHeader": "PostmanRuntime/7.28.0",
"shiftStartOrTodayDate": "2021-05-11",
"empTimezoneOffset": "-18000000",
"xForwardedForHeader": "10.239.0.190",
"todayDate": "2021-05-11",
"timeFrame": "0",
"empDstEnd": "2021-11-07T02:00",
"enableFixMissingPunchWorkflow": "true",
"wfd_initiator_locale_policy": "{\"id\":1,\"name\":\"American English\",\"description\":\"American English Locale Settings\",\"activesw\":true,\"displayName\":\"American English\",\"languageCode\":\"EN\",\"countryCode\":\"US\",\"selectableAtLogon\":false,\"displayDateTimeFormats\":{\"longDateFormat\":\"M/dd/yyyy\",\"shortDateFormat\":\"E M/dd\",\"dayMonthFormat\":\"M/dd\",\"timeFormat\":\"h:mm a\"},\"dateTimeFormats\":{\"longDateFormat\":\"M/dd/yyyy\",\"shortDateFormat\":\"E M/dd\",\"dayMonthFormat\":\"M/dd\",\"timeFormat\":\"h:mm a\"},\"numberFormat\":{\"decimalSymbol\":\".\",\"decimalPrecision\":2,\"groupingSymbol\":\",\",\"groupingPattern\":\"GROUP_BY_3\",\"negativePattern\":\"MINUS_LEFT_NO_SPACE\"},\"currencyFormat\":{\"decimalPrecision\":2,\"negativePattern\":\"CURRENCY_LEFT_MINUS_BEFORE_CURRENCY_NO_SPACE\",\"positivePattern\":\"CURRENCY_LEFT_NO_SPACE\"},\"weekStartDay\":1,\"localeSettings\":{\"timeSeparator\":\":\",\"timeAmMarker\":\"AM\",\"timePmMarker\":\"PM\",\"dateTimeSeparator\":\" \",\"spanCharacter\":\"-\",\"spanSeparator\":\" - \"},\"tenantDefault\":true}",
"predictiveSchedulingRequest": "",
"estimatedPunchTimeInEmployeeTimezone": "2021-05-11T11:42:35.762127461",
"empTimezoneId": "134111",
"submitForManagerApproval": "false"
}
}
Response analysis
The flows
array returns all of the workflows that need to be executed for the button selected by the employee. In this example we use only one flow. When multiple flows are present, they are presented in the array in the order in which they must be executed.
Use the workflow in the flow
array (or the first workflow if multiple flows are present) and all of the properties in params
as input to execute the next API call to Initiate a User Workflow.
Updated over 1 year ago