Sample JSON and curl
{
"customer": {
"name": "Hargreaves & Lowe LLP",
"email": "accounts@hargreaves.example",
"address": {
"line1": "12 Fleet Street",
"city": "London",
"postal_code": "EC4Y 1AA",
"country": "GB"
}
},
"line_items": [
{
"row_type": "header",
"description": "Phase 1 — Discovery"
},
{
"description": "Stakeholder interviews",
"quantity": "6",
"unit": "hours",
"unit_price": "120.00",
"tax_rate": "20"
},
{
"description": "Research report",
"quantity": "1",
"unit_price": "900.00",
"tax_rate": "20"
},
{
"row_type": "subtotal",
"description": "Phase 1 subtotal"
},
{
"row_type": "header",
"description": "Phase 2 — Delivery"
},
{
"description": "Workshop facilitation",
"quantity": "2",
"unit": "days",
"unit_price": "1100.00",
"tax_rate": "20"
},
{
"row_type": "subtotal",
"description": "Phase 2 subtotal"
}
],
"currency": "GBP",
"locale": "en-GB",
"paper_size": "A4",
"due_terms": "net_30",
"template": "classic",
"po_number": "PO-55120",
"issue": true
}curl -X POST 'https://www.ashdocs.com/api/v1/invoices' \
-H 'X-API-Key: ash_live_...' \
-H 'Content-Type: application/json' \
-d '{"customer":{"name":"Hargreaves & Lowe LLP","email":"accounts@hargreaves.example","address":{"line1":"12 Fleet Street","city":"London","postal_code":"EC4Y 1AA","country":"GB"}},"line_items":[{"row_type":"header","description":"Phase 1 — Discovery"},{"description":"Stakeholder interviews","quantity":"6","unit":"hours","unit_price":"120.00","tax_rate":"20"},{"description":"Research report","quantity":"1","unit_price":"900.00","tax_rate":"20"},{"row_type":"subtotal","description":"Phase 1 subtotal"},{"row_type":"header","description":"Phase 2 — Delivery"},{"description":"Workshop facilitation","quantity":"2","unit":"days","unit_price":"1100.00","tax_rate":"20"},{"row_type":"subtotal","description":"Phase 2 subtotal"}],"currency":"GBP","locale":"en-GB","paper_size":"A4","due_terms":"net_30","template":"classic","po_number":"PO-55120","issue":true}'