# Score a candidate

> Send up to 1,000 job ids and get a 0–100 match score per job for one of your candidates, with a verdict and the skills matched and missing. Uses one match score per job scored.

Source: https://hyperjobs.io/docs/api-reference/candidates-scores

<EndpointHeader method="POST" path="/v1/candidates/{id}/scores" />

The second half of the [Match API](/docs/guides/match-scores): how well one
candidate's resume fits each of the jobs you name. The ids are the catalogue's
own: `id` on a job from [`/v1/jobs`](/docs/api-reference/jobs-list) or
[`/v1/jobs/changes`](/docs/api-reference/jobs-changes). The resume must have
been [put](/docs/api-reference/candidates-put) first, and read.

<CodeGroup>
```bash title="cURL"
curl -X POST https://api.hyperjobs.io/v1/candidates/user_8812/scores \
  -H "Authorization: Bearer $HYPERJOBS_KEY" \
  -H "Content-Type: application/json" \
  -d '{"job_ids": ["j_c460920e3b257156", "j_9b03e5f1c27a48d6"]}'
```

```js title="Node"
const res = await fetch(`https://api.hyperjobs.io/v1/candidates/${encodeURIComponent(userId)}/scores`, {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.HYPERJOBS_KEY}`, "Content-Type": "application/json" },
  body: JSON.stringify({ job_ids: jobs.map((j) => j.id) }),
});
if (res.status === 409) { /* still reading: wait Retry-After seconds and ask again */ }
const { data, not_found } = await res.json();
const best = data.filter((s) => s.verdict === "strong" || s.verdict === "good").sort((a, b) => b.score - a.score);
```

```python title="Python"
import os, requests

res = requests.post(
    f"https://api.hyperjobs.io/v1/candidates/{user_id}/scores",
    json={"job_ids": [job["id"] for job in jobs]},
    headers={"Authorization": f"Bearer {os.environ['HYPERJOBS_KEY']}"},
    timeout=30,
)
scores = res.json()["data"]
```
</CodeGroup>

## Path parameters

<Fields>
  <ParamField path="id" type="string" required>
    Your id for the candidate, as you [put](/docs/api-reference/candidates-put) it.
  </ParamField>
</Fields>

## Body

<Fields>
  <ParamField body="job_ids" type="string[]" required>
    **1 to 1,000** job ids, as `id` on a job (`j_` + 16 hexadecimal
    characters). Repeats are scored once.
  </ParamField>
</Fields>

## Cost

**One match score per job scored**, from the Match API's own monthly allowance
(50 a month on every plan, 1,000,000 to 20,000,000 with a
[Match add-on](/help/plans#the-match-api)), never your jobs. Ids in
`not_found` (unknown, expired, or a duplicate of another posting) cost
nothing, and so does every error. The month must have room for **every id you
send**: with 30 scores left, a request with 40 ids is a `402`
(`scope: "match_scores"`, `needed: 40`), and only the ids that are scored are
counted.

## Response

<Fields>
  <ResponseField name="candidate" type="string">Your id for the candidate.</ResponseField>
  <ResponseField name="data" type="{ job_id, score, verdict, matched_skills, missing_skills }[]">
    One entry per live job, in no particular order: sort by `score`.
  </ResponseField>
  <ResponseField name="data[].score" type="integer">How well the resume fits the job, 0 to 100.</ResponseField>
  <ResponseField name="data[].verdict" type="&quot;strong&quot; | &quot;good&quot; | &quot;partial&quot; | &quot;weak&quot; | &quot;different_field&quot;">
    `strong` ≥ 80 · `good` ≥ 55 · `partial` ≥ 35 · `weak` below ·
    `different_field`: the job is in another field than the resume (a nurse
    and a backend role), whatever the score says. See the
    [guide](/docs/guides/match-scores#verdicts).
  </ResponseField>
  <ResponseField name="data[].matched_skills" type="string[]">
    The job's skills the resume shows, in the posting's words.
  </ResponseField>
  <ResponseField name="data[].missing_skills" type="string[]">
    The job's skills the resume doesn't show: what to tell the candidate, or
    what to ask them about.
  </ResponseField>
  <ResponseField name="not_found" type="string[]">
    Ids you sent that aren't a live job. Delete them from your copy.
  </ResponseField>
</Fields>

```json title="Response"
{
  "candidate": "user_8812",
  "data": [
    {
      "job_id": "j_c460920e3b257156",
      "score": 84,
      "verdict": "strong",
      "matched_skills": ["Go", "PostgreSQL", "Kubernetes"],
      "missing_skills": ["Terraform"]
    },
    {
      "job_id": "j_9b03e5f1c27a48d6",
      "score": 41,
      "verdict": "partial",
      "matched_skills": ["SQL"],
      "missing_skills": ["Java", "Spring Boot", "Kafka"]
    }
  ],
  "not_found": []
}
```

## Errors

| Status | Cause |
| --- | --- |
| `400` | A bad id, or `job_ids` missing, empty, over 1,000, or not all strings. |
| `401` | Missing, unknown, revoked, or expired key. |
| `402` | Fewer match scores left this month than ids sent (`scope: "match_scores"`). |
| `404` | No candidate with this id: never put, deleted, or idle for 180 days. |
| `409` | The resume is still being read: `{"status": "reading"}`. Retry after `Retry-After`. |
| `422` | The resume couldn't be read: `{"status": "failed", "detail": …}`. [Put](/docs/api-reference/candidates-put) a readable one. |
| `429` | [Rate limit](/docs/rate-limits) exceeded. |
| `503` | The scorer is unavailable; retry after `Retry-After`. Nothing is used. |

## Next

<CardGroup cols={2}>
  <Card title="Match scores" icon="BookOpen" href="/docs/guides/match-scores">
    Where the job ids come from, and how often to score.
  </Card>
  <Card title="Changed jobs" icon="RefreshCw" href="/docs/api-reference/jobs-changes">
    New jobs to score as they're listed.
  </Card>
</CardGroup>
