Skip to main content

Updating a Consent Type

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

Overview

Once a consent type is created, you may need to update its details over time, such as changing the title or description. This endpoint allows you to make those updates while preserving the existing data structure and history.

Remember that the title and description of a Consent Type are not versioned.

Endpoint

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

Purpose

This endpoint allows you to update the details of an existing consent type by specifying its unique ID (consentCatalogId). You can update fields like the title or description.

Request Structure

URL

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

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

Headers

HeaderTypeRequiredDescription
X-API-KeyStringYesAPI Key for your account

Payload

The request body should be in JSON format and contain the fields you want to update. Here’s the structure:

{
"title": "string",
"description": "string"
}

Payload Details

  • title (optional): The updated title for the consent type.
  • description (optional): The updated description for the consent type.

Example Request

curl -X PATCH https://api.platform.illow.io/open-api/v1/consent-catalog/44499771-03fb-4f0c-8620-88f538385446 \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Wider Privacy Policy",
"description": "Privacy Policy used in the website and the mobile app"
}'

Example Response

{
"companyId": "b830b5fa-9180-4cb6-9f40-4cbe4729d0ac",
"id": "44499771-03fb-4f0c-8620-88f538385446",
"title": "Wider Privacy Policy",
"description": "Privacy Policy used in the website and the mobile app",
"type": "privacyPolicy",
"latestVersion": "1"
}

Response Codes

  • 200 OK: The consent type was successfully updated.
  • 400 Bad Request: Invalid or missing parameters.
  • 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 and exists before making the request.
  • Only include the fields you want to update in the request payload.
  • Use clear and descriptive values for fields like title and description to maintain accurate records of your consent types.

Additional Resources