Administration/Questionnaire Templates

Save a questionnaire template as the Retraced admin

Changed on

The save behind the Retraced-admin template builder. The admin twin of PUT /api/questionnaires/:id/builder — same write, same service — but gated on admin:questionnaire:write, which only RETRACED_ADMIN holds. sections and questions are the complete desired content, not a patch: rows present are created or updated, rows absent are deleted along with their answers and comments. name and description are always written; status is not settable here and keeps its stored value. A template stores no deadline of its own, so dueDate is always written as null — send it as null or omit it. The questionnaire must belong to the calling company — another company's is indistinguishable from a missing one and answers 404 — and a Retraced-owned questionnaire may only be saved by a Retraced admin, which this guard already guarantees. templates names the surface, not a filter: no is_template predicate is applied, so any questionnaire the caller company owns can be saved here. Once answer requests exist, an existing question's title, type, mandatory flag and options are frozen; adding a new question instead reopens every request so it can be answered. Answers the saved questionnaire in the same shape as the template builder read.

put/api/admin/questionnaires/templates/{id}

Request

  • Base URL
    https://api.retraced.com (the document declares no server; this is the origin it was published from)
  • URL
    https://api.retraced.com/api/admin/questionnaires/templates/{id}
  • Auth
    none declared

Path parameters

idstring required

Request body

namestring required
descriptionstring nullable
dueDatestring date-time nullable

Response

Default Response

Changes

    • info

      the // request property's maxLength was increased from 500 to 1024

    • info

      the // request property's maxLength was increased from 64 to 1024

    • breaking

      removed subschema #1 subschema #2 from the request property anyOf list

    • breaking

      removed subschema #1 subschema #2 from the request property anyOf list

    • breaking

      removed subschema #1 subschema #2 from the // request property anyOf list

    • breaking

      removed subschema #1 subschema #2 from the // request property anyOf list

    • breaking

      removed subschema #1 subschema #2 from the // request property anyOf list

    • breaking

      removed subschema #1 subschema #2 from the // request property anyOf list

    • breaking

      request property // list-of-types was narrowed by removing types string from media type application/json

    • breaking

      added the pattern ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$ to the request property

    • breaking

      the request property type changed from no type to string

    • breaking

      the request property type changed from no type to string, and format from no format to date-time

    • breaking

      the // request property type changed from no type to string

    • breaking

      the // request property type changed from no type to string

    • breaking

      the // request property type changed from no type to string

    • breaking

      the // request property type changed from no type to string

    • warning

      the // request property's maxLength was set to 10000

    • warning

      the // request property's maxLength was set to 500

    • info

      the request property became nullable

    • info

      the request property became nullable

    • info

      the request property // became nullable

    • info

      the request property // became nullable

    • info

      the request property // became nullable

    • info

      the request property // became nullable

    • info

      the request property // became nullable