Compare two questionnaire versions
GET /supplier-assessment-templates/{templateId}/versions/{version}/diff/{otherVersion}
Scope supplier_template:read Plan Growth+
List what changed between two versions of one questionnaire: added, removed and modified questions and options, with the before and after of each changed field. For a removed question, referencedByAssessments counts the existing assessments that hold an answer to it. As in get-version, {templateId} is the questionnaire’s templateKey. Requires the supplier_template:read scope.
Example
curl "https://api.autociso.io/api/v1/supplier-assessment-templates/<templateId>/versions/<version>/diff/<otherVersion>" \
-H "Authorization: Bearer <your-api-token>"import requests
response = requests.get(
"https://api.autociso.io/api/v1/supplier-assessment-templates/<templateId>/versions/<version>/diff/<otherVersion>",
headers={"Authorization": "Bearer <your-api-token>"},
)
print(response.json())const response = await fetch("https://api.autociso.io/api/v1/supplier-assessment-templates/<templateId>/versions/<version>/diff/<otherVersion>", {
method: "GET",
headers: { "Authorization": "Bearer <your-api-token>" },
});
console.log(await response.json());Response 200
{
"data": {
"templateKey": "tpl_1hgyun41rx49",
"fromVersion": 1,
"toVersion": 2,
"rows": [
{
"kind": "questionModified",
"questionId": "saq_1hgyun41rx4d",
"sectionId": "sect_1hgyun41rx4a",
"fields": [
{
"field": "weight",
"before": 8,
"after": 10
}
]
},
{
"kind": "optionAdded",
"questionId": "saq_1hgyun41rx4d",
"sectionId": "sect_1hgyun41rx4a",
"optionId": "saqo_1hgyun41rx4g"
},
{
"kind": "questionRemoved",
"questionId": "saq_1hgyun41rx4c",
"sectionId": "sect_1hgyun41rx4a",
"referencedByAssessments": 3
}
]
}
}Path parameters
templateIdstring requiredThe questionnaire'stemplateKey, which is shared by all its versions. Not a documenttemplateId.versioninteger requiredVersion number; 0 is an open draft.otherVersioninteger requiredThe version to compare with.
Returns
The data field of the standard { data, error, meta } envelope:
templateKeystring requiredfromVersioninteger requiredtoVersioninteger requiredrowsarray of object requiredkindstring required"questionAdded" | "questionRemoved" | "questionModified" | "optionAdded" | "optionRemoved" | "optionModified"questionIdstring requiredsectionIdstring requiredoptionIdstringfieldsarray of objectShow 3 propertiesHide 3 properties { field, before, after }
fieldstring requiredbeforeany requiredValue in the first version.afterany requiredValue in the second version.
referencedByAssessmentsintegerFor questionRemoved: existing assessments holding an answer to it.
Errors
| Status | Code | Retry | Meaning |
|---|---|---|---|
| 400 | VALIDATION_FAILED |
no | A version in the path is not an integer. code VALIDATION_FAILED. |
| 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-13
Was this page helpful?