Skip to main content

Deleting the Latest Version

This guide explains how to delete the latest version of a consent type in your Consent Catalog using the DELETE /open-api/v1/consent-catalog/{consentCatalogId}/version endpoint.

Overview

Occasionally, you may need to remove the latest version of a consent type, such as when a recent policy update contains errors or is no longer applicable. This endpoint allows you to delete the most recent version of a consent type, ensuring that the previous version remains active.

caution

You can only delete existing versions that have no existing consents given by any end-user. To delete the first version, remove the entire Consent Type.

Endpoint

DELETE /open-api/v1/consent-catalog/{consentCatalogId}/version

Purpose

This endpoint allows you to delete the latest version of a consent type by specifying its unique ID (consentCatalogId). Only the most recent version will be removed, and earlier versions will remain unaffected.

Request Structure

URL

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

Replace {consentCatalogId} with the unique ID of the consent type whose latest version you want to delete.

Headers

HeaderTypeRequiredDescription
X-API-KeyStringYesAPI Key for your account

Example Request

curl -X DELETE https://api.platform.illow.io/open-api/v1/consent-catalog/44499771-03fb-4f0c-8620-88f538385446/version \
-H "X-API-Key: YOUR_API_KEY"

Example Response

If the deletion is successful, the response body will be empty, and the server will return a status code of 200 OK, indicating that the latest version was successfully deleted.

Response Codes

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

Best Practices

  • Verify that you are deleting the correct latest version, as this action cannot be undone.
  • Consider the impact of removing the latest version and ensure the previous version remains accurate and compliant.
  • Use this operation only when necessary, such as when the latest version contains errors or incorrect information.