Commit Import Session
commit_import_sessionPreview and commit a staged import session (governed two-step): call with preview=true for a full-pipeline dry-run — order count, date range, monthly historical shipped units, included/source date ranges, rows and orders omitted by the 36-month limit, would-create catalog counts, plus mapping and boundary-month warnings — and a single-use previewReceipt; show the customer the included range and monthly shipped units (does the span match the history they exported?) and relay any warnings verbatim, get their go-ahead, then repeat the call with the previewReceipt and a fresh idempotencyKey to commit. The receipt is bound to the staged file bytes AND the mapping, so any re-upload or re-map after the preview safely rejects the receipt. Commit is asynchronous: the response returns immediately and a background worker imports in 500-order chunks — poll get_import_session for committedOrders/totalOrders until status is Committed.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"importSessionId": "<importSessionId>"
},
"name": "commit_import_session"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| preview | No | Step 1 of the required two-step write: set true to validate and receive a structured preview plus a single-use previewReceipt. | |
| idempotencyKey | No | Caller-generated idempotency key; required with previewReceipt. | |
| previewReceipt | No | Step 2: the receipt returned by the preview call. Supply together with a fresh idempotencyKey to commit. | |
| importSessionId | Yes | The import session id (GUID). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | ||
| queued | No | ||
| message | No | ||
| preview | No | ||
| expiresAt | No | ||
| actionItemId | No | ||
| confirmation | No | ||
| correlationId | No | ||
| approvalResult | No | ||
| idempotencyKey | No | ||
| previewReceipt | No | ||
| idempotentReplay | No |