Start / create a new walk instance (multipart/form-data)

POST /walk/v1/walks/

Operation id: createWalk

Description

Creates and starts a new walk instance from the given model/category with schedule and assignment details. The request must be sent as multipart/form-data.

All ten required fields must be present. Any missing required field returns HTTP 400 with a validation error message listing the missing fields.

Authentication: X-reflexis-csrf-token-X required. Domain and user context are resolved from the session.


Request Headers

HeaderRequiredDescription
X-reflexis-csrf-token-XYesSession authentication token
Content-TypeYesMust be multipart/form-data

Response Structure

Success envelope with response wrapper only — shape is { "status": "OK", "response": <object> }.

For start walk, the response typically includes walk_list (array of walk rows) and related fields, all snake_case in JSON. There is no message property.

{
  "response": {
    "walk_list": []
  },
  "status": "OK"
}
FieldDescription
responseJSON object from start-walk processing (structure varies by branch)

Error Scenarios

ScenarioHTTP StatusMessage
Missing X-reflexis-csrf-token-X header400X-reflexis-csrf-token-X header is mandatory
Invalid or expired token401Invalid or expired token
Missing required field400<field_name> is mandatory — each field is checked individually; first failure returns HTTP 400 with errorCode: E110
Internal server error500Error while processing request. Here is the error : <error details>

Error Codes Reference

CodeHTTPDescription
E112400X-reflexis-csrf-token-X header is mandatory
E101400Domain id is mandatory (session payload)
E202401User session is invalid (MyWork)
E204401Invalid or expired token
E110400Missing required multipart field (create-walk operation)
E108500Walk name is mandatory
E109500Walk description is mandatory
E301500Walk name exceeds max length
E302500Walk description exceeds max length
E202403Invalid instance / model access
E500500Unhandled server error

Tags: WalkCreate

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 — Walk created. Returns response from start-walk processing (e.g. may contain walk_list).

Application-level errors are returned as 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

Walk creation form data. All properties marked as required must be present.

PropertyTypeRequiredDescription
model_idstringYesRequired. Walk template/model identifier. Obtained from GET /walk/v1/walks/types.
category_idstringYesRequired. Category identifier. Obtained from GET /walk/v1/categories.
start_datestringYesRequired. Walk start date. Format: YYYY-MM-DD (e.g. 2026-01-20).
end_datestringYesRequired. Walk end date. Format: YYYY-MM-DD (e.g. 2026-01-20).
start_timestringYesRequired. Walk start time. Format: h:mm AM/PM (e.g. 3:00 AM).
walk_namestringYesRequired. Display name for the walk instance. Length-limited.
walk_descriptionstringYesRequired. Description of the walk. Length-limited.
assign_unitstringYesRequired. Unit/store ID that the walk is assigned to.
assign_unit_time_zonestringYesRequired. IANA time zone ID of the assigned unit.
assign_unit_namestringYesRequired. Display name of the assigned unit/store.
{
  "type": "object",
  "description": "Walk creation form data. All properties marked as required must be present.",
  "required": [
    "model_id",
    "category_id",
    "start_date",
    "end_date",
    "start_time",
    "walk_name",
    "walk_description",
    "assign_unit",
    "assign_unit_time_zone",
    "assign_unit_name"
  ],
  "properties": {
    "model_id": {
      "type": "string",
      "description": "**Required.** Walk template/model identifier. Obtained from `GET /walk/v1/walks/types`.\n"
    },
    "category_id": {
      "type": "string",
      "description": "**Required.** Category identifier. Obtained from `GET /walk/v1/categories`.\n"
    },
    "start_date": {
      "type": "string",
      "description": "**Required.** Walk start date. **Format:** `YYYY-MM-DD` (e.g. `2026-01-20`).\n",
      "example": "2026-01-20"
    },
    "end_date": {
      "type": "string",
      "description": "**Required.** Walk end date. **Format:** `YYYY-MM-DD` (e.g. `2026-01-20`).\n",
      "example": "2026-01-20"
    },
    "start_time": {
      "type": "string",
      "description": "**Required.** Walk start time. **Format:** `h:mm AM/PM` (e.g. `3:00 AM`).\n",
      "example": "3:00 AM"
    },
    "walk_name": {
      "type": "string",
      "description": "**Required.** Display name for the walk instance. Length-limited.",
      "example": "Store Compliance Walk - Jan 2026"
    },
    "walk_description": {
      "type": "string",
      "description": "**Required.** Description of the walk. Length-limited.",
      "example": "Monthly compliance inspection for Store 1001"
    },
    "assign_unit": {
      "type": "string",
      "description": "**Required.** Unit/store ID that the walk is assigned to.",
      "example": "1001"
    },
    "assign_unit_time_zone": {
      "type": "string",
      "description": "**Required.** IANA time zone ID of the assigned unit.\n",
      "example": "US/Eastern"
    },
    "assign_unit_name": {
      "type": "string",
      "description": "**Required.** Display name of the assigned unit/store.",
      "example": "Store 1001 - New York"
    }
  }
}

Response models

200 — Walk created. Returns response from start-walk processing (e.g. may contain walk_list).

Application-level errors are returned as HTTP 200 with status: "ER".

Content type: application/json

Schema

Successful response envelope for Walk APIs.

Named key (most GET endpoints): { "status": "OK", "<resource_key>": <payload> } — e.g. walk_categories, walks, scheduled_walks, walk_types, walk_questions, walk_stores, walk_details, walk_permissions, walk_users. There is no message property.

Default key (multipart POST — create / schedule / submit): { "status": "OK", "response": <object> }.

Nested objects and arrays are emitted in snake_case (internal camelCase field names are normalized in responses).

PropertyTypeRequiredDescription
statusstringYes
responseobjectNoGeneric JSON object — structure varies by endpoint and config type.
walk_categoriesarrayNo
walksobjectNoGeneric JSON object — structure varies by endpoint and config type.
scheduled_walksobjectNoGeneric JSON object — structure varies by endpoint and config type.
walk_typesarrayNo
walk_questionsobjectNoGeneric JSON object — structure varies by endpoint and config type.
walk_storesobjectNoGeneric JSON object — structure varies by endpoint and config type.
walk_detailsobjectNoGeneric JSON object — structure varies by endpoint and config type.
walk_permissionsobjectNoGeneric JSON object — structure varies by endpoint and config type.
walk_usersarrayNo
{
  "type": "object",
  "description": "Successful response envelope for Walk APIs.\n\n**Named key (most GET endpoints):** `{ \"status\": \"OK\", \"<resource_key>\": <payload> }` — e.g. `walk_categories`,\n`walks`, `scheduled_walks`, `walk_types`, `walk_questions`, `walk_stores`, `walk_details`, `walk_permissions`,\n`walk_users`. There is **no** `message` property.\n\n**Default key (multipart POST — create / schedule / submit):** `{ \"status\": \"OK\", \"response\": <object> }`.\n\nNested objects and arrays are emitted in **snake_case** (internal camelCase field names are normalized in responses).\n",
  "example": {
    "status": "OK",
    "walks": {
      "walk_list": [],
      "last_fetch_time": 1710000000000
    }
  },
  "required": [
    "status"
  ],
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "OK"
      ]
    },
    "response": {
      "type": "object",
      "description": "Generic JSON object — structure varies by endpoint and config type."
    },
    "walk_categories": {
      "type": "array",
      "items": {
        "type": "object",
        "description": "A single walk category object.",
        "properties": {
          "domain_id": {
            "type": "integer",
            "description": "Domain identifier for the category."
          },
          "category_name": {
            "type": "string",
            "description": "Display name of the walk category."
          },
          "category_id": {
            "type": "string",
            "description": "Unique category identifier."
          },
          "category_type": {
            "type": "string",
            "description": "Category type code (e.g. `\"W\"` for walk)."
          },
          "category_desc": {
            "type": "string",
            "description": "Category description."
          },
          "creator_name": {
            "type": "string",
            "description": "Username of the category creator."
          },
          "permission": {
            "type": "string",
            "description": "Comma-separated permission flags (e.g. `\"1,1,1,1\"`)."
          },
          "created_by": {
            "type": "string",
            "description": "Login ID of the creator."
          }
        }
      }
    },
    "walks": {
      "type": "object",
      "description": "Generic JSON object — structure varies by endpoint and config type."
    },
    "scheduled_walks": {
      "type": "object",
      "description": "Generic JSON object — structure varies by endpoint and config type."
    },
    "walk_types": {
      "type": "array",
      "items": {}
    },
    "walk_questions": {
      "type": "object",
      "description": "Generic JSON object — structure varies by endpoint and config type."
    },
    "walk_stores": {
      "type": "object",
      "description": "Generic JSON object — structure varies by endpoint and config type."
    },
    "walk_details": {
      "type": "object",
      "description": "Generic JSON object — structure varies by endpoint and config type."
    },
    "walk_permissions": {
      "type": "object",
      "description": "Generic JSON object — structure varies by endpoint and config type."
    },
    "walk_users": {
      "type": "array",
      "items": {}
    }
  }
}

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>" } (no errorCode).
  • HTTP 4xx/5xx — structured API error: { "status": "ER", "errorCode": "<code>", "response": "<localized message>" }.

See the global Error Codes Reference in this spec for errorCode values.

PropertyTypeRequiredDescription
statusstringYes
errorCodestringNoStructured error code (Walk or shared session codes; see Error Codes Reference).
responsestringNoHuman-readable message when errorCode is present (HTTP 4xx/5xx responses).
erroroneOfNoPayload 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\nSee the global **Error Codes Reference** in this spec for `errorCode` values.\n",
  "example": {
    "status": "ER",
    "errorCode": "E110",
    "response": "model_id is mandatory"
  },
  "required": [
    "status"
  ],
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "ER"
      ]
    },
    "errorCode": {
      "type": "string",
      "description": "Structured error code (Walk or shared session codes; see **Error Codes Reference**)."
    },
    "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"
        }
      ]
    }
  }
}

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>" } (no errorCode).
  • HTTP 4xx/5xx — structured API error: { "status": "ER", "errorCode": "<code>", "response": "<localized message>" }.

See the global Error Codes Reference in this spec for errorCode values.

PropertyTypeRequiredDescription
statusstringYes
errorCodestringNoStructured error code (Walk or shared session codes; see Error Codes Reference).
responsestringNoHuman-readable message when errorCode is present (HTTP 4xx/5xx responses).
erroroneOfNoPayload 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\nSee the global **Error Codes Reference** in this spec for `errorCode` values.\n",
  "example": {
    "status": "ER",
    "errorCode": "E110",
    "response": "model_id is mandatory"
  },
  "required": [
    "status"
  ],
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "ER"
      ]
    },
    "errorCode": {
      "type": "string",
      "description": "Structured error code (Walk or shared session codes; see **Error Codes Reference**)."
    },
    "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>" } (no errorCode).
  • HTTP 4xx/5xx — structured API error: { "status": "ER", "errorCode": "<code>", "response": "<localized message>" }.

See the global Error Codes Reference in this spec for errorCode values.

PropertyTypeRequiredDescription
statusstringYes
errorCodestringNoStructured error code (Walk or shared session codes; see Error Codes Reference).
responsestringNoHuman-readable message when errorCode is present (HTTP 4xx/5xx responses).
erroroneOfNoPayload 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\nSee the global **Error Codes Reference** in this spec for `errorCode` values.\n",
  "example": {
    "status": "ER",
    "errorCode": "E110",
    "response": "model_id is mandatory"
  },
  "required": [
    "status"
  ],
  "properties": {
    "status": {
      "type": "string",
      "enum": [
        "ER"
      ]
    },
    "errorCode": {
      "type": "string",
      "description": "Structured error code (Walk or shared session codes; see **Error Codes Reference**)."
    },
    "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."
}