Skip to main content

Updating a Consent Type Version

This guide explains how to update an existing version of a consent type in your Consent Catalog using the PATCH /open-api/v1/consent-catalog/{consentCatalogId}/version/{versionEntry} endpoint.

Overview

As policies and terms evolve, you may need to update specific versions of a consent type in your catalog. This endpoint allows you to modify existing versions, such as updating the URL or description of a policy, without creating a new version.

caution

You can only edit existing versions that have no existing consents given by any end-user.

Endpoint

PATCH /open-api/v1/consent-catalog/{consentCatalogId}/version/{versionEntry}

Purpose

This endpoint allows you to update the details of an existing version of a consent type by specifying the unique ID of the consent type (consentCatalogId) and the specific version entry (versionEntry). Updating a version helps keep your consent records current and relevant.

Request Structure

URL

PATCH https://api.platform.illow.io/open-api/v1/consent-catalog/{consentCatalogId}/version/{versionEntry}

Replace {consentCatalogId} with the unique ID of the consent type and {versionEntry} with the ID of the version you want to update.

Headers

HeaderTypeRequiredDescription
X-API-KeyStringYesAPI Key for your account

Payload

The request body should be in JSON format and can include the following fields:

{
"url": "string",
"description": "string"
}

Payload Details

  • url (optional): The updated URL of the policy or terms associated with this version.
  • description (optional): The updated description of the version, reflecting any recent changes.

Example Request

curl -X PATCH https://api.platform.illow.io/open-api/v1/consent-catalog/44499771-03fb-4f0c-8620-88f538385446/version/2 \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/updated-policy-v2.1",
"description": "Minor updates to clarify data usage practices."
}'

Example Response

{
"companyId": "b830b5fa-9180-4cb6-9f40-4cbe4729d0ac",
"consentCatalogId": "44499771-03fb-4f0c-8620-88f538385446",
"version": "2",
"type": "privacyPolicy",
"createdAt": 1622470423,
"url": "https://example.com/updated-policy-v2.1",
"description": "Minor updates to clarify data usage practices.",
"isUsed": false
}

Response Codes

  • 200 OK: The version was successfully updated.
  • 400 Bad Request: Invalid or missing parameters.
  • 404 Not Found: The specified consent type or version was not found.
  • 500 Internal Server Error: An unexpected error occurred.

Best Practices

  • Ensure the URL points to the correct and updated version of your policy or terms.
  • Use descriptive and accurate text in the description field to provide context for the updates.
  • Regularly review and update versions to ensure compliance with the latest legal and policy changes.