Patch Update Account REST API throwing error unexpected '/' (https://{tenant}.api.identitynow.com/v3/accounts/{id})

Hi Team,

We are using the following JSON body for PATCH call:-

[
  {
    "op": "replace",
    "path": "/FAMILY_NAME",
    "value": "Test Last Name"
  }
]

But as a error the message is bad request unexpected ‘/’.

While the Non-Employee Record REST API Non-Employee Record REST API (https://{tenant}.api.identitynow.com/v3/non-employee-records/{id}) is successful with the following
JSON body

[
{
          "op": "replace",
          "path": "/endDate",
          "value": "2025-01-31T18:30:00Z"
        }
     ] 

Thanks,
Hemant

Hello @Hemant-Nailwal ,
I have tested successfully the following payload to patch a Non-Employee record with the endpoint https://{tenant}.api.identitynow.com/v3/non-employee-records/{id}:

[
  {
    "op": "replace",
    "path": "/lastName",
    "value": "Test Last Name"
  }
]

So for “family name”, I think you shall use the attribute “lastName”.
If “FAMILY_NAME” is part of additional attributes of your Non-Employee source, you shall use the path /data/FAMILY_NAME instead.

There is no issue with Non-Employee record, But the issue is with https://{tenant}.api.identitynow.com/v3/accounts/{id} api.

Patching an account attribute seems to be unauthorized.
However, you can update an account with a PUT to https://{tenant}.api.identitynow.com/v3/accounts/{id} with a payload of :

{
    "attributes": {
        "E-Mail": "XXX",
        "FAMILY_NAME": "Test Last Name",
        ....
    }
}

Beware that all attributes of the account must be present.

1 Like