Optional: Order status
get_orderRetrieve an order's current status and human approval decision, plus amendments, credit notes, and ERP hand-off details when delivery issues occur.
Instructions
Current status of an order (ordered, pending_approval, refused, rejected, expired, expired_cutoff) and any human decision. Only orders under your own mandate: send your Authorization: Bearer header (or agent_token). Returns the order (schema /schemas/order.json) with approval {by, approved, note, at} once a human decided, a fresh receipt_jws, and agent_claim (the rationale, labelled unverified). After delivery problems it carries amendments[] from Valio (short pick, delay, substitution at pick, cancelled line; status pending_buyer waits for the buyer, ask-tier for their human, not you) and credit_notes[]. erp: the hand-off to Valio Aimo's order system; erp.simulated / status "simulated" / SIM- id means placed with Sous, Valio hand-off simulated in this demo (no real order reached Valio).
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": {
"order_id": "<order_id>"
},
"name": "get_order"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| order_id | Yes | ||
| agent_token | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| erp | No | Hand-off to Valio Aimo's order system (unsigned): {adapter: stub|http, simulated, status: pending|sent|confirmed|simulated|failed, confirmation_id, note, ...}. simulated=true (status 'simulated', confirmation_id 'SIM-...'): no real order was sent to Valio Aimo (no order API in this demo); describe the order as 'placed with Sous; Valio hand-off simulated in this demo', never as confirmed by Valio. | |
| buyer | Yes | ||
| lines | Yes | ||
| status | Yes | ||
| agent_id | Yes | ||
| approval | No | ||
| decision | Yes | ||
| quote_id | Yes | ||
| order_url | Yes | ||
| amendments | No | Valio's post-order exceptions (short_pick, delay, substitution_at_pick, cancel_line), each {id, kind, line, reason, tier, findings[], status: applied|pending_buyer|accepted|rejected, effect, resolution, jws (typ sous-amendment+jws)} | |
| created_at | Yes | ||
| mandate_id | Yes | ||
| updated_at | Yes | ||
| agent_claim | No | get_order: the agent's rationale, labelled unverified | |
| receipt_jws | Yes | ||
| approval_url | No | ||
| credit_notes | No | Credit (or extra charge) lines from amendments | |
| total_ex_vat | Yes | ||
| delivery_date | Yes | ||
| total_inc_vat | Yes | ||
| agent_rationale | No | ||
| idempotency_key | No | ||
| requested_delivery_date | Yes |