Create bill
Enter a supplier invoice as a bill with its lines and tax.
POST https://cotlet.dev/api/v1/myob/suppliers/{supplier_id}/bills
write Confirm
Creates an open bill and returns its number, tax, total and balance due. Pass the supplier's own invoice number so a later call to list_bills can spot a duplicate. Layout service takes free-text lines and item takes item codes. The bill changes your books and your payables, so it asks first. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| supplier_id string required | string | Supplier card ID, e.g. SUP000004. |
| supplier_invoice_number string | string | The number on the supplier's own invoice. |
| date date | date | Bill date. Default: today. |
| due_date date | date | Due date. Default: from the supplier terms. |
| layout enum | enum | service or item. Default: service. |
| lines array required | array | Objects with description or item_code, amount and tax_code, e.g. GST. |
| tax_inclusive boolean | boolean | true if amounts include tax. Default: false. |
Request
curl -X POST https://cotlet.dev/api/v1/myob/suppliers/SUP000004/bills \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"supplier_invoice_number":"INV-8841","date":"2026-10-10","lines":[{"description":"Office rent, October","amount":2000,"tax_code":"GST"}]}' result = client.call("myob", "create_bill", {"supplier_id":"SUP000004","supplier_invoice_number":"INV-8841","date":"2026-10-10","lines":[{"description":"Office rent, October","amount":2000,"tax_code":"GST"}]}) const result = await cotlet.call('myob', 'create_bill', {"supplier_id":"SUP000004","supplier_invoice_number":"INV-8841","date":"2026-10-10","lines":[{"description":"Office rent, October","amount":2000,"tax_code":"GST"}]}); cotlet call myob create_bill --data '{"supplier_id":"SUP000004","supplier_invoice_number":"INV-8841","date":"2026-10-10","lines":[{"description":"Office rent, October","amount":2000,"tax_code":"GST"}]}' Example response
{
"bill_number": "00000311",
"supplier_id": "SUP000004",
"supplier": "Bayside Property",
"supplier_invoice_number": "INV-8841",
"status": "open",
"date": "2026-10-10",
"due_date": "2026-11-09",
"subtotal": 2000,
"tax": 200,
"total": 2200,
"balance_due": 2200
}