TRUSTED FACTORYFLOW
Quickstart. One task, one execution, one mission.
Follow DEMO data from task creation through callback and WMS confirmation with explicit lifecycle prerequisites.
Before making API calls
Use a registered client, valid scopes/sites and checked SKU/UOM/location data. Share correlation across the journey, but use a distinct idempotency key for each write intent. Never paste tokens into this website.
| Header | Meaning |
|---|---|
| X-Correlation-Id | 00000000-0000-4000-8000-000000000001 |
| X-Tenant-Id / X-Site-Id | DEMO-TENANT / DEMO-SITE |
| X-Idempotency-Key | DEMO-create-task, DEMO-create-execution…; retries retain the original intent key and body. |
01 / POST /wms/v1/tasks
Create a task at CREATED/version 1. WMS validates, reserves and releases it under domain workflow; the next execution request assumes task version 2.
Request body
{
"taskType": "TRANSFER",
"siteId": "DEMO-SITE",
"warehouseId": "DEMO-WH",
"sourceLocationId": "DEMO-A",
"targetLocationId": "DEMO-B",
"lines": [
{
"skuId": "DEMO-SKU",
"quantity": 1,
"uom": "EA"
}
],
"executionMode": "AMR"
}
Illustrative response
{
"id": "DEMO-TASK",
"status": "CREATED",
"version": 1
}
POST /wms/v1/tasks
02 / POST /wcs/v1/execution-orders
Bind DEMO-TASK; response is DEMO-EXE/CREATED/version 1. Domain planning advances it to PLANNED/version 2 before dispatch.
Request body
{
"taskId": "DEMO-TASK",
"expectedTaskVersion": 2,
"routeRef": "DEMO-ROUTE"
}
Illustrative response
{
"id": "DEMO-EXE",
"taskId": "DEMO-TASK",
"status": "CREATED",
"version": 1
}
POST /wcs/v1/execution-orders
03 / POST /wcs/v1/execution-orders/{orderId}/dispatch
Submit expectedVersion 2; HTTP 202 returns DISPATCHING/version 3. This accepts dispatch, not completed delivery.
Request body
{
"expectedVersion": 2,
"executorRef": "DEMO-EXECUTOR",
"policyRef": "DEMO-POLICY"
}
Illustrative response
{
"id": "DEMO-EXE",
"taskId": "DEMO-TASK",
"status": "DISPATCHING",
"version": 3
}
POST /wcs/v1/execution-orders/{orderId}/dispatch
04 / POST /fleet/v1/missions
Executor/adapter step: create DEMO-MISSION for DEMO-EXE only if none exists. ERP clients and WCS must not independently create duplicate missions.
Request body
{
"executionId": "DEMO-EXE",
"pickupPoint": "DEMO-A",
"dropoffPoint": "DEMO-B",
"fleetProfile": "DEMO-FLEET"
}
Illustrative response
{
"id": "DEMO-MISSION",
"status": "CREATED"
}
POST /fleet/v1/missions
05 / POST /device-callback/v1/fleet-events
Callback reports DEMO-MISSION COMPLETED at entityVersion 9. A RECEIVED receipt only accepts the event; deduplicate and order-check before domain updates.
Request body
{
"eventId": "DEMO-EVENT",
"correlationId": "00000000-0000-4000-8000-000000000001",
"entityId": "DEMO-MISSION",
"entityVersion": 9,
"eventType": "mission.status.changed",
"occurredAt": "2026-10-26T00:00:00Z",
"schemaVersion": "1.0",
"source": "DEMO-FLEET-ADAPTER",
"payload": {
"status": "COMPLETED",
"executionId": "DEMO-EXE"
}
}
Illustrative response
{
"id": "DEMO-RECEIPT",
"status": "RECEIVED"
}
POST /device-callback/v1/fleet-events
06 / GET /fleet/v1/missions/{missionId}
Post-callback snapshot: COMPLETED. This is a later illustrative snapshot than the CREATED response at mission creation.
Illustrative response
{
"id": "DEMO-MISSION",
"status": "COMPLETED"
}
GET /fleet/v1/missions/{missionId}
07 / POST /wms/v1/tasks/{taskId}/confirm
After validating DEMO-SCAN, confirm an IN_PROGRESS/version 3 task with expectedVersion 3; the result is COMPLETED/version 4. Missing scans block confirmation.
Request body
{
"confirmationType": "SCAN",
"expectedVersion": 3,
"evidenceRef": "DEMO-SCAN"
}
Illustrative response
{
"id": "DEMO-TASK",
"status": "COMPLETED",
"version": 4
}
POST /wms/v1/tasks/{taskId}/confirm
Retry, errors and reconciliation
| Situation | Reference handling |
|---|---|
| 409 | Stale revision: reread and review changes; never merely increment expectedVersion to bypass review. |
| 422 | Invalid data or domain condition: resolve the cause, not blind retry. |
| 429 / 503 | Respect Retry-After when supplied; check idempotency and outcome before resubmitting writes. |
| UNKNOWN | Query external IDs and field state; unresolved effects remain held. The implementation contract must define key scope and TTL. |