Skip to main content

Register, find and authorize care organizations

Spec v1 uses two kinds of credentials:

Credential Says Issued by Visibility
NutsOrganizationCredential This DID is care organization X in city Y The vendor, with its vendor DID Public: every node gets it
NutsAuthorizationCredential (RFC014) Organization B may access these resources of organization A The care organization that holds the data (A), to the organization that may access it (B) Private: only A's and B's nodes get it

Both are sent over the Nuts network (gRPC). The examples below use eOverdracht, see the eOverdracht leveranciersspecificatie.

Use case design (spec v1)

The use case specifies, per role (e.g. eOverdracht sender and receiver):

  • the purposeOfUse value of its NutsAuthorizationCredentials, and the access policy that belongs to it;
  • what the credentials contain, how long they are valid and when they are revoked.

The node doesn't check these rules: an authorization credential that doesn't follow the use case gets access to nothing, or breaks interoperability.

Trust works differently per credential: a NutsOrganizationCredential is only accepted from issuers that the node trusts. A NutsAuthorizationCredential is issued by the care organization itself, so it is never from a trusted issuer. See Credential Trust.

1. Register your care organizations

Issue a NutsOrganizationCredential for each care organization, with your vendor DID as issuer:

POST <internal Nuts interface>/internal/vcr/v2/issuer/vc
{
  "issuer": "<vendor DID>",
  "type": "NutsOrganizationCredential",
  "credentialSubject": {
    "id": "<care organization DID>",
    "organization": {
      "name": "<name>",
      "city": "<city>"
    }
  },
  "visibility": "public"
}

Issue all of them with the same vendor DID: other vendors have to trust every issuer DID separately.

    Required: issuer, type and credentialSubject. Optional: expirationDate, and @context (default: https://nuts.nl/credentials/v1). The node adds the id (<issuer DID>#<UUID>), issuanceDate, @context and proof, and returns the complete credential. You don't have to store it: you can find it again with a search. The combination of name and city must be unique: two care organizations can't have the same name in the same city. Any vendor can issue a NutsOrganizationCredential. That is why others must trust your vendor DID first, see step 2.

    2. Trust other vendors

    By default your node trusts no issuers, so a search finds no care organizations of other vendors. Trust each vendor's DID for NutsOrganizationCredential:

    1. List the issuers you don't trust yet: GET <internal Nuts interface>/internal/vcr/v2/verifier/NutsOrganizationCredential/untrusted.
    2. Check the DID with the other vendor, out-of-band, e.g. by phone. Ask them for their DID, rather than asking "is this your DID?". The contact information in a DID document isn't verified. It can help you find whom to call.
    3. Trust it:
    POST <internal Nuts interface>/internal/vcr/v2/verifier/trust
    
    {
      "issuer": "<vendor DID>",
      "credentialType": "NutsOrganizationCredential"
    }
    

    You can also edit the file vcr/trusted_issuers.yaml in the data directory of your node (datadir).

    3. Find the other care organization

    Search for its NutsOrganizationCredential. The care organization's DID is in credentialSubject.id.

    POST <internal Nuts interface>/internal/vcr/v2/search
    
    {
      "query": {
        "@context": ["https://www.w3.org/2018/credentials/v1", "https://nuts.nl/credentials/v1"],
        "type": ["VerifiableCredential", "NutsOrganizationCredential"],
        "credentialSubject": {
          "organization": {
            "name": "<name>*"
          }
        }
      }
    }
    
    • @context and type are required, but don't filter: add at least one other field, or you get all credentials.
    • By default a value must match exactly.
    A * at the end of a value matches everything that starts with it;it, e.g. Hospital Amst*. "*" alone matches anyevery credential that has the field, with a value. A * anywhere else is not a wildcard, and wildcards only work on text. You can search on several fields at once, e.g. credentialSubject.id, name and city. The response is a list of complete credentials.

    The endpoints of the organization are services in its DID document: see Set up DIDs and services for how to resolve them, and how to find care organizations that have the service of a use case.

    eOverdracht

    The sender looks up the eOverdracht-receiver service in the receiver's DID document. Its notification endpoint is where the sender sends the notification.

    4. Authorize the other organization

    The care organization that holds the data issues a NutsAuthorizationCredential to the organization that may access it. Issue it with the care organization's DID, as private: it can contain personal data.

    POST <internal Nuts interface>/internal/vcr/v2/issuer/vc
    
    {
      "issuer": "<your care organization DID>",
      "type": "NutsAuthorizationCredential",
      "credentialSubject": {
        "id": "<other care organization DID>",
        "purposeOfUse": "<purpose of use>",
        "resources": [ ... ]
      },
      "expirationDate": "<date>",
      "visibility": "private"
    }
    

    What

    goesin Field Contains credentialSubjectissuer (resources,The patient)care isorganization setthat holds the data. Your node must manage its DID credentialSubject.id The care organization that gets access. Find its DID with a search, see step 3 purposeOfUse Set by the use case;case. seeIt selects the access policy resources What may be accessed. Per resource: path, operations, and userContext: whether a user identity is needed subject The patient, as urn:oid:2.16.840.1.113883.2.4.6.3:<BSN>. Optional: the use case says when to add it

    See RFC014 for the fields. An example for one resource of one patient:

    {
      "issuer": "<your care organization DID>",
      "type": "NutsAuthorizationCredential",
      "credentialSubject": {
        "id": "<other care organization DID>",
        "purposeOfUse": "<purpose of use>",
        "resources": [
          { "path": "/Patient/2250f7ab-6517-4923-ac00-88ed26f85843", "operations": ["read"], "userContext": true }
        ],
        "subject": "urn:oid:2.16.840.1.113883.2.4.6.3:123456780"
      },
      "visibility": "private"
    }
    

    Private credentials are only exchanged between nodes that have proven who they are. So both your node and the other party's node need a node DID with a NutsComm endpoint, see Join the Nuts network.

    eOverdracht

    The sender issues two credentials to the receiver, both with purposeOfUse eOverdracht-sender: one for the Task (valid 1 year) and one for the patient data of the transfer. The leveranciersspecificatie lists their resources. The receiver needs no NutsAuthorizationCredential for its notification endpoint.

    The Task credential:

    {
      "issuer": "<sender DID>",
      "type": "NutsAuthorizationCredential",
      "credentialSubject": {
        "id": "<receiver DID>",
        "purposeOfUse": "eOverdracht-sender",
        "resources": [
          { "path": "/Task/<id>", "operations": ["read", "update"], "userContext": false }
        ]
      },
      "expirationDate": "<1 year from now>",
      "visibility": "private"
    }
    

    The patient data credential has the same fields, with these resources:

    [
      { "path": "/Task/<id>", "operations": ["read", "update"], "userContext": false },
      { "path": "/Composition/<id>", "operations": ["read", "document"], "userContext": true },
      { "path": "/<FHIR reference in the transfer>", "operations": ["read"], "userContext": true }
    ]
    

    Add a resources entry for each FHIR reference in the transfer. Revoke this credential when the Task is completed.

    5. Use an authorization you received

    Your node receives the credentials issued to your care organizations. Search for them with allowUntrustedIssuer: they're issued by care organizations, which you don't trust as issuers, so without it the search returns nothing.

    POST <internal Nuts interface>/internal/vcr/v2/search
    
    {
      "query": {
        "@context": ["https://www.w3.org/2018/credentials/v1", "https://nuts.nl/credentials/v1"],
        "type": ["VerifiableCredential", "NutsAuthorizationCredential"],
        "credentialSubject": {
          "id": "<your care organization DID>",
          "purposeOfUse": "<purpose of use>",
          "resources": {
            "path": "<path you want to call>"
          }
        }
      },
      "searchOptions": {
        "allowUntrustedIssuer": true
      }
    }
    

    The response is a list of complete credentials. The ID of a credential is its id field:

    [
      {
        "@context": ["https://www.w3.org/2018/credentials/v1", "https://nuts.nl/credentials/v1"],
        "id": "<issuer DID>#314542e8-c8cc-4502-a7df-a815ac47c06b",
        "type": ["NutsAuthorizationCredential", "VerifiableCredential"],
        "issuer": "<issuer DID>",
        "issuanceDate": "2026-07-26T14:36:10.163463+02:00",
        "credentialSubject": { "id": "<your care organization DID>", "purposeOfUse": "...", "resources": [ ... ] },
        "proof": { "type": "JsonWebSignature2020", ... }
      }
    ]
    

    You can search on any field of the credential. E.g. to find all authorizations for one patient, search on credentialSubject.id and credentialSubject.subject:

    "credentialSubject": {
      "id": "<your care organization DID>",
      "subject": "urn:oid:2.16.840.1.113883.2.4.6.3:123456780"
    }
    

    The purposeOfUse of each result says what you can request. This way the credentials also tell you where to find data of a patient.

    Pass the credential in the access token request: see Request an access token.

    eOverdracht

    After the notification, the receiver searches with purposeOfUse eOverdracht-sender and resources.path /Task/<id>, and uses the credential to fetch the Task.

    6. Revoke an authorization

    Revoke a NutsAuthorizationCredential when access must end. The revocation is sent over the Nuts network: The credential ID is the id of the credential.

    DELETE <internal Nuts interface>/internal/vcr/v2/issuer/vc/<URL-encoded credential ID>
    

    eOverdracht

    When the Task is completed, the sender revokes the patient data credential. The Task credential stays valid until it expires.

    API reference: Verifiable Credential Registry (v2)