Import walk/form template(s) from ZIP
POST /walk-creator/v1/templates/import
Operation id: importWalkTemplateModel
Description
Imports modern (16.11) template ZIP package(s).
Mirrors legacy POST /service/api/v2/model/importModel (same ImportExportService) with a next-gen response envelope shaped for Walk Creator UI navigation.
Authentication: X-reflexis-csrf-token-X required. Domain and user context are resolved from the session — do not send domain_id / auth_token as form fields.
Next-gen defaults (when omitted; legacy Admin Export-Import unchanged):
| Field | Default |
|---|---|
copy_with_permission | Y |
version_type | 16.11 |
entity_type | W |
created_by / creator_unit | Session user id / unit id |
Multipart: the ZIP part name must end with zip (e.g. file.zip).
Success response contract
Always read template_import.models[]:
| Field | Type | Purpose |
|---|---|---|
models[].model_id | string | New template id (clean, e.g. FORM_55662) |
models[].category_id | string | Category id for retrieveTemplateData / editor route |
When exactly one template is imported, the same ids are also mirrored as top-level template_import.model_id and template_import.category_id.
Imported templates are created as Draft (D).
Single import (example)
{
"status": "OK",
"template_import": {
"model_id": "FORM_55662",
"category_id": "CAT_123",
"models": [
{ "model_id": "FORM_55662", "category_id": "CAT_123" }
]
}
}
Multi import (example)
{
"status": "OK",
"template_import": {
"models": [
{ "model_id": "FORM_1", "category_id": "CAT_A" },
{ "model_id": "FORM_2", "category_id": "CAT_B" }
]
}
}
Tags: WalkCreatorTemplateImportExport
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 — status: OK with template_import.models[] (model_id + category_id).
Application-level failures may also 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
multipart/form-data
Schema
| Property | Type | Required | Description |
|---|---|---|---|
file.zip | string (binary) | No | Modern template ZIP (16.11). Multipart field name must end with zip (e.g. file.zip). |
copy_with_permission | string | No | When Y, import copies permission listings with the template. Next-gen default is Y when omitted. |
created_by | string | No | Optional override creator user id. Defaults to session user id. |
creator_unit | string | No | Optional override creator unit id. Defaults to session unit id. |
entity_type | string | No | Entity type for package compatibility (W / F / S). Next-gen default is W when omitted. |
version_type | string | No | Package version. Next-gen default is 16.11 when omitted. Older package formats are not supported on this endpoint. |
{
"type": "object",
"properties": {
"file.zip": {
"type": "string",
"format": "binary",
"description": "Modern template ZIP (`16.11`). Multipart field name must end with `zip`\n(e.g. `file.zip`).\n"
},
"copy_with_permission": {
"type": "string",
"description": "When `Y`, import copies permission listings with the template.\nNext-gen default is `Y` when omitted.\n",
"enum": [
"Y",
"N"
],
"example": "Y"
},
"created_by": {
"type": "string",
"description": "Optional override creator user id. Defaults to session user id."
},
"creator_unit": {
"type": "string",
"description": "Optional override creator unit id. Defaults to session unit id."
},
"entity_type": {
"type": "string",
"description": "Entity type for package compatibility (`W` / `F` / `S`).\nNext-gen default is `W` when omitted.\n",
"example": "W"
},
"version_type": {
"type": "string",
"description": "Package version. Next-gen default is `16.11` when omitted.\nOlder package formats are not supported on this endpoint.\n",
"example": "16.11"
}
}
}
Response models
200 — Success — status: OK with template_import.models[] (model_id + category_id).
Application-level failures may also return HTTP 200 with status: ER.
Content type: application/json
Schema
{
"oneOf": [
{
"type": "object",
"description": "Successful next-gen template import envelope.",
"required": [
"status",
"template_import"
],
"properties": {
"status": {
"type": "string",
"enum": [
"OK"
]
},
"template_import": {
"type": "object",
"description": "Next-gen import success payload under `template_import`.\n\n**Primary contract — use `models[]`:**\neach entry has clean `model_id` + `category_id` for editor navigation.\n\n**Single-import convenience:** when exactly one template is imported, the same\nids are also mirrored at the top level as `model_id` / `category_id`.\nFor multi-import those top-level fields are omitted; iterate `models`.\n",
"required": [
"models"
],
"properties": {
"models": {
"type": "array",
"description": "Imported templates in package order.",
"items": {
"type": "object",
"description": "One imported template. Use these ids to open the Walk Creator editor\n(`retrieveTemplateData` / template route) without a follow-up list lookup.\n",
"required": [
"model_id",
"category_id"
]
}
},
"model_id": {
"type": "string",
"description": "Present only when `models.length === 1`. Same value as `models[0].model_id`.\n",
"example": "FORM_55662"
},
"category_id": {
"type": "string",
"description": "Present only when `models.length === 1`. Same value as `models[0].category_id`.\n",
"example": "CAT_123"
},
"formula_id": {
"description": "Optional formula ids created during import (when formulas were copied).",
"oneOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "string"
}
]
}
}
}
}
},
{
"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."
}