# Claims (single claim) \[PATCH]

The `PATCH` request to the `/parties/{partyId}/claims/{claimId}` endpoint can be used to update a claim for a party in the Participant Registry.

{% hint style="info" %}
The `PATCH` request to the `/parties/{partyId}/claims/{claimId}` is an **OPTIONAL** endpoint.
{% endhint %}

### Request model

The following URL parameters must be used.

* `partyId` {url}/parties/{**partyId**} <mark style="color:red;">(Required)</mark>\
  **String**. The id of the party for who a claim must be updated. Can be anyone of the party id from id or alsoKnownAs attributes of that participant. Since all participants are automatically allocated the derived ishare did, that id is always an option to search for a participant.
* `claimId` {url}/parties/{partyId}/claims/{**claimId**} <mark style="color:red;">(Required)</mark>\
  **String**. The id of the claims that must be updated.

The body may contain any number of key/value pairs that define what properties must be updated **in the specified claimId only**.

* The **key** represents the property path within the claim (using dot notation for nested properties)
* The **value** is the new value to set.

Take into account the following:

* Only the provided fields will be updated, other fields remain unchanged.
* Note that claims cannot be deleted, but instead the status can be set to revoked or inactive.
* Because the {claimId} must be provided in the URL, only the properties of that\
  specific claim may be updated in one request. If you want to update multiple claims, you must make multiple requests.
* The claim ID and type cannot be changed through this operation.

Examples of property paths:

* "status" - Update claim status
* "validFrom" - Update validity start time (ISO 8601 date-time)
* "validUntil" - Update validity end time (ISO 8601 date-time)
* "roleId" - Update role ID in role claim
* "additionalInfo.companyEmail" - Update contact email in additional info

The request must be passed as JWT. The JSON body must contain a claim. Refer to [Claim models](/reference/claim-models.md) for an overview of available claims.

### Example request

The following is an example request to update a frameworkRole claim.

```json
POST /parties/ HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json

{
  "status": "active",
  "startDate": "2024-01-01T00:00:00.000Z",
  "endDate": "2024-12-31T23:59:59.999Z",
  "roleId": "ServiceProvider",
  "loa": 2,
}
```

### Response model

The response will be equal to the response of the [GET request for retrieving a single claim](/participant-registry-role/claims-single-claim-get.md). Refer to the response model as defined here.

### Example response

Refer to the example response under the [GET request](/participant-registry-role/claims-single-claim-get.md) definition.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dev.ishare.eu/participant-registry-role/claims-single-claim-patch.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
