Skip to main content

Deleting a Consent Type

This article explains how to delete a consent type from your Consent Catalog using the DELETE /open-api/v1/consent-catalog/{consentCatalogId} endpoint.

Overview

In certain situations, you might need to remove a consent type from your catalog, such as when a policy is no longer relevant or has been replaced entirely. This endpoint allows you to permanently delete a consent type from your platform’s Consent Catalog by specifying its unique ID.

caution

You can only delete those Consent Types that were never used, i.e. that have no consent present in the Consent Logs.

Endpoint

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

Purpose

This endpoint allows you to delete a specific consent type from your catalog by its unique ID (consentCatalogId). Once deleted, the consent type and its associated data will be permanently removed from the system.

Request Structure

URL

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

Replace {consentCatalogId} with the unique ID of the consent type 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 \
-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 204 No Content, indicating that the deletion was successful and there is no additional content to return.

Response Codes

  • 200 OK: The consent type was successfully deleted.
  • 400 Bad Request: The consentCatalogId provided is invalid.
  • 404 Not Found: The specified consent type was not found.
  • 500 Internal Server Error: An unexpected error occurred.

Best Practices

  • Ensure the consentCatalogId is correct, exists and was never used before attempting to delete the consent type.
  • Be cautious when deleting a consent type as this action is irreversible and will remove the consent type and its associated data from your catalog.
  • Consider archiving or versioning a consent type instead of deleting it if you may need it for historical reference.

Additional Resources