Skip to main content

Find care organizations and their endpoints

Before you can query another care organization, you need its API endpoint and its authorization server URL. Find both by searching the use case's Discovery Service through your own Nuts node.

Before you start

  • The node has the use case's Discovery Service definition (see chapter "Configure the node for a use case").
GET <internal Nuts interface>/internal/discovery/v1/360-graden?credentialSubject.subject.O=Zorgorganisatie*
  • 360-graden is the service ID: the id field of the Discovery Service definition.
  • Without query parameters, you get all registered care organizations.

Query parameters are paths in the registered credentials:

  • Write the path without $., e.g. credentialSubject.subject.O.
  • Field IDs from the definition, like organization_name, don't work as query parameters.
  • Matching is case-insensitive. Use * at the start or end of a value as a wildcard.
  • With several query parameters, all of them must match the same credential. Name and city are both in the X509Credential, so you can combine them.

For 360-graden-clientbeeld:

Search by Query parameter
Name credentialSubject.subject.O=Zorgorganisatie*
City credentialSubject.subject.L=Utrecht

Your node searches its own copy of the Discovery Service. It updates that copy every 10 minutes by default (discovery.client.refreshinterval), so a new registration can take that long to show up.

The result

[
  {
    "id": "did:web:nuts.other.example:iam:2f1b7c3e-0d1a-4a7e-9a55-4b8f3c2e9d10#7c4e...",
    "credential_subject_id": "did:web:nuts.other.example:iam:2f1b7c3e-0d1a-4a7e-9a55-4b8f3c2e9d10",
    "fields": {
      "organization_id": "did:web:nuts.other.example:iam:2f1b7c3e-0d1a-4a7e-9a55-4b8f3c2e9d10",
      "organization_name": "Zorgorganisatie B",
      "organization_city": "Utrecht",
      "organization_ura": "87654321",
      "authorization_server_url": "https://nuts.other.example/oauth2/careorg-b",
      "fhir_base_url_r4": "https://fhir.other.example/r4"
    },
    "registrationParameters": {
      "authServerURL": "https://nuts.other.example/oauth2/careorg-b",
      "fhirR4BaseURL": "https://fhir.other.example/r4"
    },
    "vp": { ... }
  }
]
Part What it is
credential_subject_id The care organization's DID
fields Values taken from the credentials, named by the field IDs in the Discovery Service definition
registrationParameters The values the care organization registered, e.g. its FHIR base URL
authServerURL The authorization server URL. You need it to request an access token (see "Requesting access (outbound)")

Which fields and registration parameters you get depends on the use case.

API reference: Discovery Service