Skip to main content

Resolve Organization scope from AGB

Use this flow when your application starts with an AGB code and needs the internal organizationId used by organization-scoped endpoints.

1. Resolve by AGB

Call the no-scope Organization search endpoint:

GET /v2/fhir/R4/Organization?identifier=http://fhir.nl/fhir/NamingSystem/agb-z|12345678

or the _search variant:

POST /v2/fhir/R4/Organization/_search
Content-Type: application/x-www-form-urlencoded

identifier=http://fhir.nl/fhir/NamingSystem/agb-z|12345678

Required scopes:

  • organization.read
  • organization.customer.read

The result set is restricted to organizations assigned to the authenticated client.

2. Read organizationId

Use entry[].resource.id from the returned Organization as the path organizationId.

3. Call organization-scoped APIs

Use the resolved id in scoped endpoints, for example:

GET /v2/{organizationId}/fhir/R4/Patient

Notes

  • If the bundle is empty, the AGB is unknown or not accessible for the client.
  • If multiple organizations are returned, let the user select the intended one.