> For the complete documentation index, see [llms.txt](https://dev.ishare.eu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dev.ishare.eu/participant-registry-role/parties-single-party-put.md).

# Parties (single party) \[PATCH]

The `PATCH` request to the `/parties/{partyId}` endpoint can be used to partially update information of an iSHARE participant in the Participant Registry (name and alsoKnownAs). Only the provided fields will be updated, other fields remain unchanged. The partyId cannot be changed through this operation. To update information stored in claims, use the PATCH method on claims instead.

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

## Update party information

> Used to partially update information of an iSHARE participant in the Participant  Registry. Only the provided fields will be updated, other fields remain unchanged. The party ID cannot be changed through this operation, however, new party id can be added to \`alsoKnownAs\` array.\
> The request body carries the update as an iSHARE signed JSON Web Token in the attribute \`partyUpdateToken\`. Please refer to the iSHARE JWT header (see <https://dev.ishare.eu/reference/ishare-jwt>) and the model 'jwtPayloadPartyUpdateToken' which indicate what the decoded token must look like. Its \`aud\` is the party ID of this Participant Registry, and its \`iss\` and \`sub\` are the party ID of the client that sends the request. A request whose body is not such a token is rejected with 400.\
> Server response is an iSHARE signed JSON Web Token. Please refer to the iSHARE JWT header (see <https://dev.ishare.eu/reference/ishare-jwt>) and the model 'jwtPayloadPartyToken' which indicate what the decoded response will look like.

```json
{"openapi":"3.0.0","info":{"title":"iSHARE API specifications","version":"3.0.1"},"tags":[{"name":"Participant Registry (Optional)","description":"Optional endpoints for the iSHARE Participant Registry API."}],"servers":[{"description":"iSHARE UAT network base domain","url":"https://isharetest.net"},{"description":"iSHARE TEST network base domain","url":"https://test.ishareworks.nl"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"OAuth 2.0 authorization based on bearer token. MUST contain “Bearer “ + access token value. Must be provided if restricted endpoints are needed."}},"schemas":{"partyUpdateRequest":{"title":"PartyUpdateRequest","description":"Request body for partially updating a party. The partyUpdateToken is an iSHARE signed JSON Web Token; its decoded payload is described by 'jwtPayloadPartyUpdateToken'.","required":["partyUpdateToken"],"type":"object","properties":{"partyUpdateToken":{"type":"string","format":"application/jwt","description":"Example token. Its signature does not validate."}}},"partyResponse":{"title":"PartyResponse","type":"object","properties":{"partyToken":{"type":"string","format":"application/jwt","description":"Example token. Its payload was edited after signing, so the signature of this example does not validate."}}}}},"paths":{"/[v3.0]/parties/{id}":{"patch":{"tags":["Participant Registry (Optional)"],"parameters":[{"style":"simple","name":"id","description":"The id of the party whose record must be updated. Can be anyone of  the party id from id or alsoKnownAs attributes of that participant.","schema":{"type":"string"},"in":"path","required":true}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/partyUpdateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/partyResponse"}}},"description":"OK"},"400":{"description":"Bad Request - Invalid input data"},"404":{"description":"Not Found - Party not found"},"500":{"description":"Internal Server Error"}},"deprecated":false,"operationId":"update-party-information","summary":"Update party information","description":"Used to partially update information of an iSHARE participant in the Participant  Registry. Only the provided fields will be updated, other fields remain unchanged. The party ID cannot be changed through this operation, however, new party id can be added to `alsoKnownAs` array.\nThe request body carries the update as an iSHARE signed JSON Web Token in the attribute `partyUpdateToken`. Please refer to the iSHARE JWT header (see https://dev.ishare.eu/reference/ishare-jwt) and the model 'jwtPayloadPartyUpdateToken' which indicate what the decoded token must look like. Its `aud` is the party ID of this Participant Registry, and its `iss` and `sub` are the party ID of the client that sends the request. A request whose body is not such a token is rejected with 400.\nServer response is an iSHARE signed JSON Web Token. Please refer to the iSHARE JWT header (see https://dev.ishare.eu/reference/ishare-jwt) and the model 'jwtPayloadPartyToken' which indicate what the decoded response will look like."}}}}
```

### Request model

The following URL parameter must be used.

* `partyId` {url}/parties/{**partyId**} <mark style="color:red;">(Required)</mark>\
  **String**. The id of the party who must be fetched. 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.

The request body is a JSON object with one attribute, `partyUpdateToken`: an iSHARE signed JSON Web Token, as specified in [iSHARE JWT](https://dev.ishare.eu/reference/ishare-jwt.md). Besides the iSHARE JWT claims, its payload contains the update in the attribute `partyUpdate`, with the following attributes. The `aud` claim is the party ID of the Participant Registry; `iss` and `sub` are the party ID of the client that sends the request. A request whose body is not such a token is rejected with `400`.

* `name`\
  **String**. Contained in `partyUpdate`. <mark style="color:red;">(Required)</mark>\
  Name of the party.
* `alsoKnownAs`\
  **Array of strings**. Contained in `partyUpdate`.\
  Array of registered party ids of the party with which the party is also identified. Optional, because a party could be identified with only its iSHARE-ID (in the 'id' property). When updating alsKnownAs all existing values must also be provided. Implementations should raise an error if any of the existing values are missing (meaning deletion) as Ids in this field cannot be deleted once registered.

### Example request

```json
PATCH /parties/did%3Aishare%3AEU.NL.NTRNL-10000001 HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json

{
  "partyUpdateToken": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsIng1YyI6WyJNSUlHaURDQ0JIQ2dBd0lCQWdJ…"
}
```

The payload of `partyUpdateToken`, decoded:

```json
{
  "iss": "did:ishare:EU.NL.NTRNL-10000001",
  "sub": "did:ishare:EU.NL.NTRNL-10000001",
  "aud": "did:ishare:EU.NL.NTRNL-10000000",
  "jti": "0868904d8ed94c01a0a4d6dd5c65ce91",
  "exp": 1740675316,
  "iat": 1740675286,
  "partyUpdate": {
    "name": "Example Corporation",
    "alsoKnownAs": [
      "did:ishare:EU.NL.NTRNL-12345678",
      "did:ebsi:zjdf2ajujWNEbMJBBTE2J7M",
      "did:web:example.com",
      "CoC:123456789"
    ]
  }
}
```

The token above is shortened; the full example token is in the OpenAPI specification. It carries the certificate chain of the Test Service Consumer, and its signature does not validate.

### Response model

The response will be equal to the response of the GET request for retrieving a single party. Please refer to the [response model as defined here](https://dev.ishare.eu/participant-registry-role/single-party.md#response-model).

### Example response

Please also refer to the [example response](https://dev.ishare.eu/participant-registry-role/single-party.md#example-response) under the GET request definition.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://dev.ishare.eu/participant-registry-role/parties-single-party-put.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
