Download OpenAPI specification:
Public REST surface for pushing master data, documents, and inventory into FG.AI WMS so the FG.AI planner can take over.
This is the public ingest contract for FG.AI WMS. Any upstream system — a third-party WMS, ERP, OMS, in-house legacy stack, or a FlexSync per-vendor connector — uses this contract to push master data, documents, and inventory into FG.AI WMS so that the FG.AI planner can take over.
It is the contract published by SiriusVoyager/wms and consumed
by:
SiriusVoyager/flexsync —
one connector per third-party WMS vendor: NetSuite, Manhattan,
Blue Yonder, Körber, in-house legacy, etc.)Authoritative ADRs:
wes-contract, the alternative integration topologyFull developer documentation: https://docs.flexgalaxy.ai/dev/wms/.
This is not the WMS↔WES contract. If a third-party WMS wants to
keep its own planner and have FG.AI WES execute downstream, see
wes-contract. The two contracts are mutually exclusive per
warehouse — pick one.
| Class | Endpoints | Cadence |
|---|---|---|
| Master data | /master/* |
Slow-changing. Sync at onboarding, then on every change. |
| Documents | /documents/* |
Per-event. Push as the upstream creates / updates. |
| Inventory | /inventory/* |
Snapshot at cutover; deltas during overlap; quiet after FG.AI is authoritative. |
Once FG.AI has accepted the data, FG.AI's planner runs against it: wave / waveless release, slotting, cartonization, dispatch to FG.AI WES. The upstream is no longer in the planning loop.
Every entity carries a partner-supplied source_id — the
upstream's natural key. On first acceptance FG.AI assigns a stable
internal_id and returns it. Subsequent upserts with the same
(partner_id, source_id) mutate the same FG.AI entity.
Items may carry a monotonically-increasing source_version. If
FG.AI already holds a higher version for the same
(partner_id, source_id), the incoming upsert is ignored and
reported as REPLAY. This makes out-of-order delivery safe.
Every upsert endpoint accepts a mode query parameter:
upsert (default) — steady-state. Create or update each item.bulk — onboarding-scale loads. Returns 202 Accepted
immediately with a job_id; caller polls /jobs/{job_id}.full-refresh — destructive. Items not in the payload are
tombstoned to INACTIVE. Use only for restoring known-good
state.Each item in a batch lands in one of four states:
| Status | Meaning |
|---|---|
ACCEPTED |
Normalized; internal_id returned. |
REPLAY |
Same (partner_id, source_id, source_version) already accepted. |
QUARANTINED |
Schema valid; business validation failed. Held in queue. |
REJECTED |
Item-level schema invalid. |
Quarantine is per-item, never per-batch. A batch of 1,000
SKUs with 3 bad UoM references returns 997 ACCEPTED + 3
QUARANTINED. Resolution paths are described in the developer
docs.
| Direction | Environment | Scheme |
|---|---|---|
| Caller → FG.AI WMS | Production | mTLS |
| Caller → FG.AI WMS | Dev / test | API key (Bearer) |
| FG.AI WMS → caller (webhook) | All | HMAC-SHA256 over body, X-FGAI-Signature header |
Warehouse and tenant scoping is enforced by the partner registry:
a credential for WH-Tokyo-01 cannot push into WH-Tokyo-02;
a credential for ACME-TENANT-A cannot push under
ACME-TENANT-B.
(partner_id, correlation_id) is the idempotency
key. Retries return the original cached response with no
reprocessing. 30-day retention.(partner_id, source_id) is the upsert key; combined
with source_version it makes out-of-order delivery safe.(planner_id, correlation_id).Semver. Major version is in the URL (/wms-ingest/v1/); breaking
changes introduce /wms-ingest/v2/. Minor versions add fields
(always optional); patch versions are bug-fixes or clarifications
only. Consumers pin to a specific minor (e.g.
wms-ingest-client:1.0.0) and upgrade deliberately.
Master-data upsert — UoMs, SKUs, BOMs, Locations, Addresses, Lots, Serials. Slow-changing. Sync at onboarding, then on every change.
Upsert one or more units of measure. UoMs are the dependency root of master data — register them before SKUs, BOMs, and any quantity-bearing entity.
| mode | string Default: "upsert" Enum: "upsert" "bulk" "full-refresh" Sync mode.
|
| partner_id required | string (PartnerId) ^[A-Za-z0-9._-]+-TENANT-[A-Za-z0-9._-]+$ Composite partner identifier: |
| correlation_id required | string <uuid> (CorrelationId) Caller-generated UUID per request (UUID v4 or v7 recommended).
Used as the request idempotency key |
object Free-form metadata. Stored alongside the request. Not interpreted by FG.AI. Use for caller-side tracing, integration-instance markers, or batch source tags. | |
required | Array of objects (Uom) |
{- "partner_id": "ACME-TENANT-A",
- "correlation_id": "807686c4-116c-44b3-a01c-b14b50e31bcc",
- "meta": { },
- "items": [
- {
- "source_id": "SKU-WIDGET-RED-LG",
- "source_version": 0,
- "lifecycle": "ACTIVE",
- "name": "Each",
- "symbol": "EA",
- "base_uom_source_id": "string",
- "conversion_factor": 0
}
]
}{- "results": [
- {
- "source_id": "SKU-WIDGET-RED-LG",
- "status": "ACCEPTED",
- "internal_id": "fgai-sku-01HXABC...",
- "quarantine_id": "string",
- "reason": "string"
}
], - "summary": {
- "accepted": 0,
- "replay": 0,
- "quarantined": 0,
- "rejected": 0
}, - "replay": true
}Upsert one or more SKUs. SKUs reference UoMs; a SKU upsert
with an unregistered base_uom is QUARANTINED.
Lot- and serial-tracking flags on the SKU drive whether
downstream movements require lot or serial fields.
See WMS ADR-0033.
| mode | string Default: "upsert" Enum: "upsert" "bulk" "full-refresh" Sync mode.
|
| partner_id required | string (PartnerId) ^[A-Za-z0-9._-]+-TENANT-[A-Za-z0-9._-]+$ Composite partner identifier: |
| correlation_id required | string <uuid> (CorrelationId) Caller-generated UUID per request (UUID v4 or v7 recommended).
Used as the request idempotency key |
object Free-form metadata. Stored alongside the request. Not interpreted by FG.AI. Use for caller-side tracing, integration-instance markers, or batch source tags. | |
required | Array of objects (Sku) |
{- "partner_id": "ACME-TENANT-A",
- "correlation_id": "0193e4e3-1c8a-7c64-9b39-9d8c43c4a1b9",
- "items": [
- {
- "source_id": "SKU-WIDGET-RED-LG",
- "source_version": 12,
- "name": "Widget, Red, Large",
- "base_uom": "EA",
- "lot_tracked": true,
- "serial_tracked": false,
- "hazmat_class": null,
- "temperature_class": "AMBIENT",
- "lifecycle": "ACTIVE"
}
]
}{- "results": [
- {
- "source_id": "SKU-WIDGET-RED-LG",
- "status": "ACCEPTED",
- "internal_id": "fgai-sku-01HXABC...",
- "quarantine_id": "string",
- "reason": "string"
}
], - "summary": {
- "accepted": 0,
- "replay": 0,
- "quarantined": 0,
- "rejected": 0
}, - "replay": true
}Upsert one or more BOMs. A BOM references a parent SKU and a
list of component SKUs with quantities. All referenced SKUs
must already exist or the upsert is QUARANTINED.
Used for assembled / kitted / refurbished products. See WMS ADR-0042.
| mode | string Default: "upsert" Enum: "upsert" "bulk" "full-refresh" Sync mode.
|
| partner_id required | string (PartnerId) ^[A-Za-z0-9._-]+-TENANT-[A-Za-z0-9._-]+$ Composite partner identifier: |
| correlation_id required | string <uuid> (CorrelationId) Caller-generated UUID per request (UUID v4 or v7 recommended).
Used as the request idempotency key |
object Free-form metadata. Stored alongside the request. Not interpreted by FG.AI. Use for caller-side tracing, integration-instance markers, or batch source tags. | |
required | Array of objects (Bom) |
{- "partner_id": "ACME-TENANT-A",
- "correlation_id": "807686c4-116c-44b3-a01c-b14b50e31bcc",
- "meta": { },
- "items": [
- {
- "source_id": "SKU-WIDGET-RED-LG",
- "source_version": 0,
- "lifecycle": "ACTIVE",
- "parent_sku_source_id": "SKU-WIDGET-RED-LG",
- "lines": [
- {
- "component_source_id": "SKU-WIDGET-RED-LG",
- "qty": 0,
- "uom": "EA",
- "role": "INPUT"
}
]
}
]
}{- "results": [
- {
- "source_id": "SKU-WIDGET-RED-LG",
- "status": "ACCEPTED",
- "internal_id": "fgai-sku-01HXABC...",
- "quarantine_id": "string",
- "reason": "string"
}
], - "summary": {
- "accepted": 0,
- "replay": 0,
- "quarantined": 0,
- "rejected": 0
}, - "replay": true
}Upsert one or more locations. Locations form a hierarchy:
WAREHOUSE → ZONE → BIN. A child location with an
unregistered parent_source_id is QUARANTINED.
Onboarding order: warehouses first, then zones, then bins.
| mode | string Default: "upsert" Enum: "upsert" "bulk" "full-refresh" Sync mode.
|
| partner_id required | string (PartnerId) ^[A-Za-z0-9._-]+-TENANT-[A-Za-z0-9._-]+$ Composite partner identifier: |
| correlation_id required | string <uuid> (CorrelationId) Caller-generated UUID per request (UUID v4 or v7 recommended).
Used as the request idempotency key |
object Free-form metadata. Stored alongside the request. Not interpreted by FG.AI. Use for caller-side tracing, integration-instance markers, or batch source tags. | |
required | Array of objects (Location) |
{- "partner_id": "ACME-TENANT-A",
- "correlation_id": "807686c4-116c-44b3-a01c-b14b50e31bcc",
- "meta": { },
- "items": [
- {
- "source_id": "SKU-WIDGET-RED-LG",
- "source_version": 0,
- "lifecycle": "ACTIVE",
- "kind": "WAREHOUSE",
- "name": "string",
- "parent_source_id": "string",
- "address_source_id": "string",
- "attributes": { }
}
]
}{- "results": [
- {
- "source_id": "SKU-WIDGET-RED-LG",
- "status": "ACCEPTED",
- "internal_id": "fgai-sku-01HXABC...",
- "quarantine_id": "string",
- "reason": "string"
}
], - "summary": {
- "accepted": 0,
- "replay": 0,
- "quarantined": 0,
- "rejected": 0
}, - "replay": true
}Upsert postal addresses for warehouses, customers, suppliers, and carriers. Addresses are referenced from documents.
| mode | string Default: "upsert" Enum: "upsert" "bulk" "full-refresh" Sync mode.
|
| partner_id required | string (PartnerId) ^[A-Za-z0-9._-]+-TENANT-[A-Za-z0-9._-]+$ Composite partner identifier: |
| correlation_id required | string <uuid> (CorrelationId) Caller-generated UUID per request (UUID v4 or v7 recommended).
Used as the request idempotency key |
object Free-form metadata. Stored alongside the request. Not interpreted by FG.AI. Use for caller-side tracing, integration-instance markers, or batch source tags. | |
required | Array of objects (Address) |
{- "partner_id": "ACME-TENANT-A",
- "correlation_id": "807686c4-116c-44b3-a01c-b14b50e31bcc",
- "meta": { },
- "items": [
- {
- "source_id": "SKU-WIDGET-RED-LG",
- "source_version": 0,
- "lifecycle": "ACTIVE",
- "kind": "WAREHOUSE",
- "name": "string",
- "line1": "string",
- "line2": "string",
- "city": "string",
- "region": "string",
- "postal_code": "string",
- "country": "st",
- "contact_email": "user@example.com",
- "contact_phone": "string"
}
]
}{- "results": [
- {
- "source_id": "SKU-WIDGET-RED-LG",
- "status": "ACCEPTED",
- "internal_id": "fgai-sku-01HXABC...",
- "quarantine_id": "string",
- "reason": "string"
}
], - "summary": {
- "accepted": 0,
- "replay": 0,
- "quarantined": 0,
- "rejected": 0
}, - "replay": true
}Register lots for lot-tracked SKUs. A movement against a lot-tracked SKU with an unregistered lot is rejected (422).
| mode | string Default: "upsert" Enum: "upsert" "bulk" "full-refresh" Sync mode.
|
| partner_id required | string (PartnerId) ^[A-Za-z0-9._-]+-TENANT-[A-Za-z0-9._-]+$ Composite partner identifier: |
| correlation_id required | string <uuid> (CorrelationId) Caller-generated UUID per request (UUID v4 or v7 recommended).
Used as the request idempotency key |
object Free-form metadata. Stored alongside the request. Not interpreted by FG.AI. Use for caller-side tracing, integration-instance markers, or batch source tags. | |
required | Array of objects (Lot) |
{- "partner_id": "ACME-TENANT-A",
- "correlation_id": "807686c4-116c-44b3-a01c-b14b50e31bcc",
- "meta": { },
- "items": [
- {
- "source_id": "SKU-WIDGET-RED-LG",
- "source_version": 0,
- "lifecycle": "ACTIVE",
- "sku_source_id": "SKU-WIDGET-RED-LG",
- "manufactured_at": "2019-08-24T14:15:22Z",
- "expires_at": "2019-08-24T14:15:22Z",
- "attributes": { }
}
]
}{- "results": [
- {
- "source_id": "SKU-WIDGET-RED-LG",
- "status": "ACCEPTED",
- "internal_id": "fgai-sku-01HXABC...",
- "quarantine_id": "string",
- "reason": "string"
}
], - "summary": {
- "accepted": 0,
- "replay": 0,
- "quarantined": 0,
- "rejected": 0
}, - "replay": true
}Register serial numbers for serial-tracked SKUs. A movement against a serial-tracked SKU with an unregistered serial is rejected (422).
| mode | string Default: "upsert" Enum: "upsert" "bulk" "full-refresh" Sync mode.
|
| partner_id required | string (PartnerId) ^[A-Za-z0-9._-]+-TENANT-[A-Za-z0-9._-]+$ Composite partner identifier: |
| correlation_id required | string <uuid> (CorrelationId) Caller-generated UUID per request (UUID v4 or v7 recommended).
Used as the request idempotency key |
object Free-form metadata. Stored alongside the request. Not interpreted by FG.AI. Use for caller-side tracing, integration-instance markers, or batch source tags. | |
required | Array of objects (Serial) |
{- "partner_id": "ACME-TENANT-A",
- "correlation_id": "807686c4-116c-44b3-a01c-b14b50e31bcc",
- "meta": { },
- "items": [
- {
- "source_id": "SKU-WIDGET-RED-LG",
- "source_version": 0,
- "lifecycle": "ACTIVE",
- "sku_source_id": "SKU-WIDGET-RED-LG",
- "lot_source_id": "string",
- "manufactured_at": "2019-08-24T14:15:22Z"
}
]
}{- "results": [
- {
- "source_id": "SKU-WIDGET-RED-LG",
- "status": "ACCEPTED",
- "internal_id": "fgai-sku-01HXABC...",
- "quarantine_id": "string",
- "reason": "string"
}
], - "summary": {
- "accepted": 0,
- "replay": 0,
- "quarantined": 0,
- "rejected": 0
}, - "replay": true
}Document upsert and cancellation — PurchaseOrders, SalesOrders, Receivers, Shippers, WorkOrders, TransferOrders. Per-event cadence; push as the upstream creates / updates them.
Upsert PurchaseOrder documents. Lines reference SKUs and UoMs from master data.
| mode | string Default: "upsert" Enum: "upsert" "bulk" "full-refresh" Sync mode.
|
| partner_id required | string (PartnerId) ^[A-Za-z0-9._-]+-TENANT-[A-Za-z0-9._-]+$ Composite partner identifier: |
| correlation_id required | string <uuid> (CorrelationId) Caller-generated UUID per request (UUID v4 or v7 recommended).
Used as the request idempotency key |
object Free-form metadata. Stored alongside the request. Not interpreted by FG.AI. Use for caller-side tracing, integration-instance markers, or batch source tags. | |
required | Array of objects (PurchaseOrder) |
{- "partner_id": "ACME-TENANT-A",
- "correlation_id": "807686c4-116c-44b3-a01c-b14b50e31bcc",
- "meta": { },
- "items": [
- {
- "source_id": "SKU-WIDGET-RED-LG",
- "source_version": 0,
- "lifecycle": "ACTIVE",
- "warehouse_source_id": "SKU-WIDGET-RED-LG",
- "state": "DRAFT",
- "issued_at": "2019-08-24T14:15:22Z",
- "expected_at": "2019-08-24T14:15:22Z",
- "party": {
- "kind": "CUSTOMER",
- "source_id": "SKU-WIDGET-RED-LG"
}, - "lines": [
- {
- "line_no": 1,
- "sku_source_id": "SKU-WIDGET-RED-LG",
- "qty": 0,
- "uom": "EA",
- "lot_source_id": "string",
- "serial_source_ids": [
- "string"
], - "from_location_source_id": "string",
- "to_location_source_id": "string",
- "attributes": { }
}
], - "attributes": { }
}
]
}{- "results": [
- {
- "source_id": "SKU-WIDGET-RED-LG",
- "status": "ACCEPTED",
- "internal_id": "fgai-sku-01HXABC...",
- "quarantine_id": "string",
- "reason": "string"
}
], - "summary": {
- "accepted": 0,
- "replay": 0,
- "quarantined": 0,
- "rejected": 0
}, - "replay": true
}Upsert SalesOrder documents.
| mode | string Default: "upsert" Enum: "upsert" "bulk" "full-refresh" Sync mode.
|
| partner_id required | string (PartnerId) ^[A-Za-z0-9._-]+-TENANT-[A-Za-z0-9._-]+$ Composite partner identifier: |
| correlation_id required | string <uuid> (CorrelationId) Caller-generated UUID per request (UUID v4 or v7 recommended).
Used as the request idempotency key |
object Free-form metadata. Stored alongside the request. Not interpreted by FG.AI. Use for caller-side tracing, integration-instance markers, or batch source tags. | |
required | Array of objects (SalesOrder) |
{- "partner_id": "ACME-TENANT-A",
- "correlation_id": "807686c4-116c-44b3-a01c-b14b50e31bcc",
- "meta": { },
- "items": [
- {
- "source_id": "SKU-WIDGET-RED-LG",
- "source_version": 0,
- "lifecycle": "ACTIVE",
- "warehouse_source_id": "SKU-WIDGET-RED-LG",
- "state": "DRAFT",
- "issued_at": "2019-08-24T14:15:22Z",
- "expected_at": "2019-08-24T14:15:22Z",
- "party": {
- "kind": "CUSTOMER",
- "source_id": "SKU-WIDGET-RED-LG"
}, - "lines": [
- {
- "line_no": 1,
- "sku_source_id": "SKU-WIDGET-RED-LG",
- "qty": 0,
- "uom": "EA",
- "lot_source_id": "string",
- "serial_source_ids": [
- "string"
], - "from_location_source_id": "string",
- "to_location_source_id": "string",
- "attributes": { }
}
], - "attributes": { }
}
]
}{- "results": [
- {
- "source_id": "SKU-WIDGET-RED-LG",
- "status": "ACCEPTED",
- "internal_id": "fgai-sku-01HXABC...",
- "quarantine_id": "string",
- "reason": "string"
}
], - "summary": {
- "accepted": 0,
- "replay": 0,
- "quarantined": 0,
- "rejected": 0
}, - "replay": true
}Upsert Receiver documents — expected inbound from a PO or ASN.
References a parent PO via po_source_id.
| mode | string Default: "upsert" Enum: "upsert" "bulk" "full-refresh" Sync mode.
|
| partner_id required | string (PartnerId) ^[A-Za-z0-9._-]+-TENANT-[A-Za-z0-9._-]+$ Composite partner identifier: |
| correlation_id required | string <uuid> (CorrelationId) Caller-generated UUID per request (UUID v4 or v7 recommended).
Used as the request idempotency key |
object Free-form metadata. Stored alongside the request. Not interpreted by FG.AI. Use for caller-side tracing, integration-instance markers, or batch source tags. | |
required | Array of objects (Receiver) |
{- "partner_id": "ACME-TENANT-A",
- "correlation_id": "807686c4-116c-44b3-a01c-b14b50e31bcc",
- "meta": { },
- "items": [
- {
- "source_id": "SKU-WIDGET-RED-LG",
- "source_version": 0,
- "lifecycle": "ACTIVE",
- "warehouse_source_id": "SKU-WIDGET-RED-LG",
- "state": "DRAFT",
- "issued_at": "2019-08-24T14:15:22Z",
- "expected_at": "2019-08-24T14:15:22Z",
- "party": {
- "kind": "CUSTOMER",
- "source_id": "SKU-WIDGET-RED-LG"
}, - "lines": [
- {
- "line_no": 1,
- "sku_source_id": "SKU-WIDGET-RED-LG",
- "qty": 0,
- "uom": "EA",
- "lot_source_id": "string",
- "serial_source_ids": [
- "string"
], - "from_location_source_id": "string",
- "to_location_source_id": "string",
- "attributes": { }
}
], - "attributes": { },
- "po_source_id": "string"
}
]
}{- "results": [
- {
- "source_id": "SKU-WIDGET-RED-LG",
- "status": "ACCEPTED",
- "internal_id": "fgai-sku-01HXABC...",
- "quarantine_id": "string",
- "reason": "string"
}
], - "summary": {
- "accepted": 0,
- "replay": 0,
- "quarantined": 0,
- "rejected": 0
}, - "replay": true
}Upsert Shipper documents — outbound shipment plans.
| mode | string Default: "upsert" Enum: "upsert" "bulk" "full-refresh" Sync mode.
|
| partner_id required | string (PartnerId) ^[A-Za-z0-9._-]+-TENANT-[A-Za-z0-9._-]+$ Composite partner identifier: |
| correlation_id required | string <uuid> (CorrelationId) Caller-generated UUID per request (UUID v4 or v7 recommended).
Used as the request idempotency key |
object Free-form metadata. Stored alongside the request. Not interpreted by FG.AI. Use for caller-side tracing, integration-instance markers, or batch source tags. | |
required | Array of objects (Shipper) |
{- "partner_id": "ACME-TENANT-A",
- "correlation_id": "807686c4-116c-44b3-a01c-b14b50e31bcc",
- "meta": { },
- "items": [
- {
- "source_id": "SKU-WIDGET-RED-LG",
- "source_version": 0,
- "lifecycle": "ACTIVE",
- "warehouse_source_id": "SKU-WIDGET-RED-LG",
- "state": "DRAFT",
- "issued_at": "2019-08-24T14:15:22Z",
- "expected_at": "2019-08-24T14:15:22Z",
- "party": {
- "kind": "CUSTOMER",
- "source_id": "SKU-WIDGET-RED-LG"
}, - "lines": [
- {
- "line_no": 1,
- "sku_source_id": "SKU-WIDGET-RED-LG",
- "qty": 0,
- "uom": "EA",
- "lot_source_id": "string",
- "serial_source_ids": [
- "string"
], - "from_location_source_id": "string",
- "to_location_source_id": "string",
- "attributes": { }
}
], - "attributes": { },
- "so_source_id": "string"
}
]
}{- "results": [
- {
- "source_id": "SKU-WIDGET-RED-LG",
- "status": "ACCEPTED",
- "internal_id": "fgai-sku-01HXABC...",
- "quarantine_id": "string",
- "reason": "string"
}
], - "summary": {
- "accepted": 0,
- "replay": 0,
- "quarantined": 0,
- "rejected": 0
}, - "replay": true
}Upsert WorkOrder documents — production, assembly, refurbish. Production work orders reference a BOM for inputs and outputs.
| mode | string Default: "upsert" Enum: "upsert" "bulk" "full-refresh" Sync mode.
|
| partner_id required | string (PartnerId) ^[A-Za-z0-9._-]+-TENANT-[A-Za-z0-9._-]+$ Composite partner identifier: |
| correlation_id required | string <uuid> (CorrelationId) Caller-generated UUID per request (UUID v4 or v7 recommended).
Used as the request idempotency key |
object Free-form metadata. Stored alongside the request. Not interpreted by FG.AI. Use for caller-side tracing, integration-instance markers, or batch source tags. | |
required | Array of objects (WorkOrder) |
{- "partner_id": "ACME-TENANT-A",
- "correlation_id": "807686c4-116c-44b3-a01c-b14b50e31bcc",
- "meta": { },
- "items": [
- {
- "source_id": "SKU-WIDGET-RED-LG",
- "source_version": 0,
- "lifecycle": "ACTIVE",
- "warehouse_source_id": "SKU-WIDGET-RED-LG",
- "state": "DRAFT",
- "issued_at": "2019-08-24T14:15:22Z",
- "expected_at": "2019-08-24T14:15:22Z",
- "party": {
- "kind": "CUSTOMER",
- "source_id": "SKU-WIDGET-RED-LG"
}, - "lines": [
- {
- "line_no": 1,
- "sku_source_id": "SKU-WIDGET-RED-LG",
- "qty": 0,
- "uom": "EA",
- "lot_source_id": "string",
- "serial_source_ids": [
- "string"
], - "from_location_source_id": "string",
- "to_location_source_id": "string",
- "attributes": { }
}
], - "attributes": { },
- "bom_source_id": "string",
- "sub_type": "PRODUCTION"
}
]
}{- "results": [
- {
- "source_id": "SKU-WIDGET-RED-LG",
- "status": "ACCEPTED",
- "internal_id": "fgai-sku-01HXABC...",
- "quarantine_id": "string",
- "reason": "string"
}
], - "summary": {
- "accepted": 0,
- "replay": 0,
- "quarantined": 0,
- "rejected": 0
}, - "replay": true
}Upsert TransferOrder documents — inter-warehouse movement. See WMS ADR-0006 for the cross-warehouse saga model the FG.AI planner uses.
| mode | string Default: "upsert" Enum: "upsert" "bulk" "full-refresh" Sync mode.
|
| partner_id required | string (PartnerId) ^[A-Za-z0-9._-]+-TENANT-[A-Za-z0-9._-]+$ Composite partner identifier: |
| correlation_id required | string <uuid> (CorrelationId) Caller-generated UUID per request (UUID v4 or v7 recommended).
Used as the request idempotency key |
object Free-form metadata. Stored alongside the request. Not interpreted by FG.AI. Use for caller-side tracing, integration-instance markers, or batch source tags. | |
required | Array of objects (TransferOrder) |
{- "partner_id": "ACME-TENANT-A",
- "correlation_id": "807686c4-116c-44b3-a01c-b14b50e31bcc",
- "meta": { },
- "items": [
- {
- "source_id": "SKU-WIDGET-RED-LG",
- "source_version": 0,
- "lifecycle": "ACTIVE",
- "warehouse_source_id": "SKU-WIDGET-RED-LG",
- "state": "DRAFT",
- "issued_at": "2019-08-24T14:15:22Z",
- "expected_at": "2019-08-24T14:15:22Z",
- "party": {
- "kind": "CUSTOMER",
- "source_id": "SKU-WIDGET-RED-LG"
}, - "lines": [
- {
- "line_no": 1,
- "sku_source_id": "SKU-WIDGET-RED-LG",
- "qty": 0,
- "uom": "EA",
- "lot_source_id": "string",
- "serial_source_ids": [
- "string"
], - "from_location_source_id": "string",
- "to_location_source_id": "string",
- "attributes": { }
}
], - "attributes": { },
- "source_warehouse_source_id": "SKU-WIDGET-RED-LG",
- "dest_warehouse_source_id": "SKU-WIDGET-RED-LG",
- "in_transit_at": "2019-08-24T14:15:22Z"
}
]
}{- "results": [
- {
- "source_id": "SKU-WIDGET-RED-LG",
- "status": "ACCEPTED",
- "internal_id": "fgai-sku-01HXABC...",
- "quarantine_id": "string",
- "reason": "string"
}
], - "summary": {
- "accepted": 0,
- "replay": 0,
- "quarantined": 0,
- "rejected": 0
}, - "replay": true
}Soft-cancel a document — moves it to CANCELLED state. The
document remains queryable for audit. Hard deletion is not
supported.
type is required because the same source_id may exist
across document types.
| source_id required | string (SourceId) [ 1 .. 256 ] characters Example: SKU-WIDGET-RED-LG Upstream's natural key for the entity. Treated as opaque. Cannot change once registered. |
| type required | string (DocumentType) Enum: "PR" "PO" "SO" "RECEIVER" "SHIPPER" "WORKORDER" "TRANSFER_ORDER" "VASORDER" "REFURBISH_ORDER" Document type, matching WMS ADR-0008 generic MES vocabulary. |
| partner_id required | string (PartnerId) ^[A-Za-z0-9._-]+-TENANT-[A-Za-z0-9._-]+$ Example: partner_id=ACME-TENANT-A Composite partner identifier: |
| reason | string <= 512 characters Optional free-text cancellation reason. |
{- "source_id": "SKU-WIDGET-RED-LG",
- "type": "PR",
- "state": "DRAFT",
- "cancelled_at": "2019-08-24T14:15:22Z"
}Inventory snapshot and delta movements. Snapshot at cutover; deltas during overlap; quiet after FG.AI is authoritative.
Submit a point-in-time inventory snapshot.
scope=FULL — every (warehouse, sku, location, lot?, serial?)
position on hand at as_of. Replaces FG.AI's view of the
warehouse. Used at onboarding cutover and periodic reconciliation.scope=PARTIAL — a scoped subset (zone, SKU class). Used to
verify a subset without replacing the whole ledger.After cutover, FG.AI WMS is authoritative for inventory and the upstream stops pushing snapshots.
| partner_id required | string (PartnerId) ^[A-Za-z0-9._-]+-TENANT-[A-Za-z0-9._-]+$ Composite partner identifier: |
| correlation_id required | string <uuid> (CorrelationId) Caller-generated UUID per request (UUID v4 or v7 recommended).
Used as the request idempotency key |
object Free-form metadata. Stored alongside the request. Not interpreted by FG.AI. Use for caller-side tracing, integration-instance markers, or batch source tags. | |
| scope required | string Enum: "FULL" "PARTIAL" |
| warehouse_source_id required | string (SourceId) [ 1 .. 256 ] characters Upstream's natural key for the entity. Treated as opaque. Cannot change once registered. |
| as_of required | string <date-time> (Timestamp) RFC 3339 timestamp with timezone offset (UTC |
object or null When | |
required | Array of objects (InventoryPosition) |
{- "partner_id": "ACME-TENANT-A",
- "correlation_id": "807686c4-116c-44b3-a01c-b14b50e31bcc",
- "meta": { },
- "scope": "FULL",
- "warehouse_source_id": "SKU-WIDGET-RED-LG",
- "as_of": "2019-08-24T14:15:22Z",
- "partial_scope": {
- "zone_source_ids": [
- "SKU-WIDGET-RED-LG"
], - "sku_source_ids": [
- "SKU-WIDGET-RED-LG"
]
}, - "positions": [
- {
- "warehouse_source_id": "SKU-WIDGET-RED-LG",
- "sku_source_id": "SKU-WIDGET-RED-LG",
- "location_source_id": "SKU-WIDGET-RED-LG",
- "lot_source_id": "string",
- "serial_source_id": "string",
- "qty": 0,
- "uom": "EA",
- "status": "AVAILABLE",
- "ownership": "OWNED"
}
]
}{- "snapshot_id": "string",
- "replay": false,
- "summary": {
- "position_count": 0
}
}Submit one or more inventory delta movements. Used during the overlap period between snapshot cutover and FG.AI becoming authoritative for inventory.
Movement kinds match the
wes-contract movement kinds:
PICK, PUT, MOVE, ADJUST, CONSUME, PRODUCE, RECEIVE,
SHIP.
Once FG.AI is authoritative, the upstream should stop using this endpoint; inventory deltas thereafter flow through FG.AI WES → FG.AI WMS internally, not through this contract.
| partner_id required | string (PartnerId) ^[A-Za-z0-9._-]+-TENANT-[A-Za-z0-9._-]+$ Composite partner identifier: |
| correlation_id required | string <uuid> (CorrelationId) Caller-generated UUID per request (UUID v4 or v7 recommended).
Used as the request idempotency key |
object Free-form metadata. Stored alongside the request. Not interpreted by FG.AI. Use for caller-side tracing, integration-instance markers, or batch source tags. | |
required | Array of objects (InventoryMovement) |
{- "partner_id": "ACME-TENANT-A",
- "correlation_id": "807686c4-116c-44b3-a01c-b14b50e31bcc",
- "meta": { },
- "movements": [
- {
- "correlation_id": "807686c4-116c-44b3-a01c-b14b50e31bcc",
- "kind": "PICK",
- "warehouse_source_id": "SKU-WIDGET-RED-LG",
- "sku_source_id": "SKU-WIDGET-RED-LG",
- "qty": 0,
- "uom": "EA",
- "from_location_source_id": "string",
- "to_location_source_id": "string",
- "lot_source_id": "string",
- "serial_source_id": "string",
- "document_ref": {
- "type": "PR",
- "source_id": "SKU-WIDGET-RED-LG",
- "line_no": 0
}, - "occurred_at": "2019-08-24T14:15:22Z"
}
]
}{- "results": [
- {
- "correlation_id": "807686c4-116c-44b3-a01c-b14b50e31bcc",
- "status": "ACCEPTED",
- "reason": "string"
}
], - "summary": {
- "accepted": 0,
- "replay": 0,
- "quarantined": 0,
- "rejected": 0
}, - "replay": false
}Async bulk job status and error pagination. Submitted via
?mode=bulk; polled via /jobs/{job_id}.
Returns the current state of a bulk upsert job. Submitted via
?mode=bulk on any upsert endpoint.
Job records are retained for 7 days after completion. Errors
for completed-with-errors jobs are paginated at
/jobs/{job_id}/errors and retained for 30 days.
| job_id required | string |
{- "job_id": "string",
- "state": "PENDING",
- "counts": {
- "total": 0,
- "accepted": 0,
- "replay": 0,
- "quarantined": 0,
- "rejected": 0
}, - "started_at": "2019-08-24T14:15:22Z",
- "finished_at": "2019-08-24T14:15:22Z",
- "errors_url": "../dictionary"
}Returns paginated per-item errors for a job that completed
with errors (state: COMPLETED_WITH_ERRORS).
| job_id required | string |
| page_token | string Opaque pagination token from a prior response. |
| page_size | integer [ 1 .. 1000 ] Default: 100 |
{- "items": [
- {
- "source_id": "SKU-WIDGET-RED-LG",
- "status": "ACCEPTED",
- "internal_id": "fgai-sku-01HXABC...",
- "quarantine_id": "string",
- "reason": "string"
}
], - "next_page_token": "string",
- "has_more": true
}Look up FG.AI's internal_id for a (partner_id, source_id)
pair. Useful for support and cross-system reconciliation.
Returns FG.AI's internal_id for a (partner_id, entity, source_id).
Useful for support diagnostics and cross-system reconciliation.
Most integrations operate purely on source_id and never
need this endpoint.
| partner_id required | string (PartnerId) ^[A-Za-z0-9._-]+-TENANT-[A-Za-z0-9._-]+$ Example: partner_id=ACME-TENANT-A Composite partner identifier: |
| entity required | string Enum: "uom" "sku" "bom" "location" "address" "lot" "serial" "purchase_order" "sales_order" "receiver" "shipper" "work_order" "transfer_order" |
| source_id required | string (SourceId) [ 1 .. 256 ] characters Example: source_id=SKU-WIDGET-RED-LG Upstream's natural key for the entity. Treated as opaque. Cannot change once registered. |
{- "entity": "string",
- "source_id": "SKU-WIDGET-RED-LG",
- "internal_id": "fgai-sku-01HXABC...",
- "partner_id": "ACME-TENANT-A",
- "first_seen_at": "2019-08-24T14:15:22Z",
- "last_seen_at": "2019-08-24T14:15:22Z",
- "lifecycle": "ACTIVE"
}List, inspect, and operator-release quarantined items. Most quarantines are resolved by fixing the underlying upstream data and re-upserting; operator release is the escape hatch.
Paginated list of quarantined items, filterable by entity kind, state, time range, and partner. Backs the supervisor triage UI on integrator side.
Quarantine records expire 30 days after creation. Expired records require a fresh upsert from the upstream.
| partner_id | string (PartnerId) ^[A-Za-z0-9._-]+-TENANT-[A-Za-z0-9._-]+$ Example: partner_id=ACME-TENANT-A Composite partner identifier: |
| entity_kind | string Enum: "uom" "sku" "bom" "location" "address" "lot" "serial" "purchase_order" "sales_order" "receiver" "shipper" "work_order" "transfer_order" "inventory_position" "inventory_movement" |
| state | string Enum: "PENDING" "RESOLVED_BY_RESUBMIT" "RESOLVED_BY_RELEASE" "EXPIRED" |
| since | string <date-time> |
| page_token | string |
| page_size | integer [ 1 .. 1000 ] Default: 100 |
{- "items": [
- {
- "quarantine_id": "string",
- "partner_id": "ACME-TENANT-A",
- "entity_kind": "string",
- "source_id": "SKU-WIDGET-RED-LG",
- "reason": "string",
- "submitted_payload": { },
- "quarantined_at": "2019-08-24T14:15:22Z",
- "state": "PENDING",
- "resolved_at": "2019-08-24T14:15:22Z",
- "resolved_by": "string"
}
], - "next_page_token": "string",
- "has_more": true
}Release a quarantined item into the canonical store as-is, suppressing the failed business validation. Use sparingly: it papers over real data-quality issues and the bad reference will still exist.
Releases are audited with operator identity and the required
reason body field. Emits wms.quarantine.released-by-operator.
The right answer is almost always fixing the upstream data and re-upserting, not releasing.
| quarantine_id required | string |
| reason required | string [ 16 .. 2048 ] characters Required substantive justification. Recorded in the audit log. "approved" or "fix" is not acceptable — describe the situation, the validation that was overridden, and the authorization source. |
{- "reason": "stringstringstri"
}{- "quarantine_id": "string",
- "internal_id": "fgai-sku-01HXABC...",
- "released_at": "2019-08-24T14:15:22Z"
}Returns service health. Used by operational dashboards and partner onboarding probes.
{- "status": "UP",
- "components": {
- "property1": {
- "status": "UP",
- "detail": "string"
}, - "property2": {
- "status": "UP",
- "detail": "string"
}
}
}Returns supported contract version, sync modes, thresholds, and webhook event kinds. Partners probe this during onboarding to discover server-side limits and feature flags.
{- "contract_version": "1.0.0",
- "supported_modes": [
- "upsert"
], - "bulk_async_threshold": 0,
- "webhook_events": [
- "document.state-changed"
], - "quarantine_retention_days": 30,
- "job_record_retention_days": 7,
- "job_error_retention_days": 30,
- "idempotency_retention_days": 30
}Emitted by FG.AI WMS when a document transitions between
lifecycle states (RELEASED, PICKING, PICKED, PACKED,
SHIPPED, RECEIVED, COMPLETED, CANCELLED, BLOCKED).
At-least-once with exponential-backoff retry. Receivers
must be idempotent on (planner_id, correlation_id) and
must verify the X-FGAI-Signature HMAC over the raw body.
| event required | string Value: "document.state-changed" |
| correlation_id required | string <uuid> (CorrelationId) Caller-generated UUID per request (UUID v4 or v7 recommended).
Used as the request idempotency key |
| planner_id required | string |
| occurred_at required | string <date-time> (Timestamp) RFC 3339 timestamp with timezone offset (UTC |
required | object |
| from_state required | string (DocumentState) Enum: "DRAFT" "RELEASED" "PICKING" "PICKED" "PACKED" "SHIPPED" "RECEIVED" "IN_PROGRESS" "COMPLETED" "CANCELLED" "BLOCKED" Document lifecycle state. Not all states apply to all document
types — a Receiver has no |
| to_state required | string (DocumentState) Enum: "DRAFT" "RELEASED" "PICKING" "PICKED" "PACKED" "SHIPPED" "RECEIVED" "IN_PROGRESS" "COMPLETED" "CANCELLED" "BLOCKED" Document lifecycle state. Not all states apply to all document
types — a Receiver has no |
object or null |
{- "event": "document.state-changed",
- "correlation_id": "807686c4-116c-44b3-a01c-b14b50e31bcc",
- "planner_id": "fgai-wms",
- "occurred_at": "2019-08-24T14:15:22Z",
- "document_ref": {
- "type": "PR",
- "source_id": "SKU-WIDGET-RED-LG",
- "internal_id": "fgai-sku-01HXABC..."
}, - "from_state": "DRAFT",
- "to_state": "DRAFT",
- "actor": {
- "kind": "SYSTEM",
- "id": "string"
}
}Emitted by FG.AI WMS when reconciliation produces an inventory adjustment vs the caller's prior baseline. Receivers may use this to mirror FG.AI's state back into their own system.
| event required | string Value: "inventory.adjusted" |
| correlation_id required | string <uuid> (CorrelationId) Caller-generated UUID per request (UUID v4 or v7 recommended).
Used as the request idempotency key |
| planner_id required | string |
| occurred_at required | string <date-time> (Timestamp) RFC 3339 timestamp with timezone offset (UTC |
| warehouse_id required | string |
| sku required | string |
| location required | string |
| lot | string or null |
| serial | string or null |
| qty_delta required | number (Quantity) Numeric quantity. Precise; senders SHOULD send as a JSON
number without exponent. Negative values are allowed only
for |
| reason required | string Enum: "CYCLE_COUNT_RECONCILE" "DISCREPANCY_RESOLUTION" "DAMAGE" "SUPERVISOR_ADJUSTMENT" "OTHER" |
object or null |
{- "event": "inventory.adjusted",
- "correlation_id": "807686c4-116c-44b3-a01c-b14b50e31bcc",
- "planner_id": "fgai-wms",
- "occurred_at": "2019-08-24T14:15:22Z",
- "warehouse_id": "string",
- "sku": "string",
- "location": "string",
- "lot": "string",
- "serial": "string",
- "qty_delta": 0,
- "reason": "CYCLE_COUNT_RECONCILE",
- "ref": {
- "kind": "string",
- "id": "string"
}
}Emitted by FG.AI WMS when an item is quarantined during
normalization. Lets the caller's ops surface react without
polling /quarantine.
| event required | string Value: "master.normalization-conflict" |
| correlation_id required | string <uuid> (CorrelationId) Caller-generated UUID per request (UUID v4 or v7 recommended).
Used as the request idempotency key |
| planner_id required | string |
| occurred_at required | string <date-time> (Timestamp) RFC 3339 timestamp with timezone offset (UTC |
| entity_kind required | string |
| source_id required | string (SourceId) [ 1 .. 256 ] characters Upstream's natural key for the entity. Treated as opaque. Cannot change once registered. |
| quarantine_id required | string |
| reason required | string |
object |
{- "event": "master.normalization-conflict",
- "correlation_id": "807686c4-116c-44b3-a01c-b14b50e31bcc",
- "planner_id": "fgai-wms",
- "occurred_at": "2019-08-24T14:15:22Z",
- "entity_kind": "string",
- "source_id": "SKU-WIDGET-RED-LG",
- "quarantine_id": "string",
- "reason": "string",
- "submitted_payload": { }
}