Transition Purchase Order
transition_purchase_orderAtomically execute a previously previewed purchase-order transition. Requires the single-use previewReceipt, exact entityVersion, and a caller-generated idempotencyKey. The server recomputes canonical state inside a serializable transaction and rejects stale previews. Reusing the same idempotency key with the same input safely replays the stored response; changed input is rejected. The required privileged capability is purchasing.execute, or receiving.execute for QuickReceive.
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": {
"purchaseOrderId": "<purchaseOrderId>",
"transition": "<transition>",
"previewReceipt": "<previewReceipt>",
"expectedEntityVersion": "<expectedEntityVersion>",
"idempotencyKey": "<idempotencyKey>"
},
"name": "transition_purchase_order"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| transition | Yes | Exact transition from preview: IssueOrRouteForApproval, Cancel, or QuickReceive. | |
| idempotencyKey | Yes | Caller-generated stable idempotency key for this exact transition. | |
| previewReceipt | Yes | Opaque single-use receipt returned by preview_purchase_order_transition. | |
| purchaseOrderId | Yes | Purchase order id (GUID). | |
| expectedEntityVersion | Yes | Exact 64-character entityVersion returned by preview. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | ||
| result | No | ||
| effects | No | ||
| warnings | No | ||
| expiresAt | No | ||
| operation | No | ||
| actionItemId | No | ||
| confirmation | No | ||
| correlationId | No | ||
| approvalResult | No | ||
| idempotencyKey | No | ||
| previewReceipt | No | ||
| idempotentReplay | No | ||
| allowedNextActions | No |