This topic provides guidance on how to load existing user agreement consents into PingOne. It assumes that your users and agreements are already loaded into PingOne. For information about creating and managing PingOne agreements, see Agreement Management. For information about creating and managing users, see Users.

In this topic, the following terms are used to describe the PingOne and external entities:

Migrate external agreement consents

Follow these steps to load one existing external user agreement consent into PingOne:

Step 1: Get information from the external existing consent record

Extract the following information from your existing agreement consent record. You will need this information to complete Step 2:

Step 2: Create the user’s PingOne agreement consent

To create the user’s corresponding PingOne agreement consent, you can make requests to the following PingOne endpoint: POST /environments/{environmentId}/users/{userId}/agreementConsents/{agreementId}. You will need the information for the external agreement consent you collected in Step 1.

The POST /environments/{environmentId}/users/{userId}/agreementConsents/{agreementId} request uses a Content-Type header with a value of application/vnd.pingidentity.consent.accept+json to initiate the consent accept action.

The request body for this request requires the following properties:

	language: { id: "{languageId}" },
	revision: { id: "{revisionId}" },
	consentedAt: "{date}"

The languageId property value is the ID of the language resource associated with the agreement revision. The revisionId is the PingOne current active agreement revision ID.

For more information about the POST /environments/{environmentId}/users/{userId}/agreementConsents/{agreementConsentId} request, see Accept Agreement.

To load multiple existing external user agreement consents into PingOne, you can perform this operation over your existing external agreement consents and load each one at a time. Please ensure you account for API rate limits.