Contract
- shape
- entity
- authority
- read
- evidence
- none
- subscription
- false
- permission
- any one of: org.member (carried by the caller's role template in the org `org_id`); a deactivated caller is refused first
- idempotency
- safe
- emits
- none
- MCP tool
- summarize_purchase_orders
- REST
- POST https://api.containertradehq.com/v1/cap/summarize_purchase_orders
Idempotency: a read: calling again changes nothing
Inputs
| name | type | required | validation |
|---|---|---|---|
| org_id | org_id | required | tradehq-org-id; 1 to 20 characters The org whose purchase orders they are. |
| filters | filters | optional | Purchase orders matching every term given. |
| q | text | optional | 1 to 64 characters The start of a purchase order number, a unit number on it or a supplier bill on it, case ignored. |
Response
total· integer · The purchase orders matching the filters.container_count· integer · Their containers, summed, not counting cancelled ones.landed_count· integer · Of those, the ones no longer pending, summed.median_transit_days· integernull · The median days from P/U Date to ETA over those that have both; null when none does.
Full JSON Schema
{
"type": "object",
"properties": {
"total": {
"type": "integer",
"minimum": 0,
"description": "The purchase orders matching the filters.",
"x-data-class": "operational"
},
"container_count": {
"type": "integer",
"minimum": 0,
"description": "Their containers, summed, not counting cancelled ones.",
"x-data-class": "operational"
},
"landed_count": {
"type": "integer",
"minimum": 0,
"description": "Of those, the ones no longer pending, summed.",
"x-data-class": "operational"
},
"median_transit_days": {
"type": [
"integer",
"null"
],
"description": "The median days from P/U Date to ETA over those that have both; null when none does.",
"x-data-class": "operational"
}
},
"required": [
"total",
"container_count",
"landed_count",
"median_transit_days"
],
"additionalProperties": false
} Refusals
The platform refusals apply to every call: version, authentication, authority, validation and rate limits, each in the same envelope.
Surfaces
DesktopF
MobileF
APIF
MCPF
VoiceD4
PushN
OneBoxN
OutboundN
- Voice: degraded: visualization
- Push: emits nothing
- OneBox: no document originates a purchase-order summary
- Outbound: a read emits nothing
Events
None emitted.