Skip to content

Candidate routes: update, delete

The Candidate Verbs update, delete as api.sb routes, with inputs, result, refusals and an example.

Reference for Candidate, one group of Candidate routes.

Candidate.update

Changes the given properties of a Candidate. Verb page.

Text
PATCH /{namespace}/candidates/{id}

Path: id. Body, as JSON: the other inputs. Emits Candidate.updated.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Candidate.
openingOpeningThe Opening the Person is considered for.
personPersonThe Person, whose record crosses Startups only with Consent.
sourcestringOne of pool, prospecting, listing, or referral.
deltajsonThe per-Verb difference between the Candidate and the incumbent Agent in the tryout.

Returns

OutputTypeRequiredDescription
candidateCandidaterequiredThe Candidate.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

Terminal
curl -X PATCH https://api.sb/leaseline.app/candidates/candidate_CR5hpwMwhW \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"opening":"opening_3rD8qFSOyQ"}'
JSON
{
  "api": "https://api.sb/leaseline.app",
  "candidate": {
    "$id": "https://api.sb/leaseline.app/candidates/candidate_CR5hpwMwhW",
    "$type": "Candidate",
    "opening": "opening_3rD8qFSOyQ",
    "person": "person_sLqbXbW683",
    "source": "pool",
    "state": "screening"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Candidate.update",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}

Candidate.delete

Deletes a Candidate: a soft delete that keeps its history, undone by Thing.restore. Verb page.

Text
DELETE /{namespace}/candidates/{id}

Path: id. Emits Candidate.deleted.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Candidate.

Returns

OutputTypeRequiredDescription
candidateCandidaterequiredThe Candidate.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

Terminal
curl -X DELETE https://api.sb/leaseline.app/candidates/candidate_CR5hpwMwhW \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
JSON
{
  "api": "https://api.sb/leaseline.app",
  "candidate": {
    "$id": "https://api.sb/leaseline.app/candidates/candidate_CR5hpwMwhW",
    "$type": "Candidate",
    "opening": "opening_3rD8qFSOyQ",
    "person": "person_sLqbXbW683",
    "source": "pool",
    "state": "screening"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Candidate.delete",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}