---
name: "purchasing_create_order"
area: "purchasing"
title: "Draft a purchase order"
price: "$0.01"
method: "POST"
url: "https://api.conecto.chat/v1/tools/purchasing_create_order"
mcp_server: "https://api.conecto.chat/mcp/purchasing"
auth: "Authorization: Bearer <conecto_sk_ key>"
docs_url: "https://conecto.chat/tools/purchasing/purchasing_create_order"
---

# Draft a purchase order (`purchasing_create_order`)

Drafts a purchase order to a supplier: lines (with Inventory SKUs if you like), currency, delivery date and stock location.

Draft an order to a supplier: lines with an optional Inventory sku (received stock then comes into Inventory at the line's unit cost), a description, quantity, unit cost and tax rate; the currency (default the supplier's), the expected delivery date and the stock location deliveries go to (default Main). A draft changes freely (purchasing_update_order) until it is sent; it has no number yet.

Price: $0.01 a call. A call that fails costs nothing.

## Use it when

The business is about to buy goods it wants to track until they arrive.

- For a bill for something bought without an order, use [purchasing_create_bill](https://conecto.chat/tools/purchasing/purchasing_create_bill.md).

## Say this to your agent

> Order 40 GN pans at 18.50 each from Nordstahl, plus 95 euros delivery, for early November.

## Inputs

| Name | Type | Required | Description | Allowed values | Default |
|---|---|---|---|---|---|
| `supplier` | integer or string | yes | A supplier_id, or the supplier's name. 1 to 200 characters, at least 1. |  |  |
| `lines` | array of objects | yes | 1 to 200 items. |  |  |
| `lines[].sku` | string | no | An Inventory item's SKU: received stock comes into Inventory. Its name is the default description. Up to 64 characters. |  |  |
| `lines[].description` | string | no | What is bought. Lines after the first print smaller, underneath. Up to 2,000 characters. |  |  |
| `lines[].quantity` | number or string | no | Default 1. Up to 6 decimals. Up to 24 characters. |  |  |
| `lines[].unit_cost` | number or string | yes, in each item of `lines` | The cost of one before tax, e.g. "12.50". Up to 24 characters. |  |  |
| `lines[].tax_rate` | number or string | no | Tax percent on the line, e.g. 19. Default 0. Up to 24 characters. |  |  |
| `currency` | string | no | ISO 4217, e.g. "EUR". Default: the supplier's. Matches ^[A-Za-z]{3}$. |  |  |
| `expected_on` | string | no | When delivery is expected, YYYY-MM-DD. Matches ^\\d{4}-\\d{2}-\\d{2}$. |  |  |
| `location` | string | no | An Inventory location for received stock. Default: Main. Up to 120 characters. |  |  |
| `notes` | string | no | Printed above the lines, e.g. delivery instructions. Up to 5,000 characters. |  |  |

## Example

Written for Hansen & Voss, a restaurant-equipment wholesaler in Hamburg with 60 staff.

MCP: call `purchasing_create_order` on the MCP server `https://api.conecto.chat/mcp/purchasing` with these arguments:

```json
{
  "supplier": "Nordstahl Küchentechnik GmbH",
  "expected_on": "2026-11-02",
  "notes": "Please deliver to the warehouse gate, Billbrookdeich 112.",
  "lines": [
    {
      "sku": "GN-PAN-11",
      "quantity": 40,
      "unit_cost": "18.50"
    },
    {
      "description": "Delivery",
      "unit_cost": "95.00"
    }
  ]
}
```

REST:

```bash
curl https://api.conecto.chat/v1/tools/purchasing_create_order \
  -H "Authorization: Bearer $CONECTO_KEY" \
  -H "Content-Type: application/json" \
  -d '{"supplier": "Nordstahl Küchentechnik GmbH", "expected_on": "2026-11-02", "notes": "Please deliver to the warehouse gate, Billbrookdeich 112.", "lines": [{"sku": "GN-PAN-11", "quantity": 40, "unit_cost": "18.50"}, {"description": "Delivery", "unit_cost": "95.00"}]}'
```

## Response

```json
{
  "call_id": "5f0c8a2e-3b7d-4c1e-9a64-2d8e1f7b0c93",
  "tool": "purchasing_create_order",
  "status": "succeeded",
  "replayed": false,
  "cost_usd": "$0.01",
  "balance_usd": "$19.75",
  "result": {
    "order": {
      "order_id": "6f2317c3-2513-44e8-aaed-282b2f32aa67",
      "number": null,
      "status": "draft",
      "supplier": {
        "supplier_id": 4101,
        "name": "Nordstahl Küchentechnik GmbH"
      },
      "currency": "EUR",
      "total": "835.00",
      "issue_date": null,
      "expected_on": "2026-11-02",
      "created_at": "2026-10-14T08:00:00+00:00",
      "lines": [
        {
          "line": 1,
          "sku": "GN-PAN-11",
          "description": "GN 1/1 pan, steel, 65 mm",
          "quantity": "40",
          "unit_cost": "18.5",
          "tax_rate": "0",
          "amount": "740.00",
          "tax": "0.00",
          "received": "0",
          "billed": "0",
          "to_receive": "40"
        },
        {
          "line": 2,
          "sku": null,
          "description": "Delivery",
          "quantity": "1",
          "unit_cost": "95",
          "tax_rate": "0",
          "amount": "95.00",
          "tax": "0.00",
          "received": "0",
          "billed": "0",
          "to_receive": "1"
        }
      ],
      "subtotal": "835.00",
      "tax": "0.00",
      "location": "Main",
      "notes": "Please deliver to the warehouse gate, Billbrookdeich 112.",
      "pdf": null,
      "bills": [],
      "sent_at": null,
      "closed_at": null,
      "history": [
        {
          "at": "2026-10-14T08:00:00+00:00",
          "event": "created",
          "detail": "",
          "by": "key 4101 (Pip)"
        }
      ]
    }
  }
}
```

`result`: order: the draft with its order_id, supplier, status, currency, lines, totals, expected date and location.

## Errors

| Code | Status | When | Fix |
|---|---|---|---|
| `not_found` | 404 | No supplier of the business has that supplier_id or name. | Call purchasing_list_suppliers, or add the supplier with purchasing_save_supplier. |
| `not_found` | 404 | A line's SKU is not an Inventory item, or the location does not exist. | Add the item with inventory_save_items, or leave the SKU out. |
| `archived` | 409 | The supplier, item, location or account is archived. | Bring the supplier back with purchasing_save_supplier archived: false, or use another one. |
| `invalid_input` | 400 | A date or currency is not valid. | Send dates like 2026-11-02 and currencies like EUR. |

The refusals every tool can give (401 key, 402 balance, 429 limits) are on the errors page: https://conecto.chat/docs/errors.md

## Related

- [purchasing_save_supplier](https://conecto.chat/tools/purchasing/purchasing_save_supplier.md): Adds a supplier or changes one: contact, email for orders, address, currency, payment terms and the book account their bills go to. $0.01 a call.
- [purchasing_list_suppliers](https://conecto.chat/tools/purchasing/purchasing_list_suppliers.md): Suppliers by name, each with what is owed to them on open bills and how many orders are open. Free up to 1,000,000 reads a month.
- [purchasing_save_supplier_items](https://conecto.chat/tools/purchasing/purchasing_save_supplier_items.md): Says which Inventory items a supplier sells: their code, cost, pack size, minimum order, lead time and a fixed reorder quantity. $0.005 per item saved.
- [purchasing_list_supplier_items](https://conecto.chat/tools/purchasing/purchasing_list_supplier_items.md): What suppliers sell: codes, costs, packs, minimums, lead times and the preferred supplier, for one supplier or one SKU. Free up to 1,000,000 reads a month.
- [purchasing_draft_reorders](https://conecto.chat/tools/purchasing/purchasing_draft_reorders.md): Drafts one purchase order per supplier for every item at or below its reorder point, counting what is already on order. $0.01 per draft order.
- [purchasing_update_order](https://conecto.chat/tools/purchasing/purchasing_update_order.md): Changes a draft order, or records it as sent without emailing it. $0.01 a call.
- [purchasing_send_order](https://conecto.chat/tools/purchasing/purchasing_send_order.md): Emails an order to the supplier with a link to its PDF; a draft takes the next number first. $0.10 a call.
- [purchasing_receive](https://conecto.chat/tools/purchasing/purchasing_receive.md): Records what arrived on a sent order; lines with a SKU come into Inventory at the ordered cost. $0.01 a call.
- [purchasing_close_order](https://conecto.chat/tools/purchasing/purchasing_close_order.md): Closes a sent order (stop waiting for the rest) or cancels one that received nothing. $0.01 a call.
- [purchasing_list_orders](https://conecto.chat/tools/purchasing/purchasing_list_orders.md): Purchase orders, newest first, by status, supplier or date; or one order in full. Free up to 1,000,000 reads a month.
- [purchasing_create_bill](https://conecto.chat/tools/purchasing/purchasing_create_bill.md): Records a bill a supplier sent, from its own lines or from an order, with its PDF; it is posted to the books. $0.01 a call.
- [purchasing_update_bill](https://conecto.chat/tools/purchasing/purchasing_update_bill.md): Adds a recorded bill's PDF if it has none, or changes its notes or due date; amounts and the PDF it has never change. $0.01 a call.
- [purchasing_pay_bill](https://conecto.chat/tools/purchasing/purchasing_pay_bill.md): Records money paid on a bill, or money back from the supplier; it is posted to the books. $0.01 a call.
- [purchasing_pay_bills](https://conecto.chat/tools/purchasing/purchasing_pay_bills.md): Pays several bills at once from one bank account, like Xero's batch payments, with the SEPA file to upload to the bank. $0.01 per bill paid.
- [purchasing_set_planned_date](https://conecto.chat/tools/purchasing/purchasing_set_planned_date.md): Plans the day the business will pay a bill, so the cash flow forecast takes the money out then rather than on the due date. Free.
- [purchasing_record_prepayment](https://conecto.chat/tools/purchasing/purchasing_record_prepayment.md): Records a deposit the business paid a supplier before their bill, like Xero's prepayments; it waits as a credit with them. $0.01 a call.
- [purchasing_use_credit](https://conecto.chat/tools/purchasing/purchasing_use_credit.md): Puts a credit with a supplier on their bill, like Xero's allocate credit, or records it coming back. $0.01 a call.
- [purchasing_list_credits](https://conecto.chat/tools/purchasing/purchasing_list_credits.md): Lists credits with suppliers, deposits and overpayments, with what is left on each. Free up to 1,000,000 reads a month.
- [purchasing_save_repeating_bill](https://conecto.chat/tools/purchasing/purchasing_save_repeating_bill.md): Records a supplier's bill again every so many weeks, months or years, with [Month] and [Year] filled in, like Xero's repeating bills. $0.01 a call.
- [purchasing_list_repeating_bills](https://conecto.chat/tools/purchasing/purchasing_list_repeating_bills.md): Lists the repeating bills: whose each is, how often, the next dates, and what each recorded. Free up to 1,000,000 reads a month.
- [purchasing_delete_repeating_bill](https://conecto.chat/tools/purchasing/purchasing_delete_repeating_bill.md): Stops a repeating bill for good; the bills it recorded stay. Free.
- [purchasing_void_bill](https://conecto.chat/tools/purchasing/purchasing_void_bill.md): Voids a bill entered by mistake; the books reverse it and its order can be billed again. $0.01 a call.
- [purchasing_list_bills](https://conecto.chat/tools/purchasing/purchasing_list_bills.md): Supplier bills by due date, filtered by status, supplier, order or dates; or one bill in full. Free up to 1,000,000 reads a month.
- [purchasing_report](https://conecto.chat/tools/purchasing/purchasing_report.md): Aged payables (what is owed to each supplier by how late) or spend (what each supplier billed and was paid). Free up to 1,000,000 reads a month.
