Task

Cancel a task

POST
/api/task/{taskId}/cancel
Request task cancellation
curl --request POST \
  --url https://rologi-motion.example.com/api/task/TASK-200/cancel \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'Ras-Api-Version: 1' \
  --header 'Ras-Site: WAREHOUSE-01' \
  --header 'Ras-Station: ARM-01' \
  --data '
{
  "metadata": {
    "messageId": "WCS-CANCEL-TASK-200",
    "createdAt": "2026-10-22T12:00:00.000Z"
  },
  "data": {
    "reason": "Order withdrawn"
  }
}
'

Prevent further operations and request cancellation of the active arm job. Unsubmitted work cancels immediately. HTTP 202 means cancellation is requested and the task still needs resolution; HTTP 200 returns an already resolved task. A supplier acknowledgment does not prove a physical stop. An active pick may finish, so preserve actual quantities and continue reporting bin readiness. This is not an emergency stop.

Related guide: Picking workflow.

Authorizations

Authorization
stringheaderrequired

JWT for your integration. Rologi Motion checks the issuer, the audience and the allowlist for your direction.

Parameters

taskId
stringpathrequired
Ras-Site
stringheaderrequired

Supply exactly one nonempty value authorized for this integration.

Ras-Station
stringheaderrequired

Supply exactly one nonempty value authorized for this integration.

Ras-Api-Version
stringheader

API version. Omit to use the oldest supported version; currently 1.

Body

application/json
metadata
objectrequired

Hide child attributes

metadata.messageId
stringrequired

Stable logical-message identity. Preserve it and the complete payload across delivery retries.

metadata.createdAt
stringrequired

UTC time when the sender first created this message; preserved across retries.

data
objectrequired

Hide child attributes

data.reason
string | null

Response

application/json

Work is already terminal or cancelled before submission. Confirm the returned state and retain actual result quantities.

taskId
stringrequired
state
enum<string>required
Available options: ACCEPTED, IN_PROGRESS, RECONCILIATION_REQUIRED, COMPLETED, CANCELLATION_REQUESTED, CANCELLED, FAILED
operation
object[]required

Hide child attributes

operation.operationId
stringrequired
operation.state
enum<string>required
Available options: PLANNED, SUBMISSION_PENDING, SUBMISSION_UNKNOWN, WAITING_FOR_SOURCE, WAITING_FOR_TARGET, COMPLETED, REJECTED, NOT_EXECUTED, CANCELLATION_REQUESTED, IN_PROGRESS
operation.result
object | null

Hide child attributes

operation.result.outcome
enum<string>required
Available options: SUCCESS, PARTIAL, FAILED, UNKNOWN
operation.result.requested
numberrequired
operation.result.unit
stringrequired
operation.result.picked
number | null
operation.result.placed
number | null
operation.result.dropped
number | null
operation.result.errorCode
string | null
operation.result.errorDescription
string | null
operation.result.sourceBin
object | null

Hide child attributes

operation.result.sourceBin.empty
boolean | null

Whether the station reported the source empty. False is an observed value.

operation.result.sourceBin.quantityRemaining
number | null

Nonnegative remaining quantity in the operation unit. Negative reports, including -1, are omitted and audited; your WCS owns inventory reconciliation.

operation.result.targetBin
object | null

Hide child attributes

operation.result.targetBin.full
boolean | null

Whether the station reported the target full. False is an observed value.

operation.result.validationIssues
object[]

Omitted when empty. A counting warning can accompany success; invalid execution quantities produce UNKNOWN with INVALID_ARM_RESULT.

Hide child attributes

operation.result.validationIssues.code
enum<string>required

NEGATIVE_SOURCE_REMAINING is a counting warning only. Other codes invalidate the execution quantities and require reconciliation.

Available options: NEGATIVE_EXECUTION_QUANTITY, PLACED_EXCEEDS_REQUESTED, ACCOUNTED_EXCEEDS_PICKED, NEGATIVE_SOURCE_REMAINING
operation.result.validationIssues.fields
string[]required

Affected fields in the operation result.

activeOperationId
string | null
cancellationRequested
boolean

Cancellation was requested; active work may still finish.

reasonCode
string | null

Reason that execution stopped or requires reconciliation.

executionFinished
boolean | null

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.