Skip to main content
Decisions (Beta)

Get Decision

Query the status, answers, and context summary of a judgment by ID.

The Decision API is currently in Beta. Interface definitions, response structures, and behavior may change in subsequent versions. Follow documentation updates and verify compatibility before using it in production.
GET /api/v1/forward/decisions/{decision_id}

Request headers

HeaderRequiredDescription
AuthorizationYesBearer <PAT or SAT>. Supports administrator and Identity-level SATs.

Path parameters

ParameterTypeRequiredDescription
decision_idstringYesThe Decision ID returned by the create endpoint. 1–256 bytes, with no leading or trailing whitespace, control characters, or /, \\, ?, #.
This endpoint does not accept query parameters. The record must be within the current authentication scope.

Example request

curl --silent --show-error --fail-with-body \
  "https://api.qoder.com/api/v1/forward/decisions/dec_xxx" \
  -H "Authorization: Bearer $QODER_ACCESS_TOKEN"

Example response

HTTP 200 OK (failed record)
{
  "id": "dec_xxx",
  "session_id": "sess_xxx",
  "source": "api",
  "status": "failed",
  "questions": [{
    "type": "choice",
    "name": "resolved",
    "instructions": "Has the user confirmed resolution?",
    "choices": [{"value": true}, {"value": false}]
  }],
  "answers": [],
  "context": {"mode": "session"},
  "error": {
    "code": "decision_context_unavailable",
    "message": "Session has no usable judgment context."
  },
  "created_at": "2026-10-26T10:00:00Z",
  "completed_at": "2026-10-26T10:00:01Z"
}
For response fields, see Decision object. Successful records have status: completed, and answers contains the judgment answers. Records still executing have status: running and completed_at: null. HTTP 200 indicates that the query succeeded, not that the judgment succeeded. Check status, error, and the answer type. Reading a record does not rerun the judgment or refresh its original context.

Errors

HTTPCodeTrigger
400invalid_decision_inputInvalid Decision ID.
400—Query parameters were supplied.
401—Credentials are missing, invalid, or expired.
403—The current credentials lack the required access permissions.
404—The Decision does not exist, is inaccessible, or has been cleaned up.
500—Internal service error.
For the error response structure, see Create Decision.