Attestation Profile Assignments

The Attestation Profile, which is assigned to employees in People Information, contains one or more attestation assignments.

You can assign, update, unassign, and retrieve details about Attestation Profile assignments using operations against the /v1/commons/persons/attestation_profile_assignments 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 100 and a person number of 20190.

Example

In this example, we assign, retrieve, update, and then delete a person's Attestation Profile assignments.

Create the assignment

The create request:

  • passes person ID 100 in the URL to identify the person
  • defines the profile to assign
  • defines the effective date of the assignment

Example request

Call POST /v1/commons/persons/100/attestation_profile_assignments with the following request payload.

{
  "profile": {
    "id": 1
  },
  "effectiveDate": "2020-06-01"
}

Example response

A success response returns HTTP status code 201 and a response body similar to the following example.

{
    "person": {
        "id": 100,
        "qualifier": "20190"
    },
    "profile": {
        "id": 1,
        "qualifier": "attestationDefault"
    },
    "effectiveDate": "2020-06-01",
    "expirationDate": "3000-01-01"
}

Verify the assignment

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

Calling either GET /v1/commons/persons/100/attestation_profile_assignments or GET /v1/commons/persons/attestation_profile_assignments?person_number=20190 returns an array containing a list of one or more attestation assignments:

[
    {
        "person": {
            "id": 100,
            "qualifier": "20190"
        },
        "profile": {
            "id": 1,
            "qualifier": "attestationDefault"
        },
        "effectiveDate": "2020-06-01",
        "expirationDate": "3000-01-01"
    }
]

Update the assignment

To update the person's attestation assignments, POST a call to /v1/commons/persons/attestation_profile_assignments/multi_update with the following request payload.

Example request

[
  {
    "attestationProfileAssignments": [
      {
        "effectiveDate": "2020-06-01",
        "profile": {
          "id": 1
        }
      },
      {
        "effectiveDate": "2020-03-15",
        "profile": {
          "id": 2
        }
      }
    ],
    "employee": {
      "id": 100,
      "qualifier": "20190"
    }
  }
]

Example response

[
  {
    "employee": {
      "id": 100,
      "qualifier": "20190"
    },
    "attestationProfileAssignments": [
      {
        "profile": {
          "id": 1,
          "qualifier": "attestationDefault"
        },
        "effectiveDate": "2020-06-01",
        "expirationDate": "3000-01-01"
      },
      {
        "profile": {
          "id": 2,
          "qualifier": "attestationSecondary"
        },
        "effectiveDate": "2020-03-15",
        "expirationDate": "3000-01-01"
      }
    ]
  }
]

Delete all assignments

To delete all attestation profiles assignments associated with a person, call POST /v1/commons/persons/attestation_profile_assignments/multi_update with the following request payload.

The delete request assigns an Empty Profile to the employee, which deletes all attestation profile assignments.

Example request

[
  {
    "attestationProfileAssignments": [
      {
        "effectiveDate": "2020-03-15",
        "profile": {
          "id": -1
        }
      }
    ],
    "employee": {
      "id": 100,
      "qualifier": "20190"
    }
  }
]

Example response

[
    {
        "employee": {
            "id": 100,
            "qualifier": "20190"
        },
        "attestationProfileAssignments": [
            {
                "profile": {
                    "id": -1,
                    "qualifier": "Empty Profile"
                },
                "effectiveDate": "2020-01-15",
                "expirationDate": "3000-01-01"
            }
        ]
    }
]