Cannot convert value to data type for field clientContactID

Forum for users and developers of Bullhorn's API service.

Moderators: StaffingSupport, s.emmons, BullhornSupport

Post Reply
EricZer
User
Posts: 2
Joined: Mon Jan 09, 2023 10:08 am

Cannot convert value to data type for field clientContactID

Post by EricZer »

Request:

Code: Select all

POST /rest-services/79hhop/entity/ClientContact/7 HTTP/1.1
Host: rest99.bullhornstaffing.com
Accept: application/json
Accept-Encoding: gzip, deflate
Content-Type: application/json
Content-Length: 33
BHRestToken: [token]

{
  "clientContactID": 1235
}
Response:

Code: Select all

HTTP/1.1 500 Internal Server Error
Content-Type: application/json;charset=UTF-8
X-RateLimit-Remaining-Minute: 2996
X-RateLimit-Limit-Minute: 3000
RateLimit-Remaining: 2996
RateLimit-Reset: 34
RateLimit-Limit: 3000
Server: Apache-Coyote/1.1
X-Kong-Upstream-Latency: 60
X-Kong-Proxy-Latency: 1
Content-Length: 341
Date: Wed, 27 Sep 2023 12:14:27 GMT
Connection: close

{"errorMessage":"error persisting an entity of type: ClientContact","errorMessageKey":"errors.cannotPersistEntity","errorCode":500,"errors":[{"detailMessage":"cannot convert value to data type for field clientContactID","propertyName":"clientContactID","severity":"ERROR","type":"IMPROPERLY_STRUCTURED_SCALAR"}],"entityName":"ClientContact"}
Receiving an error when trying to update the clientContactID field.
What causes this error? The metadata shows that clientContactId is an INTEGER data type.

Code: Select all

        {
            "name": "clientContactID",
            "type": "SCALAR",
            "dataType": "Integer",
            "confidential": false,
            "label": "Client Contact ID",
            "hideFromSearch": false
        },
Is this field not updatable? How can you tell if a field is or is not updatable?
andrewalteri
User
Posts: 12
Joined: Wed Sep 28, 2022 7:56 pm

Re: Cannot convert value to data type for field clientContactID

Post by andrewalteri »

Hi EricZer,

Which entity are you attempting to update? You would not be able to update the clientContact ID of a ClientContact as those IDs are unique and read-only.

Here are the available fields for ClientContact:

https://bullhorn.github.io/rest-api-doc ... entcontact
dossierstate
User
Posts: 1
Joined: Tue Oct 17, 2023 10:05 pm

Re: Cannot convert value to data type for field clientContactID

Post by dossierstate »

Thanks for explaining it, problem solved.
Post Reply