Skip to navigation

Make a colour Candidate

Freezes one measured region of a succeeded assessment as a candidate pending review. Name the region by the assessment and the positions of the image and the region in its output. The candidate document records what was measured and the colour report it gave, and candidate_sha256 is its digest. A candidate is addressed by that digest, so making one already made answers it, pending or decided: 201 the first time, 200 after. A source that names no measurement is 400 INVALID_REQUEST with the reason in details[] at the field (assessment_not_found, assessment_not_succeeded, source_not_found, source_rejected), and nothing is recorded. Send an Idempotency-Key: it is required, and a retry with the same key and the same request answers the first response, byte for byte, with Idempotency-Replayed: true. Requires the digitisation.write scope, which your account operator provisions; served only where digitisation is enabled for your environment.

Authentication

X-API-Keystring

API key for one environment of your account. Keep server-side; never expose in browser clients.

Headers

Idempotency-Keystring or nullOptional

Request

Make a candidate of one measured region: positions in the assessment’s output.

assessment_idstringRequired
imageintegerRequired>=0
regionintegerRequired>=0
subjectobject or nullOptional

The product the images show, as the caller names it. Every field is optional and descriptive: it is what a reviewer reads, never what is measured. A stage of a candidate defaults its external_ref and shade_name from it.

Response

The candidate this region already is; a replay under the same Idempotency-Key answers with Idempotency-Replayed: true

assessment_idstring
candidatemap from strings to any
candidate_sha256stringformat: "^[0-9a-f]{64}$"
colour_contract_versioninteger
created_atdatetime
derived_from_candidate_idstring or null
fieldsmap from strings to objects
idstring
review_statusenum
Allowed values:
reviewed_atdatetime or null
review_urlstring or nullOptional
reviewed_byobject or nullOptional

Who made a decision: user, a person in the Platform, or api_key. It names no person; the Platform shows who.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
409
Conflict Error
503
Service Unavailable Error