commerce
commerce: 12 operations.
commerce: 12 operations. Name one in "op" and pass that operation's own arguments in "input". describe returns an operation's input schema.
| Tool | commerce |
| Door | https://api.hanzo.ai/v1/mcp |
| Method | tools/call (JSON-RPC 2.0) |
| Arguments | 2, 1 required |
| Operation | POST /v1/billing/invoices/{id}/collect · POST /v1/cart/{id}/discard · GET /v1/cart/{id} · GET /v1/billing/invoices/{id} · GET /v1/payments/{id} · GET /_/commerce/healthz · POST /v1/billing/invoices/{id}/issue · POST /v1/cart · POST /v1/billing/invoices · POST /v1/cart/{id}/item · POST /v1/payments · POST /v1/billing/invoices/{id}/void |
| Product | billing |
Arguments
| Field | Type | Required | Default | Values | Description |
|---|---|---|---|---|---|
input | object | — | — | — | arguments for the chosen op |
op | string | yes | — | — | — |
tools/list declares a type, a description, which fields are required and an enumerated value set for each field and nothing further, and every column above is the door's own. This tool takes an operation name and that operation's arguments, so what the document constrains is what goes inside input, field by field, on the operation you name — ask describe for that. A — means the door does not constrain the field.
Call it
A tools/call carries every argument in one flat object — nothing binds to a path or a query string. This call carries exactly the arguments the operation requires, so it is the smallest one that can run.
curl -X POST https://api.hanzo.ai/v1/mcp \
-H "Authorization: Bearer $HANZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "commerce",
"arguments": {
"op": "get___commerce_healthz"
}
}
}'Values are the operation's own defaults and enumerated values where it declares them, and a <placeholder> where neither source declares one. tools/list needs no credential; tools/call does — called without one the door answers HTTP 200 with a JSON-RPC result whose isError is set and whose text says what was missing. How to get a key →
The operation behind it
commerce dispatches to 12 operations.
| Operation | Route | Product | Summary |
|---|---|---|---|
collectInvoice | POST /v1/billing/invoices/{id}/collect | billing | Collect an issued invoice from credits, balance, then card |
discardCart | POST /v1/cart/{id}/discard | cart | Discard a cart the shopper abandoned |
getCart | GET /v1/cart/{id} | cart | Read one cart with its lines and totals |
getInvoice | GET /v1/billing/invoices/{id} | billing | Read one invoice |
getPayment | GET /v1/payments/{id} | payments | Read one settled payment by its id |
get___commerce_healthz | GET /_/commerce/healthz | Answers ok whenever the commerce subsystem is mounted. | |
issueInvoice | POST /v1/billing/invoices/{id}/issue | billing | Issue a draft invoice, making it collectible |
openCart | POST /v1/cart | cart | Open a cart for a shopper to fill |
raiseInvoice | POST /v1/billing/invoices | billing | Raise a draft invoice against a customer |
setCartItem | POST /v1/cart/{id}/item | cart | Set one item's quantity in a cart; zero removes it |
takePayment | POST /v1/payments | payments | Take a card payment and credit the org's balance |
voidInvoice | POST /v1/billing/invoices/{id}/void | billing | Void a draft or issued invoice |
The same capability over plain HTTP is in the billing API reference, on https://api.hanzo.ai.
How is this guide?