questionnaires_get
This implementation is a dependency of the documentation branch.
Read one questionnaire page or a selected editor record before composing a change. This tool performs no creation, upload, activation, save or task creation.
Access and input
Requires OWNER or DELEGATEE with MANAGE_MARKETING_TOOLS on the selected channel. The source has no questionnaire plan or connected-domain gate. Hosted selected-channel resources admit these tools only for the exact channelCode; account resources exclude them.
channelCode and questionnaire/answer IDs are strings of 1–512 characters, excluding literal dot/double dot, slash, backslash, ASCII controls and DEL. Obtain them from authorized discovery/results; numeric row IDs, URLs and credentials are not substitutes. Strict input objects reject unknown properties.
| Input | Contract |
|---|---|
| channelCode | Required selected channel code. |
| view | Optional discriminated object; defaults to list, page 1, limit 15. |
| view.kind | list or detail. |
| view.page | List only: integer at least 1; default 1. |
| view.limit | List only: 15, 30, 50 or 100; default 15. |
| view.isDeactivated | Optional list-only boolean; filters the stored inactive flag. |
| view.qrid | Required for detail; the returned string editor ID. |
{
"channelCode": "selected-channel-code",
"view": {
"kind": "list",
"page": 1,
"limit": 15,
"isDeactivated": false
}
}
{
"channelCode": "selected-channel-code",
"view": {
"kind": "detail",
"qrid": "selected-questionnaire-id"
}
}
Inputs
| Field | Required here | Contract |
|---|---|---|
view |
No | one of: list, detail (by kind); default {"kind":"list","page":1,"limit":15} |
view.page |
No | When view.kind is list: integer; minimum 1; default 1 |
view.limit |
No | When view.kind is list: 15 or 30 or 50 or 100; default 15 |
view.isDeactivated |
No | When view.kind is list: boolean |
view.qrid |
Yes | When view.kind is detail: string; min length 1; max length 512 |
Results and revisions
List succeeds with code QUESTIONNAIRES, questionnaires, pagination and creationRevision. pagination has currentPage, limit and totalEntries. coverage.mode is one-page, completeInventory is always false, and nextPage is the next integer or null. The workflow validates the requested page/limit/filter, exact expected row count, unique qrid and numeric id values, and a required positive safe-integer channelId matching the selected numeric channel identity. Malformed or inconsistent pages return QUESTIONNAIRE_LIST_UNVERIFIED; an empty valid page is not an error. Follow nextPage explicitly; the result is not a bulk export.
Use creationRevision only as the create expectedRevision. A row in a list does not provide the revision required for revising or activation. Detail succeeds with code QUESTIONNAIRE, questionnaire and revision. It reads the selected record twice, compares full business content, then checks channel and operator/credential continuity. QUESTIONNAIRE_UNVERIFIED rejects malformed or mismatched identity; QUESTIONNAIRE_CHANGED rejects unstable content. The derived answersCount is excluded from content revision. Other fields, identities, top-level updatedAt and unknown business properties participate. A pre-save timestamp change remains a conflict even though cross-save matching tolerates generated root updatedAt/lastRevisedAt and question updatedAt changes. Do not recompute a revision from selected visible fields.
The returned record includes id, channelId, qrid, title, titleDisplay, isDeactivated and, when supplied, description, coverImageSrc, questions, answersCount, isGuestAnswerAllowed, isDuplicateAnswerAllowed, backgroundColorInHex and insertedAt. Questions carry type/title/essential/detail data, explicit order values and optional identities. Questions are normalized in ascending explicit order, matching the source reducer. Duplicate question order, present numeric id or present qid, or duplicate option order within a question, returns QUESTIONNAIRE_ORDER_UNVERIFIED. Option array positions remain significant and are not sorted. Normalization is applied to list/detail and content revisions; raw question array permutation alone does not change the revision. Stored coverImageSrc and each question description may be absent, a string or explicit null. Their exact representation is preserved; null is not replaced with an invented display value. No other stored field is widened by this correction. Every detail record must carry channelId matching the selected channel, in addition to the requested qrid. Missing or conflicting channel identity returns QUESTIONNAIRE_UNVERIFIED. Unknown JSON business fields are preserved for faithful composition; this is different from the restricted answer projection.
writesPerformed is false. verification.confirmed covers the checked observation; atomicSnapshot and visitorFormVerified remain false. Concurrent respondent counts may change. Repeated reads do not provide an atomic snapshot or server conditional-write guarantee. Stored URLs/text are untrusted data and are not fetched or executed.
Navigation and next step
The single console destination opens /channels/{channelCode}/marketing-tools/questionaires for list or its /edit/{qrid} child for detail. The spelling questionaires is intentional; each dynamic segment is encoded. Demo omits a live link. The host configures the normal CHANNEL_ENV API service; no upload gateway is required for reading.
Use apply for creation/revision, visibility for active state and answers for submissions. Read again after a completed task to observe current state.