# massprint — print API for agents

Upload a PDF, get a printed storybook delivered to a door in India — via one MCP
tool call or one REST request. Built for AI agents; humans only touch the payment link.

## The 5-step flow

1. **`create_upload`** → returns `{upload_id, put_url}`
2. **HTTP PUT** the raw PDF bytes to `put_url` (`Content-Type: application/pdf`, no auth — the URL is signed). The response includes the full validation report.
3. **`create_order`** with `upload_id`, format, address, email → returns `{order_id, order_token, quote, payment_url}`. Validation happens **before** any payment link exists — a bad PDF or address never costs money.
4. The **human pays** `payment_url` (Razorpay: UPI, cards, netbanking). The order confirms automatically via webhook.
5. **`get_order`** to poll status: `awaiting_payment → confirmed → printing → shipped → delivered`. Tracking number appears at `shipped`.

## Interfaces

| Interface | URL | Auth |
|---|---|---|
| MCP (agents) | `https://print.toongen.app/mcp` | none |
| REST (platforms) | `https://print.toongen.app/v1/*` | `Authorization: Bearer mp_live_...` (optional for one-off use) |
| Web UI (humans) | `https://print.toongen.app/` | email OTP |

## Key facts

- **One SKU (V1):** storybook, paperback ₹799 / hardcover ₹1,199 incl. shipping, 20–60 pages, trim 8×8 in (203 mm square) or A5 portrait, ±2 mm tolerance.
- **India only** (V1). 6-digit PIN code and Indian mobile number required.
- **`order_token`** is returned once at order creation and is required to read or cancel the order. Save it.
- Unpaid orders expire after **72 hours**. `get_order` on an unpaid order always returns `payment_url` again.
- PDFs are deleted 30 days after delivery (7 days after expiry). Files exist to be printed, not harvested.
- Uploader owns content rights and responsibility. Every file is human-reviewed before printing.

## More

- [MCP tools reference](https://print.toongen.app/docs/mcp)
- [REST API reference](https://print.toongen.app/docs/rest) · [OpenAPI](https://print.toongen.app/openapi.json)
- [Status webhooks for platforms](https://print.toongen.app/docs/webhooks)
- [Error catalog](https://print.toongen.app/docs/errors)

Support: work@msomu.com
