jonathanraftery / bullhorn-rest-client

Simple client for the Bullhorn REST API
MIT License
11 stars 14 forks source link

CandidateEducation, CandidateWorkHistory etc not working #18

Closed maheshmbisen closed 2 years ago

maheshmbisen commented 2 years ago

Greetings,

How can I fetch Candidate's other entities like CandidateWorkHistory, CandidateEducation etc listed here in https://bullhorn.github.io/rest-api-docs/entityref.html#candidateworkhistory.

Following snippet is not working in this version 1.4.0 -

$client->searchEntities(
    'CandidateWorkHistory',
    'where=candidate.id=xxxxx',
    [
        'fields' => 'id,startDate,endDate,title,companyName,comments'
    ]
); 

It's working fine with old version 0.3.3 -

$client->request(
    "GET",
    'query/CandidateWorkHistory?where=candidate.id=xxxxx&fields=id,startDate,endDate,title,companyName,comments',
    ['http_errors'=>false]
);

I am getting error 'errors.searchUnknownEntity' Thank you for your great work.

maheshmbisen commented 2 years ago

Sorry, it's my fault, following one is working now -

        $response_workhistory = $client->rawRequest(
            "GET",
            'query/CandidateWorkHistory?where=candidate.id=xxxx&fields=id,startDate,endDate,title,companyName,comments',
            ['http_errors'=>false]
        );

Closing the thread