API to update custom field values for a user

Andrew White

I have several custom fields that I need to update via the API. I can update standard fields without any issues. I can get all the current custom_field id's and values for a user with the API call:

GET https://<BridgeWebsite>/api/author/users/:id?includes[]=custom_fields

Output (some redacted)

{
    "meta":  {

             },
    "linked":  {
                   "custom_fields":  [
                                         "@{id=27; name=category}",
                                         "@{id=20; name=Employment status}",
                                         "@{id=29; name=operational group}",
                                         "@{id=17; name=qualification }",
                                         "@{id=3; name=STATE}"
                                     ],
                   "custom_field_values":  [
                                               "@{id=101472; value=Support Office; links=}",
                                               "@{id=101470; value=Full-Time; links=}",
                                               "@{id=101469; value=NSW; links=}",
                                               "@{id=101468; value=IT; links=}",
                                               "@{id=101467; value=; links=}",
                                               "@{id=101466; value=; links=}",
                                               "@{id=101465; value=; links=}",
                                               "@{id=101464; value=; links=}"
                                           ]
               },
    "users":  [....

I want to update id 3 so I tried using the API call:

 PUT https://<BridgeWebsite>/api/author/users/:id

with the body:

{
    "user": 
    {
        "locale": "en-AU",
        "hire_date": "2024-02-01",
        "job_title": "Customer Service Manager",
        "custom_field_values":  [
                "{
                    "id": "3",
                    "value": "WA"
                }"
         ]
    }
}

But I get bad request error

Any suggestion on what's wrong with either the API URL or the body?

 

0

Comments

1 comment

  • Comment author
    Stephanie Kemp

    Hey, Andrew White! I created a ticket on your behalf so that our support team can better assist you with this specific request.

    0

Please sign in to leave a comment.