Agreement revisions define the specific version text (the agreement content) to manage the lifecycle of the agreement to which users provide consent.

A revision resource allows you to update the content for an agreement language. (A language can have up to 100 associated revisions.) The revision must have a value specified for the effectiveDate property, and when showing content to a user for an agreement language, the content associated with a revision with an effective date closest to the current date is shown. The revision can be configured to force the user to consent again to the agreement.

The revisions service implements functions to create, read, and delete agreement revision resources. Agreement revision resources cannot be updated. If an agreement revision needs to be updated, a new agreement revision should be created. In addition, agreement revision resources that have become effective cannot be deleted, which ensures that consent data is preserved.

Revisions data model

Property Description
agreement A relationship that specifies the ID of the agreement resource for this revision.
contentType A string that specifies the content type of the revision text. Options are text/html and text/plain. This is a required property for POST requests.
effectiveAt A date that specifies the start date that the revision is presented to users. This property value can be modified only if the current value is a date that has not already passed. The effective date must be unique for each language agreement, and the property value can be the present date or a future date only.
id A string that specifies the revision ID.
language A relationship that specifies the language resource associated with this revision.
notValidAfter A date that specifies whether the revision is still valid in the context of all revisions for a language. This property is calculated dynamically at read time, taking into consideration the agreement language, the language enabled property, and the agreement enabled property. When a new revision is added, the notValidAfter property values for all other previous revisions might be impacted. For example, if a new revision becomes effective and it forces reconsent, then all older revisions are no longer valid.
requiresReconsent A boolean that specifies whether the user is required to provide consent to the language revision after it becomes effective.
text A string that specifies text for the revision. The revision has a text size limit of 32K (16,000 characters). The text supports unicode letters, combining marks, numeric characters, whitespace, and punctuation characters: ^[\p{L}\p{M}\p{N}\p{Zs}\p{P}]+$

Response codes

Code Message
200 Successful operation.
201 Successfully created.
204 Successfully removed. No content.
400 The request could not be completed.
401 You do not have access to this resource.
403 You do not have permissions or are not licensed to make this request.
404 The requested resource was not found.