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>"

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

  • templateId string required
    The questionnaire's templateKey, which is shared by all its versions. Not a document templateId.
  • version integer required
    Version number; 0 is an open draft. minimum 0
  • otherVersion integer required
    The version to compare with. minimum 0

Returns

The data field of the standard { data, error, meta } envelope:

  • templateKey string required
  • fromVersion integer required
  • toVersion integer required
  • rows array of object required
    • kind string required
      "questionAdded" | "questionRemoved" | "questionModified" | "optionAdded" | "optionRemoved" | "optionModified"
    • questionId string required
    • sectionId string required
    • optionId string
    • fields array of object
      Show 3 propertiesHide 3 properties { field, before, after }
      • field string required
      • before any required
        Value in the first version.
      • after any required
        Value in the second version.
    • referencedByAssessments integer
      For 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?

Esc