Convert a classic walk template to modern UI
POST /walk-creator/v1/templates/convert
Operation id: convertWalkTemplate
Description
Converts a classic walk template (IS_MODERN_UI=N) to a modern one (IS_MODERN_UI=Y).
Two conversion modes are supported via conversion_type:
CONVERT — In-place ID swap:
- The classic template is archived as
<MODEL_ID>-AR(statusAR). - A modern copy takes the exact original
MODEL_ID, so all historical reporting and walk-instance data continue to reference the correct template. - Status mapping: the modern template inherits the same status as the source.
- Identity fields (
formTraceId,formUniqueId,formAccessKey,mockTraceId,referenceKey,cycleNo,iterationTime,submittedTime,editTime) are transferred to the modern template. The archive receives only the newly generatedformTraceId,formUniqueId, andformAccessKeyto avoid unique-key collisions. start_timeis optional; when omitted the source template's start date is used.- A temporary
-MD(modern draft) suffix is used internally during the swap; if the conversion fails mid-way the rollback restores the original template. - Not allowed when source status is
ED(Edit) orWD(Withdrawn).
DUPLICATE_AS_MODERN — New modern template:
- Creates a new template with an auto-generated
MODEL_ID(status alwaysD). - Historical reporting remains with the original classic template.
- Optionally accepts
model_nameandmodel_descriptionfor the new copy. - Not allowed when source status is
ED(Edit).
Data transformations applied in both modes:
QUESTION_TYPE='Y'(YES_NO) is converted to'O'(PICK_ONE).LOGIC_RULEdocuments are created from existingSKIP_DETAILS,WALK_VIOLATION_TASK, andMODEL_POST_ACT_DETAILSrecords.allowScoringis set toYinPERMISSION_ATTRwhen any question hasTOTAL_POINTS > 0.allowFollowUpTaskis set toYwhenWALK_VIOLATION_PROJECTrecords exist for the template.
Authentication: X-reflexis-csrf-token-X required.
Success — CONVERT response
{
"status": "OK",
"response": {
"modelList": [
{
"modelId": "FORM_123",
"modelName": "My Walk Template",
"status": "A",
"isModernUi": "Y"
}
]
}
}
Success — DUPLICATE_AS_MODERN response
{
"status": "OK",
"response": {
"modelList": [
{
"modelId": "FORM_9876",
"modelName": "Copy of My Walk Template",
"status": "D",
"isModernUi": "Y"
}
]
}
}
Error Scenarios
| Scenario | HTTP Status | Message |
|---|---|---|
Missing X-reflexis-csrf-token-X header | 400 | X-reflexis-csrf-token-X header is mandatory |
| Invalid or expired token | 401 | Invalid or expired token |
Missing model_id | 400 | model_id is mandatory |
Missing conversion_type | 400 | conversion_type is mandatory |
| Template not found | 200 | status: ER, business error string |
Template already modern (IS_MODERN_UI=Y) | 200 | status: ER, business error string |
Source status is ED (Edit) — both modes | 200 | status: ER, Template … is in Edit status and cannot be converted |
Source status is WD (Withdrawn) — CONVERT only | 200 | status: ER, Template … is Withdrawn and cannot be converted in-place; use DUPLICATE_AS_MODERN instead |
| Conversion failure (partial rollback) | 500 | Unexpected server error. |
Tags: WalkCreatorTemplateConversion
Security
- AuthTokenHeader (apiKey)
- Session authentication token validated server-side against the user session store. Required on every request. Absence returns HTTP 400; invalid/expired token returns HTTP 401.
Responses
200 — Success returns status: OK and response.modelList payload (same shape as duplicateTemplate API).
Application-level failures (validation, business rule) return HTTP 200 with status: ER.
Content type: application/json
400 — Invalid or missing required request parameter.
Content type: application/json
401 — Missing or invalid X-reflexis-csrf-token-X session token.
Content type: application/json
500 — Unexpected server-side error.
Content type: application/json
Request body
Required: Yes
application/x-www-form-urlencoded
Schema
| Property | Type | Required | Description |
|---|---|---|---|
model_id | string | Yes | MODEL_ID of the source classic walk template (IS_MODERN_UI=N). Allowed for most statuses; ED (Edit) is blocked for both modes, WD (Withdrawn) is blocked for CONVERT only. |
conversion_type | string | Yes | CONVERT — in-place ID swap; classic archived as <MODEL_ID>-AR, modern takes the original MODEL_ID (reporting continuity preserved). DUPLICATE_AS_MODERN — new template with auto-generated MODEL_ID (historical reporting stays on the old classic template). |
start_time | string | No | CONVERT only. Start date for the new modern template in yyyy-MM-dd format. Optional — when omitted the source template's own start date is used automatically. |
end_time | string | No | CONVERT only. End date for the new modern template in yyyy-MM-dd format. Optional — when omitted the source template's own end date is used automatically. |
model_name | string | No | DUPLICATE_AS_MODERN only. Name for the new modern template. Defaults to the source template name when omitted. |
model_description | string | No | DUPLICATE_AS_MODERN only. Description for the new modern template. Defaults to the source template description when omitted. |
{
"type": "object",
"required": [
"model_id",
"conversion_type"
],
"properties": {
"model_id": {
"type": "string",
"description": "`MODEL_ID` of the source classic walk template (`IS_MODERN_UI=N`).\nAllowed for most statuses; `ED` (Edit) is blocked for both modes,\n`WD` (Withdrawn) is blocked for `CONVERT` only.\n",
"example": "FORM_123"
},
"conversion_type": {
"type": "string",
"description": "`CONVERT` — in-place ID swap; classic archived as `<MODEL_ID>-AR`,\nmodern takes the original `MODEL_ID` (reporting continuity preserved).\n`DUPLICATE_AS_MODERN` — new template with auto-generated `MODEL_ID`\n(historical reporting stays on the old classic template).\n",
"enum": [
"CONVERT",
"DUPLICATE_AS_MODERN"
],
"example": "CONVERT"
},
"start_time": {
"type": "string",
"description": "`CONVERT` only. Start date for the new modern template in `yyyy-MM-dd`\nformat. **Optional** — when omitted the source template's own start date\nis used automatically.\n",
"example": "2026-07-15"
},
"end_time": {
"type": "string",
"description": "`CONVERT` only. End date for the new modern template in `yyyy-MM-dd`\nformat. Optional — when omitted the source template's own end date\nis used automatically.\n",
"example": "2026-12-31"
},
"model_name": {
"type": "string",
"description": "`DUPLICATE_AS_MODERN` only. Name for the new modern template.\nDefaults to the source template name when omitted.\n"
},
"model_description": {
"type": "string",
"description": "`DUPLICATE_AS_MODERN` only. Description for the new modern template.\nDefaults to the source template description when omitted.\n"
}
}
}
Response models
200 — Success returns status: OK and response.modelList payload (same shape as duplicateTemplate API).
Application-level failures (validation, business rule) return HTTP 200 with status: ER.
Content type: application/json
Schema
{
"oneOf": [
{
"type": "object",
"description": "Follows the same envelope as the legacy `duplicateTemplate` API.\nThe converted/duplicated template appears in `response.modelList`.\n",
"required": [
"status",
"response"
],
"properties": {
"status": {
"type": "string",
"enum": [
"OK"
]
},
"response": {
"type": "object",
"properties": {
"modelList": {
"type": "array",
"items": {
"type": "object",
"description": "Template list entry returned under `response.modelList[]` after a successful\nclassic-to-modern walk template conversion. Shape is identical to the\n`duplicateTemplate` API response.\n"
}
}
}
}
}
},
{
"type": "object",
"description": "Error envelope shape depends on how the error is produced:\n\n- **HTTP 200** — business or validation failure after the request is accepted:\n `{ \"status\": \"ER\", \"error\": \"<string or JSON>\" }` (no `errorCode`).\n- **HTTP 4xx/5xx** — structured API error:\n `{ \"status\": \"ER\", \"errorCode\": \"<code>\", \"response\": \"<localized message>\" }`.\n",
"properties": {
"status": {
"type": "string",
"enum": [
"ER"
]
},
"errorCode": {
"type": "string",
"description": "Structured error code for HTTP 4xx/5xx responses."
},
"response": {
"type": "string",
"description": "Human-readable message when `errorCode` is present (HTTP 4xx/5xx responses)."
},
"error": {
"description": "Payload for HTTP 200 error bodies (string, array, or object).",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {}
},
{
"type": "object"
}
]
}
}
}
]
}
400 — Invalid or missing required request parameter.
Content type: application/json
Schema
Error envelope shape depends on how the error is produced:
- HTTP 200 — business or validation failure after the request is accepted:
{ "status": "ER", "error": "<string or JSON>" }(noerrorCode). - HTTP 4xx/5xx — structured API error:
{ "status": "ER", "errorCode": "<code>", "response": "<localized message>" }.
| Property | Type | Required | Description |
|---|---|---|---|
status | string | No | |
errorCode | string | No | Structured error code for HTTP 4xx/5xx responses. |
response | string | No | Human-readable message when errorCode is present (HTTP 4xx/5xx responses). |
error | oneOf | No | Payload for HTTP 200 error bodies (string, array, or object). |
{
"type": "object",
"description": "Error envelope shape depends on how the error is produced:\n\n- **HTTP 200** — business or validation failure after the request is accepted:\n `{ \"status\": \"ER\", \"error\": \"<string or JSON>\" }` (no `errorCode`).\n- **HTTP 4xx/5xx** — structured API error:\n `{ \"status\": \"ER\", \"errorCode\": \"<code>\", \"response\": \"<localized message>\" }`.\n",
"properties": {
"status": {
"type": "string",
"enum": [
"ER"
]
},
"errorCode": {
"type": "string",
"description": "Structured error code for HTTP 4xx/5xx responses."
},
"response": {
"type": "string",
"description": "Human-readable message when `errorCode` is present (HTTP 4xx/5xx responses)."
},
"error": {
"description": "Payload for HTTP 200 error bodies (string, array, or object).",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {}
},
{
"type": "object"
}
]
}
}
}
Example:
{
"status": "ER",
"errorCode": "E110",
"response": "model_id is mandatory"
}
401 — Missing or invalid X-reflexis-csrf-token-X session token.
Content type: application/json
Schema
Error envelope shape depends on how the error is produced:
- HTTP 200 — business or validation failure after the request is accepted:
{ "status": "ER", "error": "<string or JSON>" }(noerrorCode). - HTTP 4xx/5xx — structured API error:
{ "status": "ER", "errorCode": "<code>", "response": "<localized message>" }.
| Property | Type | Required | Description |
|---|---|---|---|
status | string | No | |
errorCode | string | No | Structured error code for HTTP 4xx/5xx responses. |
response | string | No | Human-readable message when errorCode is present (HTTP 4xx/5xx responses). |
error | oneOf | No | Payload for HTTP 200 error bodies (string, array, or object). |
{
"type": "object",
"description": "Error envelope shape depends on how the error is produced:\n\n- **HTTP 200** — business or validation failure after the request is accepted:\n `{ \"status\": \"ER\", \"error\": \"<string or JSON>\" }` (no `errorCode`).\n- **HTTP 4xx/5xx** — structured API error:\n `{ \"status\": \"ER\", \"errorCode\": \"<code>\", \"response\": \"<localized message>\" }`.\n",
"properties": {
"status": {
"type": "string",
"enum": [
"ER"
]
},
"errorCode": {
"type": "string",
"description": "Structured error code for HTTP 4xx/5xx responses."
},
"response": {
"type": "string",
"description": "Human-readable message when `errorCode` is present (HTTP 4xx/5xx responses)."
},
"error": {
"description": "Payload for HTTP 200 error bodies (string, array, or object).",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {}
},
{
"type": "object"
}
]
}
}
}
500 — Unexpected server-side error.
Content type: application/json
Schema
Error envelope shape depends on how the error is produced:
- HTTP 200 — business or validation failure after the request is accepted:
{ "status": "ER", "error": "<string or JSON>" }(noerrorCode). - HTTP 4xx/5xx — structured API error:
{ "status": "ER", "errorCode": "<code>", "response": "<localized message>" }.
| Property | Type | Required | Description |
|---|---|---|---|
status | string | No | |
errorCode | string | No | Structured error code for HTTP 4xx/5xx responses. |
response | string | No | Human-readable message when errorCode is present (HTTP 4xx/5xx responses). |
error | oneOf | No | Payload for HTTP 200 error bodies (string, array, or object). |
{
"type": "object",
"description": "Error envelope shape depends on how the error is produced:\n\n- **HTTP 200** — business or validation failure after the request is accepted:\n `{ \"status\": \"ER\", \"error\": \"<string or JSON>\" }` (no `errorCode`).\n- **HTTP 4xx/5xx** — structured API error:\n `{ \"status\": \"ER\", \"errorCode\": \"<code>\", \"response\": \"<localized message>\" }`.\n",
"properties": {
"status": {
"type": "string",
"enum": [
"ER"
]
},
"errorCode": {
"type": "string",
"description": "Structured error code for HTTP 4xx/5xx responses."
},
"response": {
"type": "string",
"description": "Human-readable message when `errorCode` is present (HTTP 4xx/5xx responses)."
},
"error": {
"description": "Payload for HTTP 200 error bodies (string, array, or object).",
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {}
},
{
"type": "object"
}
]
}
}
}
Example:
{
"status": "ER",
"errorCode": "E500",
"response": "Unexpected server error."
}