Create a print order
create_orderCreate a print order for an uploaded PDF, at the size you choose (size, from formats[].sizes in get_catalog; without it, the size the pages match exactly, else size_required). The file is never refused for its content: it is checked against the order after payment by our print team, who fit it to the size ordered and contact the buyer if they cannot. A storybook needs a page count we price. Returns { order, order_token } — the order object has order_id, status, amount, and payment_url (the Razorpay link, present while awaiting_payment). Give payment_url to the human to pay by the method chosen in pay_with (UPI or netbanking by default, which adds the 2% Razorpay fee; card adds 3%). SAVE order_token — it is shown only once and is required for get_order and cancel_order. The order confirms automatically after payment; unpaid orders expire after 72 hours. An order may carry a coupon code, which gives it the enterprise price.
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": {
"upload_id": "<upload_id>",
"format": "<format>",
"email": "<email>",
"address": "<address>"
},
"name": "create_order"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | No | The size to print, as an id from formats[].sizes in get_catalog, e.g. "a4" for a sticker, "8x8" for a storybook, "a5-folded" for a folded-card. Optional: without it the order takes the size the PDF pages match (within 2 mm), and fails with size_required when they match none. An id the format is not sold in fails with unknown_size. sticker-a3 and greeting-card-a5 come in one size and ignore it. We print the file at this size, scaling it when its pages are larger or smaller. | |
| Yes | Buyer email, e.g. priya@example.com; receives the Razorpay payment notification. | ||
| paper | No | paperback/hardcover: inside-page paper, 170gsm (standard, the default) or 300gsm (thick, costs more); every cover is 300gsm card; see price_table.paper_prices in get_catalog. flat-card/folded-card: standard (300 GSM coated card, the default) or laminated. Ignored for other formats. | |
| copies | No | Required for sticker (500 to 10,000 pieces, cheaper per piece from 1,000) and for flat-card/folded-card (10 to 5,000 cards, cheaper per card from 50, 250 and 500). Books and greeting-card-a5 take 1 to 20, sticker-a3 exactly 1, every copy the same price, and only they may leave it out for 1 copy. | |
| coupon | No | A coupon code (optional), e.g. "FRIEND25", for any product. It takes its percentage (discount_pct) off the retail price of that product, never below making cost (the enterprise price), and the amount and payment link reflect it. A coupon is for one product or for every product. Codes are 4 to 24 letters and digits, case does not matter. Check one first with GET /v1/coupons/{code}. Enterprise (invoiced) accounts already pay the enterprise price and cannot use coupons. A code that does not apply fails with coupon_not_found, coupon_expired, coupon_used_up, coupon_wrong_product or coupon_not_for_enterprise. | |
| finish | No | paperback/hardcover: the lamination, gloss (the default) or matte. flat-card/folded-card: matte (the default) or gloss, the coating of standard card or the lamination of laminated card. Ignored for other formats. | |
| format | Yes | paperback (staple-pinned) / hardcover (perfect bound): storybook, 24-64 pages including the 4-page 300gsm cover (page 1 front cover, page 2 inside front, last two pages inside back and back). sticker: custom-cut stickers, a one-page PDF at A3, A4 or A5 (portrait or landscape) with the artwork on a white or transparent background; we cut around the artwork. flat-card: a flat greeting card at A4, A5, A6, 8×8 in, 7×5 in or 6×4 in; page 1 front, page 2 back (optional). folded-card: a greeting card folded once, A4, A5 or A6 folded; the PDF page is the open spread (A3, A4 or A5 landscape), page 1 outside (back left, front right), page 2 inside (optional). sticker-a3: an A3 wall chart, an A3 print mounted on foam board, for platforms (exactly 1 page and 1 copy, 842×1191 pt). greeting-card-a5: one personalised folded A5 card for platforms, one A4-landscape sheet printed duplex (exactly 2 pages, 859×612 pt incl. 3 mm bleed). | |
| address | Yes | India shipping address (V1 ships within India only). | |
| pay_with | No | How the buyer will pay the Razorpay link (optional, default "bank"). "bank" is UPI or netbanking and adds Razorpay's 2% fee; "card" is cards, wallets, EMI or Pay Later and adds 3%. The payment link offers only those methods, and order.amount shows price_paise, payment_fee_paise and total_paise. get_catalog's online_payment lists the live fees. Invoiced (enterprise) orders ignore it. | bank |
| upload_id | Yes | upload_id of an uploaded PDF (any PDF the PUT accepted). | |
| client_reference | No | Your own order id, e.g. "shop-order-48213" (optional). For callers sending an API key it makes create_order idempotent: replaying the same reference returns the original order instead of printing a second copy (order_token is then null, it was shown at the original creation). A canceled, refunded or expired order releases its reference. Stored but not enforced for keyless callers. |