{
  "openapi": "3.1.0",
  "info": {
    "title": "Rologi Motion - commands",
    "version": "0.0.1",
    "description": "Rologi Motion 0.0.1 customer integration: tasks, bin state, product registration, station controls and typed events. Task mode must be enabled for this workflow.",
    "x-source-commit": "be5dcee037b7e6515d474fd44333cce631be8508",
    "x-partner-version": "1.0.0",
    "x-status": "development",
    "x-documentation-scope": "warehouse-integration"
  },
  "paths": {
    "/api/products": {
      "post": {
        "operationId": "addProduct",
        "summary": "Register a product this station may pick",
        "responses": {
          "201": {
            "description": "Accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Acknowledgement"
                },
                "example": {
                  "data": "ok",
                  "status": "ok"
                }
              }
            },
            "headers": {
              "X-Robotic-Picking-Request-Id": {
                "$ref": "#/components/headers/WcsRequestId"
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/RelayError",
            "description": "The body does not match the contract, or a named tote is not presented."
          },
          "410": {
            "description": "That job or product is not on the station."
          },
          "401": {
            "$ref": "#/components/responses/RelayError"
          },
          "403": {
            "$ref": "#/components/responses/RelayError"
          },
          "405": {
            "$ref": "#/components/responses/RelayError"
          },
          "406": {
            "$ref": "#/components/responses/RelayError"
          },
          "415": {
            "$ref": "#/components/responses/RelayError"
          },
          "500": {
            "$ref": "#/components/responses/RelayError"
          },
          "502": {
            "$ref": "#/components/responses/RelayError"
          },
          "503": {
            "$ref": "#/components/responses/RelayError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddProductRequest"
              },
              "example": {
                "articleId": "503",
                "articleName": "AOD-S9S-224",
                "weightGrams": 175
              }
            }
          }
        },
        "tags": [
          "Commands"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": " Motion-owned failures use ApiError and X-Robotic-Picking-Request-Id. Codes are extensible; handle unknown codes by HTTP status. Downstream responses remain unchanged; ApiError is not a supplier fault or a pick result.",
        "parameters": [
          {
            "name": "Ras-Api-Version",
            "in": "header",
            "required": false,
            "description": "API version. Omit to use the oldest supported version; currently 1.",
            "schema": {
              "type": "string"
            },
            "example": "1"
          }
        ]
      },
      "delete": {
        "operationId": "deleteProduct",
        "summary": "Remove a product",
        "responses": {
          "201": {
            "description": "Accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Acknowledgement"
                },
                "example": {
                  "data": "ok",
                  "status": "ok"
                }
              }
            },
            "headers": {
              "X-Robotic-Picking-Request-Id": {
                "$ref": "#/components/headers/WcsRequestId"
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/RelayError",
            "description": "The body does not match the contract, or a named tote is not presented."
          },
          "410": {
            "description": "That job or product is not on the station."
          },
          "401": {
            "$ref": "#/components/responses/RelayError"
          },
          "403": {
            "$ref": "#/components/responses/RelayError"
          },
          "405": {
            "$ref": "#/components/responses/RelayError"
          },
          "406": {
            "$ref": "#/components/responses/RelayError"
          },
          "415": {
            "$ref": "#/components/responses/RelayError"
          },
          "500": {
            "$ref": "#/components/responses/RelayError"
          },
          "502": {
            "$ref": "#/components/responses/RelayError"
          },
          "503": {
            "$ref": "#/components/responses/RelayError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteProductRequest"
              },
              "example": {
                "articleId": "503"
              }
            }
          }
        },
        "tags": [
          "Commands"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": " Motion-owned failures use ApiError and X-Robotic-Picking-Request-Id. Codes are extensible; handle unknown codes by HTTP status. Downstream responses remain unchanged; ApiError is not a supplier fault or a pick result.",
        "parameters": [
          {
            "name": "Ras-Api-Version",
            "in": "header",
            "required": false,
            "description": "API version. Omit to use the oldest supported version; currently 1.",
            "schema": {
              "type": "string"
            },
            "example": "1"
          }
        ]
      }
    },
    "/api/state": {
      "post": {
        "operationId": "setCellStatus",
        "summary": "Pause or resume the station",
        "responses": {
          "201": {
            "description": "Accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Acknowledgement"
                },
                "example": {
                  "data": "ok",
                  "status": "ok"
                }
              }
            },
            "headers": {
              "X-Robotic-Picking-Request-Id": {
                "$ref": "#/components/headers/WcsRequestId"
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/RelayError",
            "description": "The body does not match the contract, or a named tote is not presented."
          },
          "401": {
            "$ref": "#/components/responses/RelayError"
          },
          "403": {
            "$ref": "#/components/responses/RelayError"
          },
          "405": {
            "$ref": "#/components/responses/RelayError"
          },
          "406": {
            "$ref": "#/components/responses/RelayError"
          },
          "415": {
            "$ref": "#/components/responses/RelayError"
          },
          "500": {
            "$ref": "#/components/responses/RelayError"
          },
          "502": {
            "$ref": "#/components/responses/RelayError"
          },
          "503": {
            "$ref": "#/components/responses/RelayError"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetCellStatusRequest"
              },
              "example": {
                "status": "PAUSED"
              }
            }
          }
        },
        "tags": [
          "Commands"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": " Motion-owned failures use ApiError and X-Robotic-Picking-Request-Id. Codes are extensible; handle unknown codes by HTTP status. Downstream responses remain unchanged; ApiError is not a supplier fault or a pick result.",
        "parameters": [
          {
            "name": "Ras-Api-Version",
            "in": "header",
            "required": false,
            "description": "API version. Omit to use the oldest supported version; currently 1.",
            "schema": {
              "type": "string"
            },
            "example": "1"
          }
        ]
      }
    },
    "/api/status": {
      "get": {
        "operationId": "getStatus",
        "summary": "Ask the station's status",
        "responses": {
          "200": {
            "description": "Current status. OPERATIONAL always carries an empty error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CellStatus"
                },
                "example": {
                  "status": "OPERATIONAL",
                  "error": {
                    "code": "",
                    "message": ""
                  }
                }
              }
            },
            "headers": {
              "X-Robotic-Picking-Request-Id": {
                "$ref": "#/components/headers/WcsRequestId"
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/RelayError"
          },
          "401": {
            "$ref": "#/components/responses/RelayError"
          },
          "403": {
            "$ref": "#/components/responses/RelayError"
          },
          "405": {
            "$ref": "#/components/responses/RelayError"
          },
          "406": {
            "$ref": "#/components/responses/RelayError"
          },
          "415": {
            "$ref": "#/components/responses/RelayError"
          },
          "500": {
            "$ref": "#/components/responses/RelayError"
          },
          "502": {
            "$ref": "#/components/responses/RelayError"
          },
          "503": {
            "$ref": "#/components/responses/RelayError"
          }
        },
        "tags": [
          "Commands"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "description": " Motion-owned failures use ApiError and X-Robotic-Picking-Request-Id. Codes are extensible; handle unknown codes by HTTP status. Downstream responses remain unchanged; ApiError is not a supplier fault or a pick result.",
        "parameters": [
          {
            "name": "Ras-Api-Version",
            "in": "header",
            "required": false,
            "description": "API version. Omit to use the oldest supported version; currently 1.",
            "schema": {
              "type": "string"
            },
            "example": "1"
          }
        ]
      }
    },
    "/api/task/{taskId}": {
      "put": {
        "operationId": "submitTask",
        "summary": "Submit a multi-source task",
        "x-runtime-status": "opt-in-task-execution",
        "parameters": [
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 128
            },
            "example": "TASK-200"
          },
          {
            "name": "Ras-Site",
            "in": "header",
            "required": true,
            "description": "Supply exactly one nonempty value authorized for this integration.",
            "schema": {
              "type": "string"
            },
            "example": "WAREHOUSE-01"
          },
          {
            "name": "Ras-Station",
            "in": "header",
            "required": true,
            "description": "Supply exactly one nonempty value authorized for this integration.",
            "schema": {
              "type": "string"
            },
            "example": "ARM-01"
          },
          {
            "name": "Ras-Api-Version",
            "in": "header",
            "required": false,
            "description": "API version. Omit to use the oldest supported version; currently 1.",
            "schema": {
              "type": "string"
            },
            "example": "1"
          }
        ],
        "responses": {
          "201": {
            "description": "New task durably accepted; robot execution is not confirmed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskView"
                },
                "example": {
                  "taskId": "TASK-200",
                  "state": "ACCEPTED",
                  "operation": [
                    {
                      "operationId": "OP-1",
                      "state": "PLANNED"
                    },
                    {
                      "operationId": "OP-2",
                      "state": "PLANNED"
                    }
                  ]
                }
              }
            },
            "headers": {
              "X-Robotic-Picking-Request-Id": {
                "$ref": "#/components/headers/WcsRequestId"
              }
            }
          },
          "200": {
            "description": "The same task intent already exists; return current progress.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskView"
                },
                "example": {
                  "taskId": "TASK-200",
                  "state": "ACCEPTED",
                  "operation": [
                    {
                      "operationId": "OP-1",
                      "state": "PLANNED"
                    },
                    {
                      "operationId": "OP-2",
                      "state": "PLANNED"
                    }
                  ]
                }
              }
            },
            "headers": {
              "X-Robotic-Picking-Request-Id": {
                "$ref": "#/components/headers/WcsRequestId"
              }
            }
          },
          "409": {
            "$ref": "#/components/responses/Motion409",
            "description": "Changed task/message intent, occupied port conflict, or another unresolved task at this station."
          },
          "400": {
            "$ref": "#/components/responses/Motion400",
            "description": "Invalid body, missing/repeated context header, or invalid source-selection configuration."
          },
          "401": {
            "$ref": "#/components/responses/Motion401",
            "description": "Missing or invalid bearer token."
          },
          "403": {
            "$ref": "#/components/responses/Motion403",
            "description": "The authenticated integration is not authorized for this site and station."
          },
          "501": {
            "$ref": "#/components/responses/Motion501",
            "description": "Task coordination is disabled in this deployment."
          },
          "405": {
            "$ref": "#/components/responses/Motion405"
          },
          "406": {
            "$ref": "#/components/responses/Motion406"
          },
          "500": {
            "$ref": "#/components/responses/Motion500"
          },
          "415": {
            "$ref": "#/components/responses/Motion415"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskSubmissionMessage"
              },
              "example": {
                "metadata": {
                  "messageId": "WCS-MSG-TASK-200",
                  "createdAt": "2026-10-21T09:00:00.000Z"
                },
                "data": {
                  "orderRef": "ORDER-900",
                  "sourceSelectionStrategy": "READINESS",
                  "target": {
                    "portId": "TARGET-1",
                    "binId": "900",
                    "state": "READY"
                  },
                  "operation": [
                    {
                      "operationId": "OP-1",
                      "productId": "SKU-42",
                      "quantity": {
                        "amount": 1,
                        "unit": "PIECE"
                      },
                      "source": {
                        "portId": "SOURCE-1",
                        "binId": "101",
                        "state": "NOT_READY"
                      }
                    },
                    {
                      "operationId": "OP-2",
                      "productId": "SKU-99",
                      "quantity": {
                        "amount": 2,
                        "unit": "PIECE"
                      },
                      "source": {
                        "portId": "SOURCE-2",
                        "binId": "202",
                        "state": "NOT_READY"
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "description": " Motion-owned failures use ApiError and X-Robotic-Picking-Request-Id. Codes are extensible; handle unknown codes by HTTP status."
      },
      "get": {
        "operationId": "getTask",
        "summary": "Read task progress",
        "x-runtime-status": "opt-in-task-execution",
        "parameters": [
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 128
            },
            "example": "TASK-200"
          },
          {
            "name": "Ras-Site",
            "in": "header",
            "required": true,
            "description": "Supply exactly one nonempty value authorized for this integration.",
            "schema": {
              "type": "string"
            },
            "example": "WAREHOUSE-01"
          },
          {
            "name": "Ras-Station",
            "in": "header",
            "required": true,
            "description": "Supply exactly one nonempty value authorized for this integration.",
            "schema": {
              "type": "string"
            },
            "example": "ARM-01"
          },
          {
            "name": "Ras-Api-Version",
            "in": "header",
            "required": false,
            "description": "API version. Omit to use the oldest supported version; currently 1.",
            "schema": {
              "type": "string"
            },
            "example": "1"
          }
        ],
        "responses": {
          "200": {
            "description": "Current locally observed task and operation state.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskView"
                },
                "example": {
                  "taskId": "TASK-200",
                  "state": "ACCEPTED",
                  "operation": [
                    {
                      "operationId": "OP-1",
                      "state": "PLANNED"
                    },
                    {
                      "operationId": "OP-2",
                      "state": "PLANNED"
                    }
                  ]
                }
              }
            },
            "headers": {
              "X-Robotic-Picking-Request-Id": {
                "$ref": "#/components/headers/WcsRequestId"
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Motion404",
            "description": "No task is recorded with this identity."
          },
          "400": {
            "$ref": "#/components/responses/Motion400",
            "description": "Invalid body, missing/repeated context header, or invalid source-selection configuration."
          },
          "401": {
            "$ref": "#/components/responses/Motion401",
            "description": "Missing or invalid bearer token."
          },
          "403": {
            "$ref": "#/components/responses/Motion403",
            "description": "The authenticated integration is not authorized for this site and station."
          },
          "501": {
            "$ref": "#/components/responses/Motion501",
            "description": "Task coordination is disabled in this deployment."
          },
          "405": {
            "$ref": "#/components/responses/Motion405"
          },
          "406": {
            "$ref": "#/components/responses/Motion406"
          },
          "500": {
            "$ref": "#/components/responses/Motion500"
          }
        },
        "description": " Motion-owned failures use ApiError and X-Robotic-Picking-Request-Id. Codes are extensible; handle unknown codes by HTTP status."
      }
    },
    "/api/bin/state": {
      "post": {
        "operationId": "reportBinState",
        "summary": "Report bin state",
        "x-runtime-status": "opt-in-task-execution",
        "parameters": [
          {
            "name": "Ras-Site",
            "in": "header",
            "required": true,
            "description": "Supply exactly one nonempty value authorized for this integration.",
            "schema": {
              "type": "string"
            },
            "example": "WAREHOUSE-01"
          },
          {
            "name": "Ras-Station",
            "in": "header",
            "required": true,
            "description": "Supply exactly one nonempty value authorized for this integration.",
            "schema": {
              "type": "string"
            },
            "example": "ARM-01"
          },
          {
            "name": "Ras-Api-Version",
            "in": "header",
            "required": false,
            "description": "API version. Omit to use the oldest supported version; currently 1.",
            "schema": {
              "type": "string"
            },
            "example": "1"
          }
        ],
        "responses": {
          "200": {
            "description": "Bin observation durably accepted; repeated READY does not create a new arrival.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PortBinState"
                },
                "example": {
                  "portId": "SOURCE-1",
                  "binId": "101",
                  "state": "READY",
                  "observedAt": "2026-10-21T09:00:05Z"
                }
              }
            },
            "headers": {
              "X-Robotic-Picking-Request-Id": {
                "$ref": "#/components/headers/WcsRequestId"
              }
            }
          },
          "409": {
            "$ref": "#/components/responses/Motion409",
            "description": "Conflicting logical message or a different bin currently occupies the port."
          },
          "400": {
            "$ref": "#/components/responses/Motion400",
            "description": "Invalid body, missing/repeated context header, or invalid source-selection configuration."
          },
          "401": {
            "$ref": "#/components/responses/Motion401",
            "description": "Missing or invalid bearer token."
          },
          "403": {
            "$ref": "#/components/responses/Motion403",
            "description": "The authenticated integration is not authorized for this site and station."
          },
          "501": {
            "$ref": "#/components/responses/Motion501",
            "description": "Task coordination is disabled in this deployment."
          },
          "405": {
            "$ref": "#/components/responses/Motion405"
          },
          "406": {
            "$ref": "#/components/responses/Motion406"
          },
          "500": {
            "$ref": "#/components/responses/Motion500"
          },
          "415": {
            "$ref": "#/components/responses/Motion415"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BinStateMessage"
              },
              "example": {
                "metadata": {
                  "messageId": "WCS-BIN-101-READY",
                  "createdAt": "2026-10-21T09:00:05Z"
                },
                "data": {
                  "portId": "SOURCE-1",
                  "binId": "101",
                  "state": "READY"
                }
              }
            }
          }
        },
        "description": " Motion-owned failures use ApiError and X-Robotic-Picking-Request-Id. Codes are extensible; handle unknown codes by HTTP status."
      },
      "get": {
        "operationId": "getBinState",
        "summary": "Read port occupancy",
        "x-runtime-status": "opt-in-task-execution",
        "parameters": [
          {
            "name": "Ras-Site",
            "in": "header",
            "required": true,
            "description": "Supply exactly one nonempty value authorized for this integration.",
            "schema": {
              "type": "string"
            },
            "example": "WAREHOUSE-01"
          },
          {
            "name": "Ras-Station",
            "in": "header",
            "required": true,
            "description": "Supply exactly one nonempty value authorized for this integration.",
            "schema": {
              "type": "string"
            },
            "example": "ARM-01"
          },
          {
            "name": "portId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "SOURCE-1"
          },
          {
            "name": "Ras-Api-Version",
            "in": "header",
            "required": false,
            "description": "API version. Omit to use the oldest supported version; currently 1.",
            "schema": {
              "type": "string"
            },
            "example": "1"
          }
        ],
        "responses": {
          "200": {
            "description": "Latest accepted local observation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PortBinState"
                },
                "example": {
                  "portId": "SOURCE-1",
                  "binId": "101",
                  "state": "READY",
                  "observedAt": "2026-10-21T09:00:05Z"
                }
              }
            },
            "headers": {
              "X-Robotic-Picking-Request-Id": {
                "$ref": "#/components/headers/WcsRequestId"
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Motion404",
            "description": "No observation has been recorded for this port."
          },
          "400": {
            "$ref": "#/components/responses/Motion400",
            "description": "Invalid body, missing/repeated context header, or invalid source-selection configuration."
          },
          "401": {
            "$ref": "#/components/responses/Motion401",
            "description": "Missing or invalid bearer token."
          },
          "403": {
            "$ref": "#/components/responses/Motion403",
            "description": "The authenticated integration is not authorized for this site and station."
          },
          "501": {
            "$ref": "#/components/responses/Motion501",
            "description": "Task coordination is disabled in this deployment."
          },
          "405": {
            "$ref": "#/components/responses/Motion405"
          },
          "406": {
            "$ref": "#/components/responses/Motion406"
          },
          "500": {
            "$ref": "#/components/responses/Motion500"
          }
        },
        "description": " Motion-owned failures use ApiError and X-Robotic-Picking-Request-Id. Codes are extensible; handle unknown codes by HTTP status."
      }
    },
    "/api/task/{taskId}/cancel": {
      "post": {
        "operationId": "cancelTask",
        "summary": "Request task cancellation",
        "x-runtime-status": "opt-in-task-execution",
        "description": "Stops further operations. Unsubmitted work cancels immediately. Active work receives at most one supplier cancel request and remains unresolved until a terminal station result arrives. Bin readiness continues for the active job. Cancellation is not an emergency stop. Motion-owned failures use ApiError and X-Robotic-Picking-Request-Id. Codes are extensible; handle unknown codes by HTTP status.",
        "parameters": [
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 128
            },
            "example": "TASK-200"
          },
          {
            "name": "Ras-Site",
            "in": "header",
            "required": true,
            "description": "Supply exactly one nonempty value authorized for this integration.",
            "schema": {
              "type": "string"
            },
            "example": "WAREHOUSE-01"
          },
          {
            "name": "Ras-Station",
            "in": "header",
            "required": true,
            "description": "Supply exactly one nonempty value authorized for this integration.",
            "schema": {
              "type": "string"
            },
            "example": "ARM-01"
          },
          {
            "name": "Ras-Api-Version",
            "in": "header",
            "required": false,
            "description": "API version. Omit to use the oldest supported version; currently 1.",
            "schema": {
              "type": "string"
            },
            "example": "1"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskCancellationMessage"
              },
              "example": {
                "metadata": {
                  "messageId": "WCS-CANCEL-TASK-200",
                  "createdAt": "2026-10-22T12:00:00.000Z"
                },
                "data": {
                  "reason": "Order withdrawn"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Work is already terminal or cancelled before submission. Confirm the returned state and retain actual result quantities.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskView"
                }
              }
            },
            "headers": {
              "X-Robotic-Picking-Request-Id": {
                "$ref": "#/components/headers/WcsRequestId"
              }
            }
          },
          "202": {
            "description": "Cancellation is pending. The active operation may finish; this does not confirm a physical stop.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskView"
                }
              }
            },
            "headers": {
              "X-Robotic-Picking-Request-Id": {
                "$ref": "#/components/headers/WcsRequestId"
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Motion400",
            "description": "Invalid body, missing/repeated context header, or invalid source-selection configuration."
          },
          "401": {
            "$ref": "#/components/responses/Motion401",
            "description": "Missing or invalid bearer token."
          },
          "403": {
            "$ref": "#/components/responses/Motion403",
            "description": "The authenticated integration is not authorized for this site and station."
          },
          "409": {
            "$ref": "#/components/responses/Motion409",
            "description": "Changed task/message intent, occupied port conflict, or another unresolved task at this station."
          },
          "501": {
            "$ref": "#/components/responses/Motion501",
            "description": "Task coordination is disabled in this deployment."
          },
          "404": {
            "$ref": "#/components/responses/Motion404",
            "description": "The task is unknown in this station context."
          },
          "405": {
            "$ref": "#/components/responses/Motion405"
          },
          "406": {
            "$ref": "#/components/responses/Motion406"
          },
          "500": {
            "$ref": "#/components/responses/Motion500"
          },
          "415": {
            "$ref": "#/components/responses/Motion415"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Acknowledgement": {
        "type": "object",
        "properties": {
          "data": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "AddProductRequest": {
        "type": "object",
        "properties": {
          "articleId": {
            "type": "string"
          },
          "articleName": {
            "type": "string"
          },
          "weightGrams": {
            "type": "number"
          }
        },
        "required": [
          "articleId",
          "articleName",
          "weightGrams"
        ]
      },
      "DeleteProductRequest": {
        "type": "object",
        "properties": {
          "articleId": {
            "type": "string"
          }
        },
        "required": [
          "articleId"
        ]
      },
      "SetCellStatusRequest": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "OPERATIONAL",
              "PAUSED"
            ]
          }
        },
        "required": [
          "status"
        ]
      },
      "CellError": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "enum": [
              "",
              "SOURCE_BIN_EMPTY",
              "INSUFFICIENT_ITEMS_IN_SOURCE_LOCATION",
              "ITEM_NOT_PICKABLE",
              "PICK_FAILED",
              "INCOMPATIBLE_ITEM",
              "UNKNOWN_AREA",
              "PLACE_FAILURE",
              "TARGET_BIN_FULL",
              "OBJECT_NOT_FITTING",
              "ITEM_STICKING_OUT_BIN",
              "GHOST_PICK",
              "DOUBLE_PICK",
              "ITEM_DROPPED_SAFE",
              "ITEM_DROPPED_UNSAFE",
              "ITEM_DROPPED_RECOVERABLE",
              "BARCODE_SCAN_FAILURE",
              "BARCODE_NOT_COMPARED",
              "BARCODE_NOT_MATCHED",
              "INTERNAL_ERROR",
              "DOOR_OPEN",
              "EMERGENCY_STOP",
              "CAPTO_UNAVAILABLE",
              "ROBOT_FAILURE",
              "CAMERA_FAILURE",
              "LOW_AIR_PRESSURE",
              "GRIPPER_FAILURE",
              "ENGINE_RESTART",
              "MAX_RETRIES_REACHED",
              "STOP_REQUESTED",
              "REQUEST_CANCELLED"
            ]
          },
          "message": {
            "type": "string"
          }
        }
      },
      "CellStatus": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "OPERATIONAL",
              "FAULT",
              "PAUSED",
              "STOPPED",
              "EMERGENCY",
              "DOOR_OPEN",
              "VISUAL_CONFIRMATION",
              "HUMAN_INTERVENTION",
              "MAINTENANCE"
            ]
          },
          "error": {
            "$ref": "#/components/schemas/CellError"
          }
        },
        "required": [
          "status"
        ]
      },
      "MessageMetadata": {
        "type": "object",
        "required": [
          "messageId",
          "createdAt"
        ],
        "properties": {
          "messageId": {
            "type": "string",
            "description": "Stable logical-message identity. Preserve it and the complete payload across delivery retries."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "UTC time when the sender first created this message; preserved across retries."
          }
        }
      },
      "TaskSubmission": {
        "type": "object",
        "required": [
          "orderRef",
          "sourceSelectionStrategy",
          "target",
          "operation"
        ],
        "properties": {
          "orderRef": {
            "type": "string"
          },
          "sourceSelectionStrategy": {
            "$ref": "#/components/schemas/SourceSelectionStrategy"
          },
          "target": {
            "$ref": "#/components/schemas/TaskBin"
          },
          "operation": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaskOperation"
            },
            "minItems": 1
          }
        },
        "description": "Required contributions into one target. Array order does not control execution; each operation contributes its own quantity.",
        "example": {
          "orderRef": "ORDER-900",
          "sourceSelectionStrategy": "READINESS",
          "target": {
            "portId": "TARGET-1",
            "binId": "900",
            "state": "READY"
          },
          "operation": [
            {
              "operationId": "OP-1",
              "productId": "SKU-42",
              "quantity": {
                "amount": 1,
                "unit": "PIECE"
              },
              "source": {
                "portId": "SOURCE-1",
                "binId": "101",
                "state": "NOT_READY"
              }
            },
            {
              "operationId": "OP-2",
              "productId": "SKU-99",
              "quantity": {
                "amount": 2,
                "unit": "PIECE"
              },
              "source": {
                "portId": "SOURCE-2",
                "binId": "202",
                "state": "NOT_READY"
              }
            }
          ]
        }
      },
      "TaskOperation": {
        "type": "object",
        "required": [
          "operationId",
          "productId",
          "quantity",
          "source"
        ],
        "properties": {
          "operationId": {
            "type": "string"
          },
          "productId": {
            "type": "string"
          },
          "quantity": {
            "$ref": "#/components/schemas/TaskQuantity"
          },
          "source": {
            "$ref": "#/components/schemas/TaskBin"
          },
          "priority": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ],
            "description": "Required and unique for PRIORITY. Lower values are prepared first; omitted for READINESS."
          },
          "skuId": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 128,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "description": "SKU identifier for reporting when known; independent of the supplier product ID."
          }
        },
        "example": {
          "operationId": "OP-1",
          "productId": "SKU-42",
          "quantity": {
            "amount": 1,
            "unit": "PIECE"
          },
          "source": {
            "portId": "SOURCE-1",
            "binId": "101",
            "state": "NOT_READY"
          }
        }
      },
      "TaskQuantity": {
        "type": "object",
        "required": [
          "amount",
          "unit"
        ],
        "properties": {
          "amount": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "unit": {
            "type": "string",
            "enum": [
              "PIECE"
            ],
            "description": "Initial task execution supports PIECE quantities."
          }
        },
        "example": {
          "amount": 1,
          "unit": "PIECE"
        }
      },
      "TaskView": {
        "type": "object",
        "required": [
          "taskId",
          "state",
          "operation"
        ],
        "properties": {
          "taskId": {
            "type": "string"
          },
          "state": {
            "$ref": "#/components/schemas/TaskState"
          },
          "operation": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaskOperationResult"
            }
          },
          "activeOperationId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "cancellationRequested": {
            "type": "boolean",
            "default": false,
            "description": "Cancellation was requested; active work may still finish."
          },
          "reasonCode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Reason that execution stopped or requires reconciliation."
          },
          "executionFinished": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "New responses/events report whether Motion will prepare further physical work for this task. True frees execution but accounting can still require review. Absent in older payloads means unknown."
          }
        }
      },
      "TaskOperationResult": {
        "type": "object",
        "required": [
          "operationId",
          "state"
        ],
        "properties": {
          "operationId": {
            "type": "string"
          },
          "state": {
            "$ref": "#/components/schemas/OperationState"
          },
          "result": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OperationResult"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "OperationResult": {
        "type": "object",
        "required": [
          "outcome",
          "requested",
          "unit"
        ],
        "properties": {
          "outcome": {
            "$ref": "#/components/schemas/OperationOutcome"
          },
          "requested": {
            "type": "number"
          },
          "unit": {
            "type": "string"
          },
          "picked": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "placed": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "dropped": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "errorCode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "errorDescription": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "sourceBin": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SourceBinObservation"
              },
              {
                "type": "null"
              }
            ]
          },
          "targetBin": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TargetBinObservation"
              },
              {
                "type": "null"
              }
            ]
          },
          "validationIssues": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResultValidationIssue"
            },
            "description": "Omitted when empty. A counting warning can accompany success; invalid execution quantities produce UNKNOWN with INVALID_ARM_RESULT."
          }
        },
        "description": "Observed quantities are optional. An omitted quantity is unknown; an observed zero is zero."
      },
      "TaskStateChanged": {
        "type": "object",
        "required": [
          "type",
          "taskId",
          "state",
          "operation"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "TASK_STATE_CHANGED"
            ]
          },
          "taskId": {
            "type": "string"
          },
          "state": {
            "$ref": "#/components/schemas/TaskState"
          },
          "operation": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TaskOperationResult"
            }
          },
          "cancellationRequested": {
            "type": "boolean",
            "default": false,
            "description": "Cancellation was requested; active work may still finish."
          },
          "reasonCode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Reason that execution stopped or requires reconciliation."
          },
          "executionFinished": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "New responses/events report whether Motion will prepare further physical work for this task. True frees execution but accounting can still require review. Absent in older payloads means unknown."
          }
        }
      },
      "OperationStateChanged": {
        "type": "object",
        "required": [
          "type",
          "taskId",
          "operationId",
          "state"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "OPERATION_STATE_CHANGED"
            ]
          },
          "taskId": {
            "type": "string"
          },
          "operationId": {
            "type": "string"
          },
          "state": {
            "$ref": "#/components/schemas/OperationState"
          },
          "result": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/OperationResult"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "StationStateChanged": {
        "type": "object",
        "required": [
          "type",
          "state",
          "observedAt"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "STATION_STATE_CHANGED"
            ]
          },
          "state": {
            "type": "string"
          },
          "observedAt": {
            "type": "string",
            "format": "date-time"
          },
          "reasonCode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "sequence": {
            "anyOf": [
              {
                "type": "integer",
                "format": "int64"
              },
              {
                "type": "null"
              }
            ],
            "description": "Local receipt sequence, not a supplier generation sequence. Absent in older messages."
          }
        }
      },
      "TaskBin": {
        "type": "object",
        "required": [
          "portId",
          "binId",
          "state"
        ],
        "properties": {
          "portId": {
            "type": "string"
          },
          "binId": {
            "type": "string"
          },
          "state": {
            "$ref": "#/components/schemas/BinReadiness",
            "description": "READY can establish an already-present bin, including a target reused across tasks. NOT_READY does not clear port occupancy."
          }
        },
        "example": {
          "portId": "TARGET-1",
          "binId": "900",
          "state": "READY"
        }
      },
      "BinStateReport": {
        "type": "object",
        "required": [
          "portId",
          "binId",
          "state"
        ],
        "properties": {
          "portId": {
            "type": "string"
          },
          "binId": {
            "type": "string"
          },
          "state": {
            "$ref": "#/components/schemas/BinState",
            "description": "READY identifies the current bin. ABSENT identifies the bin that left; binId remains required."
          }
        }
      },
      "PortBinState": {
        "type": "object",
        "required": [
          "portId",
          "binId",
          "state",
          "observedAt"
        ],
        "properties": {
          "portId": {
            "type": "string"
          },
          "binId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "state": {
            "$ref": "#/components/schemas/BinState"
          },
          "observedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "BinReleased": {
        "type": "object",
        "required": [
          "type",
          "taskId",
          "operationId",
          "role",
          "portId",
          "binId"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "BIN_RELEASED"
            ]
          },
          "taskId": {
            "type": "string"
          },
          "operationId": {
            "type": "string"
          },
          "role": {
            "$ref": "#/components/schemas/BinRole"
          },
          "portId": {
            "type": "string"
          },
          "binId": {
            "type": "string"
          }
        }
      },
      "TaskState": {
        "type": "string",
        "enum": [
          "ACCEPTED",
          "IN_PROGRESS",
          "RECONCILIATION_REQUIRED",
          "COMPLETED",
          "CANCELLATION_REQUESTED",
          "CANCELLED",
          "FAILED"
        ]
      },
      "OperationState": {
        "type": "string",
        "enum": [
          "PLANNED",
          "SUBMISSION_PENDING",
          "SUBMISSION_UNKNOWN",
          "WAITING_FOR_SOURCE",
          "WAITING_FOR_TARGET",
          "COMPLETED",
          "REJECTED",
          "NOT_EXECUTED",
          "CANCELLATION_REQUESTED",
          "IN_PROGRESS"
        ]
      },
      "OperationOutcome": {
        "type": "string",
        "enum": [
          "SUCCESS",
          "PARTIAL",
          "FAILED",
          "UNKNOWN"
        ]
      },
      "SourceSelectionStrategy": {
        "type": "string",
        "enum": [
          "READINESS",
          "PRIORITY"
        ]
      },
      "BinReadiness": {
        "type": "string",
        "enum": [
          "NOT_READY",
          "READY"
        ]
      },
      "BinState": {
        "type": "string",
        "enum": [
          "ABSENT",
          "READY"
        ]
      },
      "BinRole": {
        "type": "string",
        "enum": [
          "SOURCE"
        ]
      },
      "WcsNotification": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/TaskStateChanged"
          },
          {
            "$ref": "#/components/schemas/OperationStateChanged"
          },
          {
            "$ref": "#/components/schemas/BinReleased"
          },
          {
            "$ref": "#/components/schemas/StationStateChanged"
          }
        ],
        "discriminator": {
          "propertyName": "type",
          "mapping": {
            "TASK_STATE_CHANGED": "#/components/schemas/TaskStateChanged",
            "OPERATION_STATE_CHANGED": "#/components/schemas/OperationStateChanged",
            "BIN_RELEASED": "#/components/schemas/BinReleased",
            "STATION_STATE_CHANGED": "#/components/schemas/StationStateChanged"
          }
        }
      },
      "TaskSubmissionMessage": {
        "type": "object",
        "required": [
          "metadata",
          "data"
        ],
        "properties": {
          "metadata": {
            "$ref": "#/components/schemas/MessageMetadata"
          },
          "data": {
            "$ref": "#/components/schemas/TaskSubmission"
          }
        },
        "example": {
          "metadata": {
            "messageId": "WCS-MSG-TASK-200",
            "createdAt": "2026-10-21T09:00:00.000Z"
          },
          "data": {
            "orderRef": "ORDER-900",
            "sourceSelectionStrategy": "READINESS",
            "target": {
              "portId": "TARGET-1",
              "binId": "900",
              "state": "READY"
            },
            "operation": [
              {
                "operationId": "OP-1",
                "productId": "SKU-42",
                "quantity": {
                  "amount": 1,
                  "unit": "PIECE"
                },
                "source": {
                  "portId": "SOURCE-1",
                  "binId": "101",
                  "state": "NOT_READY"
                }
              },
              {
                "operationId": "OP-2",
                "productId": "SKU-99",
                "quantity": {
                  "amount": 2,
                  "unit": "PIECE"
                },
                "source": {
                  "portId": "SOURCE-2",
                  "binId": "202",
                  "state": "NOT_READY"
                }
              }
            ]
          }
        }
      },
      "BinStateMessage": {
        "type": "object",
        "required": [
          "metadata",
          "data"
        ],
        "properties": {
          "metadata": {
            "$ref": "#/components/schemas/MessageMetadata"
          },
          "data": {
            "$ref": "#/components/schemas/BinStateReport"
          }
        }
      },
      "WcsNotificationMessage": {
        "type": "object",
        "required": [
          "metadata",
          "data"
        ],
        "properties": {
          "metadata": {
            "$ref": "#/components/schemas/MessageMetadata"
          },
          "data": {
            "$ref": "#/components/schemas/WcsNotification"
          }
        }
      },
      "TaskCancellation": {
        "type": "object",
        "properties": {
          "reason": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 1000
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": []
      },
      "TaskCancellationMessage": {
        "type": "object",
        "required": [
          "metadata",
          "data"
        ],
        "properties": {
          "metadata": {
            "$ref": "#/components/schemas/MessageMetadata"
          },
          "data": {
            "$ref": "#/components/schemas/TaskCancellation"
          }
        },
        "example": {
          "metadata": {
            "messageId": "WCS-CANCEL-TASK-200",
            "createdAt": "2026-10-22T12:00:00.000Z"
          },
          "data": {
            "reason": "Order withdrawn"
          }
        }
      },
      "SourceBinObservation": {
        "type": "object",
        "description": "Validated source-bin observations after an operation. Missing or invalid quantities are unknown; these do not grant movement permission.",
        "required": [],
        "properties": {
          "empty": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether the station reported the source empty. False is an observed value."
          },
          "quantityRemaining": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "description": "Nonnegative remaining quantity in the operation unit. Negative reports, including -1, are omitted and audited; your WCS owns inventory reconciliation."
          }
        }
      },
      "TargetBinObservation": {
        "type": "object",
        "description": "Target-bin observation reported after the operation. Fullness does not grant movement permission.",
        "required": [],
        "properties": {
          "full": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether the station reported the target full. False is an observed value."
          }
        }
      },
      "ResultValidationCode": {
        "type": "string",
        "enum": [
          "NEGATIVE_EXECUTION_QUANTITY",
          "PLACED_EXCEEDS_REQUESTED",
          "ACCOUNTED_EXCEEDS_PICKED",
          "NEGATIVE_SOURCE_REMAINING"
        ],
        "description": "NEGATIVE_SOURCE_REMAINING is a counting warning only. Other codes invalidate the execution quantities and require reconciliation."
      },
      "ResultValidationIssue": {
        "type": "object",
        "required": [
          "code",
          "fields"
        ],
        "properties": {
          "code": {
            "$ref": "#/components/schemas/ResultValidationCode"
          },
          "fields": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Affected fields in the operation result."
          }
        },
        "description": "A reported quantity was excluded from trusted results. The original station report remains available for investigation."
      },
      "ApiError": {
        "type": "object",
        "required": [
          "code",
          "message",
          "requestId"
        ],
        "properties": {
          "code": {
            "type": "string",
            "description": "Stable machine-readable code. Handle unfamiliar codes using the HTTP status.",
            "example": "STATION_BUSY"
          },
          "message": {
            "type": "string",
            "description": "Human-readable explanation. Use code for decisions."
          },
          "requestId": {
            "type": "string",
            "format": "uuid",
            "description": "Server-generated reference also returned in X-Robotic-Picking-Request-Id."
          },
          "fieldErrors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiFieldError"
            },
            "description": "Optional validation details. Omitted when empty. Rejected values are not returned."
          }
        }
      },
      "ApiFieldError": {
        "type": "object",
        "required": [
          "field",
          "code",
          "message"
        ],
        "properties": {
          "field": {
            "type": "string",
            "description": "Declared field location prefixed by body, headers, path or query.",
            "example": "body.data.operation[0].quantity.amount"
          },
          "code": {
            "type": "string",
            "description": "Stable validation code; handle unfamiliar values as an invalid field.",
            "example": "INVALID_VALUE"
          },
          "message": {
            "type": "string",
            "description": "Expected value or rule, without rejected values."
          }
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Rologi relay requirement; not specified by partner."
      }
    },
    "responses": {
      "Motion400": {
        "description": "The request could not be read. Check its JSON, headers and parameters.",
        "headers": {
          "X-Robotic-Picking-Request-Id": {
            "$ref": "#/components/headers/WcsRequestId"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            },
            "example": {
              "code": "INVALID_REQUEST",
              "message": "The request could not be read. Check its JSON, headers and parameters.",
              "requestId": "d7e06224-9b66-4dd1-8cbd-c7bda083448e"
            }
          }
        }
      },
      "Motion401": {
        "description": "A valid bearer token is required.",
        "headers": {
          "X-Robotic-Picking-Request-Id": {
            "$ref": "#/components/headers/WcsRequestId"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            },
            "example": {
              "code": "UNAUTHENTICATED",
              "message": "A valid bearer token is required.",
              "requestId": "d7e06224-9b66-4dd1-8cbd-c7bda083448e"
            }
          }
        }
      },
      "Motion403": {
        "description": "The caller is not allowed to perform this operation for this station.",
        "headers": {
          "X-Robotic-Picking-Request-Id": {
            "$ref": "#/components/headers/WcsRequestId"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            },
            "example": {
              "code": "FORBIDDEN",
              "message": "The caller is not allowed to perform this operation for this station.",
              "requestId": "d7e06224-9b66-4dd1-8cbd-c7bda083448e"
            }
          }
        }
      },
      "Motion404": {
        "description": "The requested resource was not found.",
        "headers": {
          "X-Robotic-Picking-Request-Id": {
            "$ref": "#/components/headers/WcsRequestId"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            },
            "example": {
              "code": "RESOURCE_NOT_FOUND",
              "message": "The requested resource was not found.",
              "requestId": "d7e06224-9b66-4dd1-8cbd-c7bda083448e"
            }
          }
        }
      },
      "Motion405": {
        "description": "This HTTP method is not supported for the requested resource.",
        "headers": {
          "X-Robotic-Picking-Request-Id": {
            "$ref": "#/components/headers/WcsRequestId"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            },
            "example": {
              "code": "METHOD_NOT_ALLOWED",
              "message": "This HTTP method is not supported for the requested resource.",
              "requestId": "d7e06224-9b66-4dd1-8cbd-c7bda083448e"
            }
          }
        }
      },
      "Motion406": {
        "description": "Use application/json for responses.",
        "headers": {
          "X-Robotic-Picking-Request-Id": {
            "$ref": "#/components/headers/WcsRequestId"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            },
            "example": {
              "code": "NOT_ACCEPTABLE",
              "message": "Use application/json for responses.",
              "requestId": "d7e06224-9b66-4dd1-8cbd-c7bda083448e"
            }
          }
        }
      },
      "Motion409": {
        "description": "The station already has unfinished work. Inspect that task before submitting new work.",
        "headers": {
          "X-Robotic-Picking-Request-Id": {
            "$ref": "#/components/headers/WcsRequestId"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            },
            "example": {
              "code": "STATION_BUSY",
              "message": "The station already has unfinished work. Inspect that task before submitting new work.",
              "requestId": "d7e06224-9b66-4dd1-8cbd-c7bda083448e"
            }
          }
        }
      },
      "Motion415": {
        "description": "Use a supported request content type.",
        "headers": {
          "X-Robotic-Picking-Request-Id": {
            "$ref": "#/components/headers/WcsRequestId"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            },
            "example": {
              "code": "UNSUPPORTED_MEDIA_TYPE",
              "message": "Use a supported request content type.",
              "requestId": "d7e06224-9b66-4dd1-8cbd-c7bda083448e"
            }
          }
        }
      },
      "Motion500": {
        "description": "Motion could not complete the request. Use the request reference when investigating.",
        "headers": {
          "X-Robotic-Picking-Request-Id": {
            "$ref": "#/components/headers/WcsRequestId"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            },
            "example": {
              "code": "INTERNAL_ERROR",
              "message": "Motion could not complete the request. Use the request reference when investigating.",
              "requestId": "d7e06224-9b66-4dd1-8cbd-c7bda083448e"
            }
          }
        }
      },
      "Motion501": {
        "description": "Task coordination is disabled for this deployment.",
        "headers": {
          "X-Robotic-Picking-Request-Id": {
            "$ref": "#/components/headers/WcsRequestId"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            },
            "example": {
              "code": "TASK_MODE_DISABLED",
              "message": "Task coordination is disabled for this deployment.",
              "requestId": "d7e06224-9b66-4dd1-8cbd-c7bda083448e"
            }
          }
        }
      },
      "Motion502": {
        "description": "The downstream response is unknown. Reconcile submitted work before retrying.",
        "headers": {
          "X-Robotic-Picking-Request-Id": {
            "$ref": "#/components/headers/WcsRequestId"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            },
            "example": {
              "code": "DOWNSTREAM_OUTCOME_UNKNOWN",
              "message": "The downstream response is unknown. Reconcile submitted work before retrying.",
              "requestId": "d7e06224-9b66-4dd1-8cbd-c7bda083448e"
            }
          }
        }
      },
      "Motion503": {
        "description": "The required destination is not configured.",
        "headers": {
          "X-Robotic-Picking-Request-Id": {
            "$ref": "#/components/headers/WcsRequestId"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ApiError"
            },
            "example": {
              "code": "DESTINATION_NOT_CONFIGURED",
              "message": "The required destination is not configured.",
              "requestId": "d7e06224-9b66-4dd1-8cbd-c7bda083448e"
            }
          }
        }
      },
      "RelayError": {
        "description": "Motion-owned failures use ApiError. A downstream reply is forwarded unchanged and may have a different body.",
        "headers": {
          "X-Robotic-Picking-Request-Id": {
            "$ref": "#/components/headers/WcsRequestId"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/ApiError"
                },
                {
                  "description": "Unmodified downstream error; no fixed schema is declared."
                }
              ]
            }
          }
        }
      }
    },
    "headers": {
      "WcsRequestId": {
        "description": "Server-generated request reference. Supplied request values are ignored.",
        "schema": {
          "type": "string",
          "format": "uuid"
        }
      }
    }
  },
  "x-motion-error-codes": {
    "INVALID_REQUEST": {
      "defaultHttpStatus": 400,
      "message": "The request could not be read. Check its JSON, headers and parameters."
    },
    "VALIDATION_FAILED": {
      "defaultHttpStatus": 400,
      "message": "The request does not satisfy the documented field rules."
    },
    "UNAUTHENTICATED": {
      "defaultHttpStatus": 401,
      "message": "A valid bearer token is required."
    },
    "FORBIDDEN": {
      "defaultHttpStatus": 403,
      "message": "The caller is not allowed to perform this operation for this station."
    },
    "RESOURCE_NOT_FOUND": {
      "defaultHttpStatus": 404,
      "message": "The requested resource was not found."
    },
    "TASK_NOT_FOUND": {
      "defaultHttpStatus": 404,
      "message": "The task was not found."
    },
    "BIN_STATE_NOT_FOUND": {
      "defaultHttpStatus": 404,
      "message": "No bin observation is recorded for this port."
    },
    "METHOD_NOT_ALLOWED": {
      "defaultHttpStatus": 405,
      "message": "This HTTP method is not supported for the requested resource."
    },
    "NOT_ACCEPTABLE": {
      "defaultHttpStatus": 406,
      "message": "Use application/json for responses."
    },
    "CONFLICT": {
      "defaultHttpStatus": 409,
      "message": "The request conflicts with current state."
    },
    "TASK_CONFLICT": {
      "defaultHttpStatus": 409,
      "message": "This task ID already identifies a different task plan."
    },
    "STATION_BUSY": {
      "defaultHttpStatus": 409,
      "message": "The station already has unfinished work. Inspect that task before submitting new work."
    },
    "MESSAGE_CONFLICT": {
      "defaultHttpStatus": 409,
      "message": "This message ID was already used for different content or an operation."
    },
    "PORT_OCCUPIED": {
      "defaultHttpStatus": 409,
      "message": "A different bin is already reported ready at this port."
    },
    "OCCUPANT_CONFLICT": {
      "defaultHttpStatus": 409,
      "message": "The bin report does not match the port's recorded occupant."
    },
    "TASK_API_REQUIRED": {
      "defaultHttpStatus": 409,
      "message": "Use the task API while task coordination is enabled."
    },
    "RECONCILIATION_REVISION_CHANGED": {
      "defaultHttpStatus": 409,
      "message": "Evidence changed. Inspect the latest reconciliation view before making a decision."
    },
    "EXECUTION_ALREADY_FINISHED": {
      "defaultHttpStatus": 409,
      "message": "Execution is already finished. Inspect the recorded result or closure decision."
    },
    "COMMAND_PENDING": {
      "defaultHttpStatus": 409,
      "message": "A command is still reserved. Its outcome must be established before closing execution."
    },
    "TASK_NOT_RECONCILING": {
      "defaultHttpStatus": 409,
      "message": "This task is not awaiting reconciliation."
    },
    "UNSUPPORTED_MEDIA_TYPE": {
      "defaultHttpStatus": 415,
      "message": "Use a supported request content type."
    },
    "INTERNAL_ERROR": {
      "defaultHttpStatus": 500,
      "message": "Motion could not complete the request. Use the request reference when investigating."
    },
    "REQUEST_FAILED": {
      "defaultHttpStatus": 500,
      "message": "The request could not be completed. Inspect the HTTP status and request reference."
    },
    "TASK_MODE_DISABLED": {
      "defaultHttpStatus": 501,
      "message": "Task coordination is disabled for this deployment."
    },
    "DOWNSTREAM_OUTCOME_UNKNOWN": {
      "defaultHttpStatus": 502,
      "message": "The downstream response is unknown. Reconcile submitted work before retrying."
    },
    "DESTINATION_NOT_CONFIGURED": {
      "defaultHttpStatus": 503,
      "message": "The required destination is not configured."
    }
  }
}
