Update template approvers
POST /walk-creator/v1/template-approvers/update
Operation id: updateTemplateApprovers
Description
Updates Approvers for a walk template category by replacing all REVIEWER rows.
Same request and response contract as Add template approvers. Prefer this path when editing an existing Approvers list; use Add for the initial save.
REVIEWER-only rules apply: authorize (C) and Approver (A) rows are never written. Pass approvers as [] to clear Approvers.
Authentication: X-reflexis-csrf-token-X required. Category EDIT access is required.
Tags: WalkCreatorTemplateApprovers
Security
- ApiKeyHeader (apiKey)
- APIGEE API key header validated by VerifyAPIKey policy.
- 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 — Updated Approvers in server-assigned sequence.
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
403 — Category EDIT access denied (E202)
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 |
|---|---|---|---|
category_id | string | Yes | |
model_type | string | Yes | |
unit_id | string | Yes | Caller unit id. Same rules as Add template approvers. |
category_name | string | No | |
approvers | string | Yes | JSON array of Approver objects. Permit type is forced to REVIEWER (R). [] clears the Approvers list. |
{
"type": "object",
"required": [
"category_id",
"model_type",
"unit_id",
"approvers"
],
"properties": {
"category_id": {
"type": "string",
"example": "CAT_SAFETY"
},
"model_type": {
"type": "string",
"example": "W"
},
"unit_id": {
"type": "string",
"description": "Caller unit id. Same rules as **Add template approvers**.",
"example": "HQ"
},
"category_name": {
"type": "string",
"example": "Safety"
},
"approvers": {
"type": "string",
"description": "JSON array of Approver objects. Permit type is forced to REVIEWER (`R`).\n`[]` clears the Approvers list.\n",
"example": "[{\"profile_id\":\"STORE_MGR\",\"department_id\":\"OPS\",\"unit_level\":1,\"response_time\":\"1440M\"}]"
}
}
}
Response models
200 — Updated Approvers in server-assigned sequence.
Content type: application/json
Schema
| Property | Type | Required | Description |
|---|---|---|---|
status | string | Yes | |
template_approvers | array | Yes |
{
"type": "object",
"required": [
"status",
"template_approvers"
],
"properties": {
"status": {
"type": "string",
"enum": [
"OK"
]
},
"template_approvers": {
"type": "array",
"items": {
"type": "object",
"description": "One walk-category Approver. Stored as a template reviewer of permit type REVIEWER\n(`permit_type` = `R`, `txn_category` = `C`). Authorize (`C`) and Approver (`A`)\npermit rows are not part of this resource.\n",
"required": [
"txn_category",
"permit_type",
"entity_id",
"permit_sequence",
"model_type"
],
"properties": {
"domain_id": {
"type": "integer"
},
"txn_category": {
"type": "string",
"description": "Creation transaction. Category Approvers are always `C`.",
"enum": [
"C"
]
},
"permit_type": {
"type": "string",
"description": "REVIEWER. This API never returns `C` (authorize) or `A` (approver).",
"enum": [
"R"
]
},
"entity_id": {
"type": "string",
"description": "Walk template category id."
},
"entity_name": {
"type": "string",
"description": "Walk template category name."
},
"permit_sequence": {
"type": "integer",
"description": "1-based order on the Approvers screen."
},
"user_id": {
"type": "string"
},
"profile_id": {
"type": "string"
},
"department_id": {
"type": "string"
},
"unit_id": {
"type": "string"
},
"unit_level": {
"type": "integer"
},
"response_time": {
"type": "string",
"description": "Response window, for example `1440M`.",
"example": "1440M"
},
"created_by": {
"type": "string"
},
"creation_time": {
"type": "integer",
"format": "int64",
"description": "UTC creation time in epoch milliseconds."
},
"permit_desc": {
"type": "string",
"description": "JSON string of display labels (profile, department, unit, org level)."
},
"model_type": {
"type": "string",
"description": "Category model type. `W` for a walk category.",
"example": "W"
}
}
}
}
}
}
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"
}
]
}
}
}
403 — Category EDIT access denied (E202)
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."
}