Attendance Administrator Assignments

You can assign an administrator to an Attendance employee. The employee passed in must be a valid Attendance employee. The administrator passed in must be a valid Timekeeper manager.

You can assign, update, delete, and retrieve details about Attendance administrator assignments using operations against the /v1/commons/persons/attendance_admin resource.

Prerequisites

A person's person ID is the same as the personKey and employee ID, and is not the same as the person number.

The person in this example has a person ID of 25 and a person number of 10041.

Example

You can assign any person who is a valid Timekeeper manager as an Attendance administrator to a person holding a valid Attendance license, so there is no API call to retrieve a list of potential Attendance administrators to assign.

In this example, we assign, verify, update, and delete a person's Attendance administrator assignments.

Create the assignment

The same operation is used to both create an initial Attendance administrator assignment and to update that assignment.

The create request:

  • uses personIdentity to identify the person using their person number
  • uses administrator to define the Timekeeper manager to assign as an Attendance administrator
  • uses effectiveDate to define the effective date of the assignment

Example request

Call PUT /v1/commons/persons/attendance_admin with the following request payload.

{
    "personIdentity":{
        "personNumber":"10041"
    },
        "administrator":{
        "personNumber":"30165",
        "effectiveDate": "2020-02-20"
    }
}

For a successful request, the system returns HTTP status 204 with no response body.

Verify the assignment

To verify, you can call GET /v1/commons/persons/attendance_admin/{personId} or GET /v1/commons/persons/attendance_admin/?person_number={personNumber}.

Calling either GET /v1/commons/persons/attendance_admin/25 or /v1/commons/persons/attendance_admin/?person_number=10041 returns:

{
    "administrator": {
        "personNumber": "30165"
    },
    "personIdentity": {
        "personNumber": "10041"
    }
}

Update the assignment

To update the person's Attendance administrator assignment, call PUT /v1/commons/persons/attendance_admin with the following request payload.

Example request

{
    "personIdentity":{
        "personNumber":"10041"
    },
        "administrator":{
        "personNumber":"30105",
        "effectiveDate": "2020-06-01"
    }
}

For a successful request, the system returns HTTP status 204 with no response body.

Delete an assignment

To delete an Attendance administrator assignment associated with a person, call DELETE /v1/commons/persons/attendance_admin with the following request payload.

{
    "personIdentity":{
        "personNumber":"10041"
    }
}

For a successful request, the system returns HTTP status 204 with no response body.