Preconditions

A job can be edited from two places at once: two browser tabs, two recruiters, or a recruiter and Lisa. To stop one save from silently undoing the other, a resource that can be edited this way has an entity tag. It changes whenever the resource does.

  1. Read the resource. Its tag is in the etag field and the ETag header.
  2. Send the tag back as If-Match when you save.
  3. If the resource changed since you read it, the save fails with 412 PRECONDITION_FAILED and nothing is written. Read it again, apply your change to the new version, and save with the new tag.
GET /v1/jobs/8724
ETag: "147ba147e9ffb1a2a544a755914219e7"

PUT /v1/jobs/8724
If-Match: "147ba147e9ffb1a2a544a755914219e7"

Which resources have tags

  • A job (GET and PUT /v1/jobs/{jobId}). The tag covers every field a save can write, except the LinkedIn title, seniority, industries and functions, which Alfa fills in after a save when they are empty.
  • A job's screening criteria (/v1/jobs/{jobId}/screening). Its tag covers the skills, screening rules and screening lists only, and a job also reports it as screening_etag.

If-Match is optional: a save without it is applied as before. Weak tags (W/"…") never match, and * matches any version.