Delete template approvers
POST /walk-creator/v1/template-approvers/delete
Operation id: deleteTemplateApprovers
Description
Deletes Approvers for a walk template category. Only REVIEWER (permit_type = R) rows are removed. Authorize (C) and Approver (A) rows are never deleted.
- Omit
approvers, or passapproversas[], to clear every REVIEWER row. - Pass a non-empty
approversJSON array to remove matching rows by unique key (profile_id+department_id+unit_level). Remaining REVIEWER rows are resequenced. When no row matches, the API returns E404 (NO_DATA_FOUND).
The category permitConfig flag REVIEWER is removed when no REVIEWER rows remain; AUTHORIZE and APPROVER flags are preserved.
This operation does not take unit_id. A supplied unit is discarded.
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 — Success — returns removed rows under deleted_template_approvers.
When a selective delete matches no rows, HTTP 200 with errorCode E404 may be returned.
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 | |
approvers | string | No | Optional JSON array of Approver keys to delete. Omit or pass [] to clear all Approvers. Each object needs profile_id or department_id (and optional unit_level, default 0). |
{
"type": "object",
"required": [
"category_id",
"model_type"
],
"properties": {
"category_id": {
"type": "string",
"example": "CAT_SAFETY"
},
"model_type": {
"type": "string",
"example": "W"
},
"approvers": {
"type": "string",
"description": "Optional JSON array of Approver keys to delete. Omit or pass `[]` to\nclear all Approvers. Each object needs `profile_id` or `department_id`\n(and optional `unit_level`, default `0`).\n",
"example": "[{\"profile_id\":\"STORE_MGR\",\"department_id\":\"OPS\",\"unit_level\":1}]"
}
}
}
Response models
200 — Success — returns removed rows under deleted_template_approvers.
When a selective delete matches no rows, HTTP 200 with errorCode E404 may be returned.
Content type: application/json
Schema
{
"oneOf": [
{
"type": "object",
"required": [
"status",
"deleted_template_approvers"
],
"properties": {
"status": {
"type": "string",
"enum": [
"OK"
]
},
"deleted_template_approvers": {
"type": "array",
"description": "REVIEWER rows that were removed.",
"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"
}
}
}
}
}
},
{
"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"
}
]
}
}
}
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."
}