Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept Partij Identificatoren as part of Partij creation #239

Open
swrichards opened this issue Sep 10, 2024 · 0 comments
Open

Accept Partij Identificatoren as part of Partij creation #239

swrichards opened this issue Sep 10, 2024 · 0 comments
Labels
enhancement New feature or request triage

Comments

@swrichards
Copy link

Thema / Theme

Klantinteracties API

Omschrijving / Description

Update the partijenCreate payload to accept one or more partij identificatoren, e.g.:

// POST /partijen
{
  "indicatieGeheimhouding": false,
  "indicatieActief": true,
  "soortPartij": "persoon",
  "partijIdentificatie": { /* ... */ },
   // ...   

   // New field
   "partijIdentificatoren": [
     {
        // "identificeerdePartij" will be automatically set to the created party
        "partijIdentificator": {
			"codeObjecttype": "bsn",
			"codeSoortObjectId": "inp",
			"objectId": "123456789",
			"codeRegister": "brp",
	},
	"anderePartijIdentificator": "optional_identifier_123",
     }        
   ]
}

Toegevoegde waarde / Added value

A common pattern emerging in Open Inwoner Platform is (1) creating a Partij and immediately subsequent to that (2) creating a PartijIdentificator. We canonically identify parties in OK through the usual suspects from the basisregistraties: bsn, kvk, and so on.

Although the bare Partij has the nummer field, its intent is not very clear when it is client provided: OIP might choose to use the nummer to build its own scheme (e.g. setting it to our internal user ID, or some pseudonymised version thereof), but this might not play well with other clients reading and writing from OK. We would in any case like to avoid having to maintain our internal mapping between a Partij.{uuid|nummer}.

TLDR: we would like to canonically identify a Partij through a Partij Identificator, and this would be eased by being able to create the Partij with its Identificator atomically. The added value is thus it facilitates our use-case, in at least two ways:

  1. One rather than two requests
  2. It improves atomicity, as having to use two requests creates a transactionality problem: the Partij creation could succeed by the PartijIdentificator could fail. This forces clients to maintain a retry/compensating transaction queue, which is a nuisance. But also, it runs the risk of orphaned Partij objects lacking a clear identificator due to such a failed transaction.

Our assumption is that this is probably a common use-case, but that is just a hunch.

Aanvullende opmerkingen / Additional context

No response

@swrichards swrichards added enhancement New feature or request triage labels Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage
Projects
Status: Triage
Development

No branches or pull requests

1 participant