> ## Documentation Index
> Fetch the complete documentation index at: https://developer.onetrust.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Priority Scores for Purpose Statuses

Use this API to update the current Priority Score values for the Purpose Statuses. Priority Scores across the entire Consent Group hierarchy are used to calculate the Effective Status of a Purpose.

> 🗒 Things to Know
> 
> - All Purpose Statuses are given a Priority Score. A Purpose Status with a lower Priority Score will be given precedence over a Purpose Status with a higher Priority Score. Any new Purpose Statuses will automatically be given a higher priority score by default.
> - When calculating the Effective Status of any Purpose in a Consent Group:
> - If there is no Parent Consent Group, the Effective Status becomes the same as the Enforced Status.
> - If there is a Parent Consent Group, the Effective Status would be calculated by comparing the Priority Score of the Enforced Status of the Purpose at that hierarchy level with the Priority Score of the Effective Status of the Purpose in the Parent level and applying the status associated with the lower Priority Score.

> 👍 
> 
> For more information, see [Using Consent Groups to Alter a Data Subject's Consent Status](https://developer.onetrust.com/onetrust/docs/using-consent-groups-to-alter-a-data-subjects-consent-status).

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Consent & Preferences - Universal Consent & Preference Management (OAS)",
    "version": "1.0",
    "contact": {
      "name": "OneTrust Support",
      "url": "https://my.onetrust.com/s/contactsupport"
    },
    "license": {
      "name": "Apache 2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0"
    },
    "description": "The Universal Consent & Preference Management APIs are used to integrate external systems and streamline the flow of data with Universal Consent & Preference Management in the OneTrust Platform."
  },
  "servers": [
    {
      "url": "https://{hostname}",
      "variables": {
        "hostname": {
          "default": "hostname",
          "description": "The OneTrust hostname such as app.onetrust.com, app-eu.onetrust.com, app-de.onetrust.com, app-uk.onetrust.com, app-apac.onetrust.com, trial.onetrust.com, or uat.onetrust.com."
        }
      }
    }
  ],
  "tags": [
    {
      "name": "Consent Groups",
      "description": "APIs for managing Consent Groups and their configurations.",
      "externalDocs": {
        "description": "OpenAPI 3.1.0 - Download Definition",
        "url": "https://developer.onetrust.com/onetrust/openapi/consent-preferences-universal-consent-preference-management-oas.json"
      },
      "x-displayName": "Consent Groups"
    }
  ],
  "paths": {
    "/api/consent/v2/consent-groups/settings": {
      "put": {
        "operationId": "updateConsentGroupSettingsUsingPUT",
        "summary": "Update Priority Scores for Purpose Statuses",
        "description": "Use this API to update the current Priority Score values for the Purpose Statuses. Priority Scores across the entire Consent Group hierarchy are used to calculate the Effective Status of a Purpose.\n\n> 🗒 Things to Know\n> \n> - All Purpose Statuses are given a Priority Score. A Purpose Status with a lower Priority Score will be given precedence over a Purpose Status with a higher Priority Score. Any new Purpose Statuses will automatically be given a higher priority score by default.\n> - When calculating the Effective Status of any Purpose in a Consent Group:\n> - If there is no Parent Consent Group, the Effective Status becomes the same as the Enforced Status.\n> - If there is a Parent Consent Group, the Effective Status would be calculated by comparing the Priority Score of the Enforced Status of the Purpose at that hierarchy level with the Priority Score of the Effective Status of the Purpose in the Parent level and applying the status associated with the lower Priority Score.\n\n> 👍 \n> \n> For more information, see [Using Consent Groups to Alter a Data Subject's Consent Status](https://developer.onetrust.com/onetrust/docs/using-consent-groups-to-alter-a-data-subjects-consent-status).",
        "tags": [
          "Consent Groups"
        ],
        "x-onetrust": {
          "spec-label": "https://developer.onetrust.com/onetrust/openapi/consent-preferences-universal-consent-preference-management-oas.json"
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConsentAPI_ConsentGroupSettingsDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successfully updated Consent Group settings.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsentAPI_ConsentGroupSettingsDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests. \nFor more information, see [API Rate Limits](https://developer.onetrust.com/onetrust/reference/rate-limits-overview).",
            "headers": {
              "Retry-After": {
                "schema": {
                  "description": "The number of seconds after which requests will be allowed again.",
                  "format": "int32"
                }
              },
              "ot-period": {
                "schema": {
                  "description": "The unit of time for which the rate limit applies",
                  "enum": [
                    "HOUR",
                    "MINUTE"
                  ]
                }
              },
              "ot-ratelimit-event-id": {
                "schema": {
                  "description": "The unique identifier for the rate-limiting event.",
                  "format": "uuid"
                }
              },
              "ot-request-made": {
                "schema": {
                  "description": "The number of requests made within the specified period.",
                  "format": "int32"
                }
              },
              "ot-requests-allowed": {
                "schema": {
                  "description": "The number of requests allowed within the specified period.",
                  "format": "int32"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "ConsentAPI_OAUTH2": [
              "CONSENT"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "ConsentAPI_ConsentGroupSettingsDto": {
        "type": "object",
        "properties": {
          "statusPriorityRules": {
            "description": "The Priority of the Purpose Statuses in the context of Consent Groups",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConsentAPI_ConsentGroupStatusPriorityDto"
            }
          }
        },
        "required": [
          "statusPriorityRules"
        ]
      },
      "ConsentAPI_ConsentGroupStatusPriorityDto": {
        "type": "object",
        "properties": {
          "status": {
            "description": "The Purpose Status value",
            "type": "string",
            "example": "ACTIVE",
            "enum": [
              "ACTIVE",
              "ALWAYS",
              "ACTIVE",
              "OPT OUT",
              "HARD OPT OUT",
              "PENDING",
              "NO CONSENT",
              "WITHDRAWN",
              "EXPIRED"
            ],
            "minLength": 1
          },
          "priority": {
            "description": "The Priority of the Purpose Status, with 0 being the highest possible value",
            "type": "integer",
            "format": "int32",
            "example": 3,
            "minimum": 0
          }
        },
        "required": [
          "priority"
        ]
      }
    },
    "securitySchemes": {
      "ConsentAPI_OAUTH2": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://{hostname}/api/access/v1/oauth/token",
            "scopes": {
              "CONSENT": "Consent Scope gives the user access to read/write operations",
              "CONSENT_READ": "Consent Read Scope gives the user read-only access"
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": false,
    "proxy-enabled": false,
    "metrics-enabled": false
  },
  "x-onetrust": {
    "spec-label": "OpenAPI 3.1.0"
  }
}
```