Job Candidates

Find or create people and add them to a job

POST
https://api.searchsoftware.nl/v4/records/jobs/{id}/candidates/intake

Takes 1 to 20 people and adds each to the job as a candidate, finding the person first and creating them only when nobody matches. Requires jobs:write and people:write, and notes:write when an entry has a note; a missing scope fails the whole call before anything runs.

Matching. person_id given: that person. Otherwise the LinkedIn profile, then the email address; the first hit wins. LinkedIn profiles match on the profile slug, so the scheme, www. or a country subdomain, upper case, a trailing slash and query strings don't matter. A linkedin_url that is not a LinkedIn profile URL (a company page, a search) fails that entry.

Review instead of guessing. When nothing matched and force_create is not true, a person with exactly the same name (case-insensitive) makes the entry needs_review with reason same_name and up to five possible_duplicates; send it again with person_id or force_create: true. A LinkedIn match and an email match on two different people is conflicting_matches; a match in the trash is in_trash. A later entry with the LinkedIn profile or email of an earlier one, or with the same name as an earlier one when neither has a LinkedIn URL or email (and no force_create), is duplicate_in_batch. An email held by a trashed person is in_trash; an email held by two people is conflicting_matches.

Creating. A new person is created as by POST /v4/records/people (default people workflow, in its sourcing phase when one is set), with the LinkedIn URL saved as a bookmark (https://www.linkedin.com/in/<slug>). company_name without company_id is stored on the work history without a company record.

Adding. As by POST /v4/records/jobs/{id}/candidates. The note goes on the candidate (title "Sourcing note") only when the candidate was added in this call, so the same batch sent twice changes nothing the second time.

Independent entries. One entry's failure never stops the others and nothing is rolled back: a person created whose candidate link fails is created with candidate: "failed". A matching person the caller can't see fails the entry ("A matching person exists outside your access.") and no second person is created. Per-entry problems (blank name, a field over its limit, a bad ID) fail that entry only.

dry_run: true runs the matching and writes nothing; outcomes read would_create and would_match. Each results entry has index, name and outcome (created, matched, needs_review, duplicate_in_batch, failed, would_create, would_match), plus, where they apply, person_id, matched_by (linkedin, email, person_id), candidate (added, already_on_job, failed), candidate_id, note (added, none, failed), linkedin_saved, reason, possible_duplicates and error. created_by is only accepted with an API key.

Body

application/json
peoplearrayrequired

1 to 20 entries: name (required, at most 200 characters), and optionally linkedin_url, email_address, phone_number, work_title, company_id, company_name, city, country_code (two letters), note (at most 5,000 characters), person_id, force_create

phase_status_idstring

Starting phase ID from the job's candidate workflow, as for one candidate

dry_runboolean

true reports what would happen and changes nothing

created_bystring

Acting user ID (API keys only)

Parameters

idstringrequiredpath

Job ID

Response

One report entry per input, in order

Response fields application/json
statusstringokrequired
Example
ok
Show child attributes
job_idstringrequired

Identifier

Example
vM7Lp2q
dry_runbooleanrequired
summaryIntakeSummaryrequired
Show child attributes
createdinteger<int32>required
Example
17
matchedinteger<int32>required
Example
2
needs_reviewinteger<int32>required
Example
1
duplicate_in_batchinteger<int32>required
Example
0
failedinteger<int32>required
Example
0
would_createinteger<int32>required
Example
0
would_matchinteger<int32>required
Example
0
candidates_addedinteger<int32>required
Example
19
already_on_jobinteger<int32>required
Example
0
notes_addedinteger<int32>required
Example
12
Show child attributes
indexinteger<int32>required

Position in the request's people

Example
0
namestringrequired
Example
Jan de Vries
outcomestringcreatedmatchedneeds_reviewduplicate_in_batchfailedwould_createwould_matchrequired
Example
created
person_idstring

Identifier

Example
vM7Lp2q
matched_bystringlinkedinemailperson_id
Example
linkedin
candidatestringaddedalready_on_jobfailed
Example
added
candidate_idstring

Identifier

Example
vM7Lp2q
notestringaddednonefailed
Example
added
linkedin_savedboolean

Only for a created person with a LinkedIn URL

reasonstringsame_nameconflicting_matchesin_trash
Example
same_name
Show child attributes
idstringrequired

Identifier

Example
vM7Lp2q
namestringrequired
Example
Jan de Vries
errorstring
Example
linkedin_url is not a LinkedIn profile URL
400Bad RequestErrorResponse

Invalid id or body, or an unknown key

Response fields application/json
statusstringerrorrequired
Example
error
errorErrorBodyrequired
Show child attributes
codestringrequired

Stable machine-readable error code.

status_codeinteger<int32>required

HTTP status code for this response.

messagestringrequired

Human-readable error message.

Example
{
  "status": "error",
  "error": {
    "code": "INVALID_BODY",
    "status_code": 400,
    "message": "Invalid request body"
  }
}
401UnauthorizedErrorResponse

Invalid API key

Response fields application/json
statusstringerrorrequired
Example
error
errorErrorBodyrequired
Show child attributes
codestringrequired

Stable machine-readable error code.

status_codeinteger<int32>required

HTTP status code for this response.

messagestringrequired

Human-readable error message.

Example
{
  "status": "error",
  "error": {
    "code": "INVALID_API_KEY",
    "status_code": 401,
    "message": "Invalid API key"
  }
}
403ForbiddenErrorResponse

Insufficient scope, or created_by is not the authorizing user

Response fields application/json
statusstringerrorrequired
Example
error
errorErrorBodyrequired
Show child attributes
codestringrequired

Stable machine-readable error code.

status_codeinteger<int32>required

HTTP status code for this response.

messagestringrequired

Human-readable error message.

Example
{
  "status": "error",
  "error": {
    "code": "FORBIDDEN",
    "status_code": 403,
    "message": "Insufficient scope"
  }
}
404Not FoundErrorResponse

Job not found

Response fields application/json
statusstringerrorrequired
Example
error
errorErrorBodyrequired
Show child attributes
codestringrequired

Stable machine-readable error code.

status_codeinteger<int32>required

HTTP status code for this response.

messagestringrequired

Human-readable error message.

Example
{
  "status": "error",
  "error": {
    "code": "NOT_FOUND",
    "status_code": 404,
    "message": "Record not found"
  }
}
422Unprocessable EntityErrorResponse

Not 1 to 20 people, or the phase is not in the job's candidate workflow

Response fields application/json
statusstringerrorrequired
Example
error
errorErrorBodyrequired
Show child attributes
codestringrequired

Stable machine-readable error code.

status_codeinteger<int32>required

HTTP status code for this response.

messagestringrequired

Human-readable error message.

Example
{
  "status": "error",
  "error": {
    "code": "VALIDATION_FAILED",
    "status_code": 422,
    "message": "Validation failed"
  }
}
500Internal Server ErrorErrorResponse

Internal server error

Response fields application/json
statusstringerrorrequired
Example
error
errorErrorBodyrequired
Show child attributes
codestringrequired

Stable machine-readable error code.

status_codeinteger<int32>required

HTTP status code for this response.

messagestringrequired

Human-readable error message.

Example
{
  "status": "error",
  "error": {
    "code": "INTERNAL_ERROR",
    "status_code": 500,
    "message": "Internal server error"
  }
}

Authorization

bearer_authhttp (bearer) in header

API key or OAuth access token in Authorization header

Scopes: jobs:write

oauth2_authoauth2

OAuth authorization code flow with mandatory S256 PKCE.

Scopes: jobs:write

apikey_authapiKey in query

API key in query string

Scopes: jobs:write