PATCH request: "No id or url found for path [..."

Hi all,

We’re starting to explore the FHIR API for PDS but I’m having problems understanding the PATCH semantics when doing a "replace” operation on PDS data and keep getting the following error (this is on Spine INT environment): “Invalid update with error - no id or url found for path with […]

By way of example, We have a test patient on INT with the following telecoms:

“telecom”: [
{ “id”: “h6ve”, “period”: { “start”: “2000-01-01” }, “system”: “phone”, “use”: “work”, “value”: “01246 437500” },
{ “id”: “07BB0EC9”, “period”: { “start”: “2026-01-20” }, “system”: “email”, “use”: “home”, “value”: “bob@example.com” },
{ “id”: “568E7FDD”, “period”: { “start”: “2023-02-08” }, “system”: “email”, “use”: “work”, “value”: “work@example.com” }
]

When submitting a patch to update the last email address, we submit the following patch,

{ “patches”: [
{ “op”: “test”, “path”: “/telecom/2/system”, “value”: “email” },
{ “op”: “test”, “path”: “/telecom/2/use”, “value”: “work” },
{ “op”: “replace”, “path”: “/telecom/2/value”, “value”: “work.really@example.com” }
] }

…but we get an error back stating: “Invalid update with error - no id or url found for path with root /telecom/2”.

What are we missing in the patch? Reading the docs, I believe I’ve got the semantics correct – items are found by index, and replace seems to be valid for telecom where we’re just updating the value. I feel I’m missing something basic but can’t figure it out.

Thanks,

Callie

Replying to myself - after re-reading the docs again, we missed a critical requirement around echoing the ID of the record back.

After modifying the the PATCH request to send:

{“patches”:[
{“op”:“replace”,“path”:“/telecom/2/id”,“value”:“568E7FDD”},{“op”:“replace”,“path”:“/telecom/2/value”,“value”:“work.really@example.com”}
]}

…our updates now appear to be working, although we’re still testing!

Callie

1 Like

Glad you sorted it, and thanks for providing the fix back to the community.