convert_candidacy

Convert an accepted candidacy

All MCP toolsWrite

Record the conversion of an accepted candidacy — the ONE conversion surface: moves it to converted, emits the hired outcome, and creates the employment record in one transaction (a person already holding an active tenure in the organization is refused). Passes while the job is published; an unpublished job refuses (job_not_published). A record on the agreed terms names no job and passes. Terminal: a conversion cannot be undone from this surface.

Input schema

{
  "type": "object",
  "properties": {
    "candidacyId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      "description": "The candidacy to convert (candidacies.id) — must be in accepted."
    },
    "startDate": {
      "description": "The joining or transfer date, ISO 8601 (YYYY-MM-DD); omit to default to the conversion's UTC calendar date.",
      "type": "string",
      "format": "date",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
    },
    "title": {
      "description": "Role title for the employment record (non-empty); omit to leave unset.",
      "type": "string",
      "minLength": 1,
      "maxLength": 256
    },
    "employmentType": {
      "type": "string",
      "enum": [
        "FULL_TIME",
        "PART_TIME",
        "CONTRACTOR",
        "TEMPORARY",
        "INTERN"
      ],
      "description": "Employment type (schema.org vocabulary): \"FULL_TIME\", \"PART_TIME\", \"CONTRACTOR\", \"TEMPORARY\", or \"INTERN\". Other values are rejected."
    }
  },
  "required": [
    "candidacyId"
  ],
  "$schema": "http://json-schema.org/draft-07/schema#"
}

Output schema

{
  "type": "object",
  "properties": {
    "candidacy": {
      "type": "object",
      "properties": {
        "candidacyId": {
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
          "description": "The selection record (candidacies.id)."
        },
        "jobId": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            {
              "type": "null"
            }
          ],
          "description": "The job this selection record is on (jobs.id) when the seat is a job's; null on the agreed terms."
        },
        "agreementId": {
          "anyOf": [
            {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            {
              "type": "null"
            }
          ],
          "description": "The agreed terms this selection record is on (agreements.id) when the seat is the agreement's; null on a job seat — exactly one of jobId / agreementId is set (ADR-0229)."
        },
        "origin": {
          "type": "string",
          "enum": [
            "external"
          ],
          "description": "Candidacy origin: \"external\" (the selection record opened from outside the organization). The state machine never conditions on it."
        },
        "state": {
          "type": "string",
          "enum": [
            "applied",
            "screening_passed",
            "interviewing",
            "offered",
            "accepted",
            "converted",
            "withdrawn",
            "declined"
          ],
          "description": "Candidacy state: the active pipeline \"applied\" → \"screening_passed\" → \"interviewing\" → \"offered\" → \"accepted\" → \"converted\", plus the terminal negatives \"withdrawn\" (seeker-initiated) and \"declined\" (hirer-initiated)."
        },
        "profileVersion": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 1,
              "maximum": 9007199254740991
            },
            {
              "type": "null"
            }
          ],
          "description": "The profile_versions.version pinned when the record opened (int >= 1); null when the person had no profile version yet."
        },
        "appliedAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
          "description": "When the selection record opened (applied), ISO 8601 datetime (UTC)."
        },
        "stateChangedAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
          "description": "When the current state was entered, ISO 8601 datetime (UTC)."
        }
      },
      "required": [
        "candidacyId",
        "jobId",
        "agreementId",
        "origin",
        "state",
        "profileVersion",
        "appliedAt",
        "stateChangedAt"
      ],
      "additionalProperties": false,
      "description": "One selection record as a write result (withdraw): the candidacy row's state and its seat — a job or the agreed terms — no job join."
    },
    "transition": {
      "type": "object",
      "properties": {
        "from": {
          "type": "string",
          "enum": [
            "applied",
            "screening_passed",
            "interviewing",
            "offered",
            "accepted",
            "converted",
            "withdrawn",
            "declined"
          ],
          "description": "Candidacy state: the active pipeline \"applied\" → \"screening_passed\" → \"interviewing\" → \"offered\" → \"accepted\" → \"converted\", plus the terminal negatives \"withdrawn\" (seeker-initiated) and \"declined\" (hirer-initiated)."
        },
        "to": {
          "type": "string",
          "enum": [
            "applied",
            "screening_passed",
            "interviewing",
            "offered",
            "accepted",
            "converted",
            "withdrawn",
            "declined"
          ],
          "description": "Candidacy state: the active pipeline \"applied\" → \"screening_passed\" → \"interviewing\" → \"offered\" → \"accepted\" → \"converted\", plus the terminal negatives \"withdrawn\" (seeker-initiated) and \"declined\" (hirer-initiated)."
        },
        "occurredAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
          "description": "When the transition happened, ISO 8601 datetime (UTC)."
        },
        "actorToken": {
          "description": "Opaque subject_token of the actor who drove the transition, if any.",
          "type": "string",
          "format": "uuid",
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        }
      },
      "required": [
        "from",
        "to",
        "occurredAt"
      ],
      "additionalProperties": false,
      "description": "The appended history row (accepted → converted), with the credential's subject_token as actor."
    },
    "employment": {
      "type": "object",
      "properties": {
        "startDate": {
          "type": "string",
          "format": "date",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
          "description": "Tenure start (the joining or transfer date), ISO 8601 date (YYYY-MM-DD); defaults to the conversion's UTC calendar date when not provided."
        },
        "title": {
          "description": "Role title (non-empty), when provided.",
          "type": "string",
          "minLength": 1
        },
        "employmentType": {
          "type": "string",
          "enum": [
            "FULL_TIME",
            "PART_TIME",
            "CONTRACTOR",
            "TEMPORARY",
            "INTERN"
          ],
          "description": "Employment type (schema.org vocabulary): \"FULL_TIME\", \"PART_TIME\", \"CONTRACTOR\", \"TEMPORARY\", or \"INTERN\". Other values are rejected."
        }
      },
      "required": [
        "startDate"
      ],
      "additionalProperties": false,
      "description": "The employment record a conversion created: always active with source: converted; a person already holding an active tenure in the organization is refused before any write."
    }
  },
  "required": [
    "candidacy",
    "transition",
    "employment"
  ],
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": false
}

On this page