Skip to content

Update the consent categories assigned to an audit

Request

PATCH /v3/web-audits/{auditId}/consent-categories

Update the consent categories assigned to an audit. Consent categories with different statuses (approved and unapproved) can be assigned to the same audit. Conflicts are resolved automatically: when an item matches consent categories with different statuses, unapproved takes precedence over approved.

Security
API_Key
Path
auditIdinteger, (int64)required

Unique identification number for web audit

Example:107239
Bodyapplication/json-patch+jsonrequired
Array [
opstring

The operation to be performed

Enum:"add""remove"
pathstring
valueinteger

id of the item to assign

]
curl -i -X PATCH \
  https://api.observepoint.com/v3/web-audits/107239/consent-categories \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json-patch+json' \
  -d '[
    [
      {
        "op": "add",
        "path": "/-",
        "value": 1
      },
      {
        "op": "remove",
        "path": "/",
        "value": 2
      }
    ]
  ]'

Responses

OK, return the modified consent category assignments

Bodyapplication/json
consentCategoriesArray of objectsrequired
Response
{ "consentCategories": [ { … } ] }