Preview publishing a draft
POST /supplier-assessment-templates/{templateId}/publish/preview
Scope supplier_template:read Plan Growth+
A dry run of publishing, without a request body and without any change: the scoring impact of the draft against the latest published version (the built-in questionnaire for a first publish), the same violations and warnings as validate plus the weight-raised warning W6_WEIGHT_RAISED_3X, and the permissions of the caller. Publishing itself is refused for every token. A read: requires the supplier_template:read scope.
Example
curl -X POST "https://api.autociso.io/api/v1/supplier-assessment-templates/<templateId>/publish/preview" \
-H "Authorization: Bearer <your-api-token>"import requests
response = requests.post(
"https://api.autociso.io/api/v1/supplier-assessment-templates/<templateId>/publish/preview",
headers={"Authorization": "Bearer <your-api-token>"},
)
print(response.json())const response = await fetch("https://api.autociso.io/api/v1/supplier-assessment-templates/<templateId>/publish/preview", {
method: "POST",
headers: { "Authorization": "Bearer <your-api-token>" },
});
console.log(await response.json());Response 200
{
"data": {
"impact": {
"fromVersion": null,
"toVersion": 1,
"baselineIsBuiltin": true,
"baselineKey": "supplier_security_privacy",
"maxPenalty": [
{
"mode": "general",
"before": 100,
"after": 100,
"change": 0,
"unloseableBefore": 0,
"unloseableAfter": 0,
"deltaPct": 0
}
],
"criticalOptionCount": {
"before": 4,
"after": 4,
"change": 0
},
"scoreableQuestionCount": {
"before": 60,
"after": 60,
"change": 0,
"added": 0,
"removed": 0
},
"weightChanges": [],
"riskValueChanges": [],
"severityChanges": [],
"addedQuestions": [],
"removedQuestions": [],
"changes": [],
"requiresAcknowledgement": false,
"acknowledgementReasons": [],
"acknowledgementRowCount": 0
},
"violations": [],
"warnings": [],
"permissions": {
"canEdit": true,
"canSubmit": true,
"canWithdraw": false,
"canReject": false,
"canPublish": false,
"canSetDefault": false,
"canArchive": false,
"canDelete": true,
"publishBlockedReason": null
}
}
}Path parameters
templateIdstring requiredQuestionnaire document id (satpl_...), orsatpl_builtin_supplier_security_privacy_v1for the built-in one.
Returns
The data field of the standard { data, error, meta } envelope:
impactobject requiredWhat publishing the draft would change in scoring, against the baseline version.fromVersioninteger or null requiredtoVersioninteger requiredbaselineIsBuiltinboolean requiredbaselineKeystring requiredmaxPenaltyarray of object requiredShow 7 propertiesHide 7 properties { mode, before, after, change, … }
modestring requiredbeforeinteger requiredafterinteger requiredchangeinteger requiredunloseableBeforeinteger requiredunloseableAfterinteger requireddeltaPctnumber required
criticalOptionCountobject requiredShow 3 propertiesHide 3 properties { before, after, change }
beforeinteger requiredafterinteger requiredchangeinteger required
scoreableQuestionCountobject requiredShow 5 propertiesHide 5 properties { before, after, change, added, … }
beforeinteger requiredafterinteger requiredchangeinteger requiredaddedinteger requiredremovedinteger required
weightChangesarray of object requiredShow 6 propertiesHide 6 properties { questionId, sectionId, text, before, … }
questionIdstring requiredsectionIdstring requiredtextstring requiredbeforeinteger requiredafterinteger requiredzeroRiskOnlyboolean required
riskValueChangesarray of object requiredShow 5 propertiesHide 5 properties { questionId, optionId, label, before, … }
questionIdstring requiredoptionIdstring requiredlabelstring requiredbeforeinteger requiredafterinteger required
severityChangesarray of object requiredShow 7 propertiesHide 7 properties { questionId, optionId, label, before, … }
questionIdstring requiredoptionIdstring requiredlabelstring requiredbeforestring requiredafterstring requireddowngradeboolean requiredremovedbooleanTrue when the option or its question no longer exists in the draft.
addedQuestionsarray of object requiredShow 5 propertiesHide 5 properties { questionId, sectionId, text, weight, … }
questionIdstring requiredsectionIdstring requiredtextstring requiredweightinteger requiredscoreableboolean required
removedQuestionsarray of object requiredShow 5 propertiesHide 5 properties { questionId, sectionId, text, weight, … }
questionIdstring requiredsectionIdstring requiredtextstring requiredweightinteger requiredscoreableboolean required
changesarray of object requiredShow 14 propertiesHide 14 properties { kind, questionId, sectionId, optionId, … }
kindstring requiredweight, riskValue, severity, required, allowNa, questionAdded, questionRemoved, optionAdded, optionRemoved, conditionalRemoved or text.questionIdstring requiredsectionIdstring requiredoptionIdstringtextEnstring requiredbeforeany or null requiredPrevious value; its type depends onkind. Null on questionAdded, questionRemoved, optionAdded and optionRemoved rows.afterany or null requiredNew value; its type depends onkind. Null on questionAdded, questionRemoved, optionAdded and optionRemoved rows.shareBeforenumber requiredshareAfternumber requiredshareModestring requiredallOptionsZeroRiskboolean requiredreducesRiskboolean requiredtierstring required"notice" | "significant" | "severe"actorobjectShow 7 propertiesHide 7 properties { type, userId, name, email, … }
typestring requireduser, api_token or mcp.userIdstringnamestringemailstringtokenIdstringtokenNamestringsurfacestringconsole, api_token or mcp.
requiresAcknowledgementboolean requiredTrue when a person must acknowledge a risk reduction to publish.acknowledgementReasonsarray of string requiredacknowledgementRowCountinteger required
violationsarray of object requiredcodestring requiredV1 to V12.pathstring requiredmessagestring required
warningsarray of object requiredcodestring requiredW1_NO_ZERO_RISK_OPTION, W2_MISSING_TRANSLATION, W3_NO_CONTROL_IDS, W4_TOP_OF_SCALE_SKEW, W5_ALL_OPTIONS_ZERO_RISK, or (preview only) W6_WEIGHT_RAISED_3X.pathstring requiredparametersobject required
permissionsobject requiredWhat the caller may do with this version right now.canEditboolean requiredcanSubmitboolean requiredcanWithdrawboolean requiredcanRejectboolean requiredcanPublishboolean or null requiredcanSetDefaultboolean requiredcanArchiveboolean requiredcanDeleteboolean requiredpublishBlockedReasonstring or null required
Errors
| Status | Code | Retry | Meaning |
|---|---|---|---|
| 401 | INVALID_TOKEN |
no | Missing (UNAUTHORIZED) or invalid, expired or revoked (INVALID_TOKEN) token. |
| 402 | FEATURE_GATED |
no | The tenant plan does not include supply chain security. code FEATURE_GATED; args.feature, args.minTier, args.minTierName. |
| 403 | INSUFFICIENT_SCOPE |
no | The token lacks the required scope (INSUFFICIENT_SCOPE), or the request is refused (FORBIDDEN, INSUFFICIENT_ROLE for a draft the caller may not read). |
| 404 | NOT_FOUND |
no | Unknown or foreign-tenant questionnaire, version or clone source. code NOT_FOUND. |
| 429 | RATE_LIMITED |
yes | Too many failed authentication attempts from this address. code RATE_LIMITED; wait Retry-After seconds. |
| 500 | DB_ERROR |
no | Unexpected server error. code DB_ERROR; quote error.id to support. |
| 503 | BILLING_UNAVAILABLE |
yes | Billing is temporarily unavailable, so the plan could not be checked. code BILLING_UNAVAILABLE. Retry later. |
Last reviewed: 2026-10-15
Was this page helpful?