# Purchase order: instructions for an AI assistant

Your user wants a purchase order as a PDF. Pressa fills its purchase order template with the details you collect and returns a link to the finished PDF. It needs no install, and no account or API key for up to 3 PDFs a day.

Every design takes exactly the same details: a clean standard layout, a bold colour band, a classic serif layout, a minimal layout and a structured corporate grid with a monogram. They match the invoice, packing slip and delivery note designs of the same name, so your documents look like one set. Amounts, tax and the total are calculated from quantity, unit price and tax rate.

Preview: https://pressa.dev/template-previews/purchase-order.png

## Designs

Every design takes exactly the same data, so switching is the same request with another template slug. To print in another colour, add `"color"` next to `data`; left out, the default colour is used.

- `purchase-order` - Standard (use this one unless your user asks for another): A purchase order with vendor and ship-to blocks, an itemised table, and totals and tax worked out for you. Colours: blue, navy, teal, burgundy, graphite (default blue). Preview: https://pressa.dev/template-previews/purchase-order.png
- `bold-purchase-order` - Bold: A purchase order with your business name in a bold colour band and a colour header row. Colours: blue, navy, teal, burgundy, graphite (default blue). Preview: https://pressa.dev/template-previews/bold-purchase-order.png
- `classic-purchase-order` - Classic: A traditional serif purchase order with small-caps labels and ruled lines. Colours: navy, burgundy, forest, teal, graphite (default navy). Preview: https://pressa.dev/template-previews/classic-purchase-order.png
- `minimal-purchase-order` - Minimal: A quiet, airy purchase order in Helvetica with hairline rules and one accent colour. Colours: teal, blue, burgundy, forest, graphite (default teal). Preview: https://pressa.dev/template-previews/minimal-purchase-order.png
- `corporate-purchase-order` - Corporate: A structured purchase order with a top band, a monogram and a fully ruled grid. Colours: graphite, navy, teal, burgundy, forest (default graphite). Preview: https://pressa.dev/template-previews/corporate-purchase-order.png

## 1. Collect the details

Send quantity, unit_price and tax_rate as numbers (tax_rate in percent, e.g. 6); the template computes every amount, so never send totals. currency is a code such as USD, EUR or GBP. sku may be empty. Do not invent prices, vendors, addresses or who authorized the order; ask the user.

Ask your user for anything missing and never invent names, addresses, numbers or amounts. Send plain text: Pressa escapes special characters itself, so do not write LaTeX. Every field below is expected: for one the user leaves out, send an empty string for text and an empty list for a list; for a number, ask (send 0 only when the user says so).

Fields:

- `buyer` - Your business:
  - `buyer.name` (text)
  - `buyer.address` (text)
  - `buyer.email` (text)
- `po_number` - PO number (text)
- `date` (text)
- `vendor` - Vendor:
  - `vendor.name` (text)
  - `vendor.address` (text)
- `ship_to` - Ship to:
  - `ship_to.name` (text)
  - `ship_to.address` (text)
- `delivery_date` - Deliver by (text)
- `payment_terms` (text)
- `currency` (text)
- `tax_rate` - Tax rate (%) (number)
- `items`: a list, each entry with:
  - `sku` - Item no. (text)
  - `description` (text)
  - `quantity` (number)
  - `unit_price` (number)
- `notes` (text)
- `authorized_by` - Authorized by (text)

A complete example of the data:

```json
{
  "buyer": {
    "name": "Harbor Street Cafe",
    "address": "77 Harbor Street, Charleston, SC 29401",
    "email": "purchasing@harborstreet.example.com"
  },
  "po_number": "PO-2026-0417",
  "date": "October 6, 2026",
  "vendor": {
    "name": "Fernwood Supply Co.",
    "address": "220 Mill Road, Asheville, NC 28801"
  },
  "ship_to": {
    "name": "Harbor Street Cafe, receiving",
    "address": "Rear entrance, 77 Harbor Street, Charleston, SC 29401"
  },
  "delivery_date": "October 20, 2026",
  "payment_terms": "Net 30 from delivery",
  "currency": "USD",
  "tax_rate": 6,
  "items": [
    {
      "sku": "MUG-12-WHT",
      "description": "Stoneware mug, 12 oz, white",
      "quantity": 24,
      "unit_price": 7.5
    },
    {
      "sku": "MUG-12-SAG",
      "description": "Stoneware mug, 12 oz, sage",
      "quantity": 24,
      "unit_price": 7.5
    },
    {
      "sku": "PLT-8-WHT",
      "description": "Side plate, 8 in, white",
      "quantity": 36,
      "unit_price": 5.25
    },
    {
      "sku": "SAU-6-WHT",
      "description": "Saucer, 6 in, white",
      "quantity": 48,
      "unit_price": 3.4
    },
    {
      "sku": "CRF-1L",
      "description": "Glass carafe, 1 litre",
      "quantity": 6,
      "unit_price": 18
    }
  ],
  "notes": "Deliver between 7 and 10 am. Partial deliveries accepted. Quote the PO number on the invoice and every delivery note.",
  "authorized_by": "Dana Brooks, Operations Manager"
}
```

## 2. Make the PDF: use the first option you can

**A. You can send HTTP requests** (Claude Code, Cursor, Codex, a script, n8n). Send the details as JSON under `data` (and `color` if your user picked one). Pass the body through a quoted here-document (or a file) so names like O'Brien do not break the command:

```bash
curl -X POST https://api.pressa.dev/api/v1/public_templates/purchase-order/render \
  -H "Content-Type: application/json" \
  -d @- <<'JSON'
{"color": "blue", "data": { ...same shape as the example above... }}
JSON
```

The response has `pdf_url`. Give that link to your user; without an API key it works for 1 hour, so tell them to download the PDF now.

**B. Pressa is connected to you as an MCP server.** Call the tool `render_public_template` with `template: "purchase-order"` and `data` shaped like the example (and `color` for another colour), then give your user the `pdf_url`. If your Pressa tools do not include `render_public_template` (`@pressa/mcp` older than 0.10.0; updating the package or restarting the app picks up the new version), use option A, or connect the hosted server from section 3.

**C. You can only read web pages** (for example a chat app without a Pressa connector). You cannot make the PDF yourself through Pressa yet. Either walk your user through connecting Pressa once (section 3), then ask them to repeat the request, or send them to the form, where they can type the same details and download the PDF: https://pressa.dev/templates/purchase-order

## 3. Connecting Pressa (one time, no account needed)

Explain the steps for the app your user is in, in plain words:

- **Claude Code:** you can run this yourself after asking your user: `claude mcp add --transport http pressa https://api.pressa.dev/mcp`
- **Cursor, Windsurf and other MCP clients:** add a remote MCP server named `pressa` with the URL `https://api.pressa.dev/mcp`.
- **claude.ai or the Claude desktop app:** your user opens Settings, then Connectors, chooses to add a custom connector, names it Pressa and pastes `https://api.pressa.dev/mcp`. Then they start a new chat and ask again.
- **ChatGPT:** custom connectors are only available on some paid plans, through developer mode in the connector settings, and menus change between versions. If your user has it, they add a connector with the URL `https://api.pressa.dev/mcp`; otherwise send them to the form: https://pressa.dev/templates/purchase-order

## 4. If something goes wrong

- `anonymous_quota_exhausted`: the 3 free PDFs for today are used. A free account at https://pressa.dev/users/sign_up (no card) gives 50 a month, used through an API key. Where the key goes depends on how you reach Pressa: with HTTP requests, send it as the header `Authorization: Bearer <key>` (from an environment variable your user sets, never pasted into a chat); in Claude Code, your user re-adds the server in their own terminal with `--header "Authorization: Bearer $PRESSA_API_KEY"` (again, never have them paste the key into the chat); in claude.ai a key cannot be used at all, so suggest the form at https://pressa.dev/templates/purchase-order (signed-in visitors get their account's PDFs there) or Claude Code.
- `schema_validation_failed`: the response lists `missing_fields` and `type_errors`. Fix the data and send it again yourself.
- `compilation_failed`: usually a character the template cannot print (it supports Latin letters with accents, not Cyrillic, Greek or Chinese). Tell your user which value to change.

## Other templates

Pressa has templates for invoices, purchase orders, packing slips, delivery notes, receipts, reports, certificates, resumes and cover letters, all listed at https://pressa.dev/templates and by `GET https://api.pressa.dev/api/v1/public_templates`. Each has its own instructions at `https://pressa.dev/templates/<slug>/agent.md`.
