Feature:
In the same way that updating user metadata and app_metadata works on PATCH, please enhance PATCH /organization to allow merge of metadata at root level.
Description:
Currently a PATCH /organization with metadata on the payload will replace all metadata with what’s in the payload. This differs from PATCH /users which will do a merge at the metadata root level.
Ref: Manage Metadata Using the Management API
Use-case:
We have additional metadata being added to Organization records at different stages.
e.g.
Create Organization → “metadata” = {
“org_type”: “type1”
}
Subscribe to service → “metadata” = {
“org_type”: “type1”,
“service_type”: “service1”
}
At point of the “subscribe to service” update we just want to send the “service_type” metadata on the PATCH /organization request payload. However, we have to do an additional call to GET /organization to find out what the org_type metadata is, so that we can include that on the PATCH as well to prevent it from being deleted.