Custom Consent Themes
DELETE
Section titled “DELETE”Delete an existing custom consent theme. The query has the following JSON shape:
[ { "account_id": "<string>", "website_id": "<string>", "id": "<string>" }]The query must have 1 or more request objects and will respond with the same number of success or error objects. Once constructed the object must be URL encoded and be the value for the query parameter.
If the entire request is in error or invalid, the result JSON will be a request error.
Example 1
Section titled “Example 1”Multiple deletion requests
Request
Section titled “Request”DELETE https://api.termly.io/v1/websites/custom_consent_themes?query=%5B%7B%22account_id%22%3A%22acct_123%22%2C%22website_id%22%3A%22web_124%22%2C%22id%22%3A%22cct_123%22%7D%2C%7B%22account_id%22%3A%22acct_123%22%2C%22website_id%22%3A%22web_123%22%2C%22id%22%3A%22cct_12%22%7D%5D[ { "account_id": "acct_123", "website_id": "web_124", "id": "cct_123" }, { "account_id": "acct_123", "website_id": "web_123", "id": "cct_12" }]Response
Section titled “Response”[ { "account_id": "acct_123", "website_id": "web_124", "id": "cct_123", "_idx": 0 }, { "account_id": "acct_123", "website_id": "web_123", "id": "cct_12", "_idx": 1 }]Example 2
Section titled “Example 2”Multiple requests with one failure
Request
Section titled “Request”DELETE https://api.termly.io/v1/websites/custom_consent_themes?query=%5B%7B%22account_id%22%3A%22acct_123%22%2C%22website_id%22%3A%22web_124%22%2C%22id%22%3A%22cct_123%22%7D%2C%7B%22account_id%22%3A%22acct_123%22%2C%22website_id%22%3A%22web_123%22%2C%22id%22%3A%22cct_12%22%7D%2C%7B%22account_id%22%3A%22acct_123%22%2C%22website_id%22%3A%22web_123%22%2C%22id%22%3A%22cct_123%22%7D%5D[ { "account_id": "acct_123", "website_id": "web_124", "id": "cct_123" }, { "account_id": "acct_123", "website_id": "web_123", "id": "cct_12" }, { "account_id": "acct_123", "website_id": "web_123", "id": "cct_123" }]Response
Section titled “Response”[ { "account_id": "acct_123", "website_id": "web_124", "id": "cct_123", "_idx": 0 }, { "account_id": "acct_123", "website_id": "web_123", "id": "cct_12", "_idx": 1 }, { "error": "custom_consent_theme_not_found", "_idx": 2 }]Example 3
Section titled “Example 3”A theme that is still in use
Request
Section titled “Request”DELETE https://api.termly.io/v1/websites/custom_consent_themes?query=%5B%7B%22account_id%22%3A%22acct_123%22%2C%22website_id%22%3A%22web_123%22%2C%22id%22%3A%22cct_12%22%7D%2C%7B%22account_id%22%3A%22acct_123%22%2C%22website_id%22%3A%22web_123%22%2C%22id%22%3A%22cct_123%22%7D%5D[ { "account_id": "acct_123", "website_id": "web_123", "id": "cct_12" }, { "account_id": "acct_123", "website_id": "web_123", "id": "cct_123" }]Response
Section titled “Response”[ { "account_id": "acct_123", "website_id": "web_123", "id": "cct_12", "_idx": 0 }, { "error": "custom_consent_theme_in_use", "_idx": 1 }]custom_consent_theme_in_use means one of the website’s banner regions, or the website’s style, still uses the theme, so it was not deleted. Switch them to another theme first, then delete it again.