Updating candidate skills

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

Moderators: StaffingSupport, s.emmons, BullhornSupport

alipscomb1
User
Posts: 7
Joined: Mon Jul 10, 2017 3:24 pm

Updating candidate skills

Postby alipscomb1 » Tue Nov 14, 2017 5:07 pm

I'm trying to add new skills to a Candidate record. The candidate may or may not already have associated skills, but the ones I add are new, they are not duplicates of existing items in the skills list.

I use a PUT message as shown in the API doc and one of your "getting started" tutorials:

https://restxx.bullhornstaffing.com/rest-services/{corpToken}/entity/Candidate/182539/primarySkills/1000060,1000042,1000006,1000008,18380,260?BhRestToken={bhRestToken}

I get a response of 500:Internal Server Error with no additional information.

What am I doing wrong?

alipscomb1
User
Posts: 7
Joined: Mon Jul 10, 2017 3:24 pm

Re: Updating candidate skills

Postby alipscomb1 » Tue Nov 21, 2017 10:30 am

I was mistaken when I said previously that the error message included no additional information. It does include more information, but it doesn't resolve the issue. A log with a couple of examples is included below.

There are several issues here.
1. The candidate info (retrieved prior to the update with GET entity/candidate) does not include the supposedly existing skills. I confirmed that this info is consistent with what is shown in Bullhorn.

2. It shouldn't matter anyway, because PUT is supposed to be idempotent (RFC 2616, section 9).

3. Error Code 500 is probably incorrect here. Minimally, it's misleading.

Code: Select all

***Error in putSkillList. Candidate info:
Candidate Id 182476 skills: 1000033, 1000032, 1000005, 1000004, 1000003

Request:
Method: PUT, RequestUri: 'https://rest33.bullhornstaffing.com/rest-services/{corpToken}/entity/Candidate/182476/primarySkills/1000000,1000087,1000006,260,1000025?BhRestToken={restToken}', Version: 1.1, Content: <null>, Headers:
{
}

Response:

{
  "errorMessage": "error persisting an entity of type: Candidate",
  "errorCode": 500,
  "errors": [
    {
      "detailMessage": "an association between Candidate 182476 and Skill 260 already exists",
      "severity": "ERROR",
      "type": "ASSOCIATION_ERROR"
    },
    {
      "detailMessage": "an association between Candidate 182476 and Skill 1000000 already exists",
      "severity": "ERROR",
      "type": "ASSOCIATION_ERROR"
    }
  ],
  "entityName": "Candidate"
}

***Error in putSkillList. Candidate info:
Candidate Id 182559 skills: 1000076, 1000069, 1000061, 1000059, 1000058

Request:
Method: PUT, RequestUri: 'https://rest33.bullhornstaffing.com/rest-services/{corpToken}/entity/Candidate/182559/primarySkills/1000000,260,18380?BhRestToken={restToken}', Version: 1.1, Content: <null>, Headers:
{
}

Response:
{
  "errorMessage": "error persisting an entity of type: Candidate",
  "errorCode": 500,
  "errors": [
    {
      "detailMessage": "an association between Candidate 182559 and Skill 18380 already exists",
      "severity": "ERROR",
      "type": "ASSOCIATION_ERROR"
    },
    {
      "detailMessage": "an association between Candidate 182559 and Skill 1000000 already exists",
      "severity": "ERROR",
      "type": "ASSOCIATION_ERROR"
    }
  ],
  "entityName": "Candidate"
}




Return to “REST API”

Who is online

Users browsing this forum: Google [Bot] and 2 guests