E-invoicing API
Numbered VAT invoices from your own data, with VAT numbers, per-line rates and a VAT summary, created by one API request.
ASHDOCS is an e-invoicing API in the plain sense: your system sends invoice data over HTTPS and gets back a numbered VAT invoice as a PDF, a hosted web page and, if you ask, an email to the customer. Seller and customer VAT numbers, a VAT rate on every line, VAT-inclusive or exclusive pricing and a VAT summary by rate are all fields in the request.
What it does not do yet is exchange structured e-invoices over a network. VAT-ready invoices by API work today; e-invoicing formats such as Peppol and UBL are on the roadmap and not shipped.
curl -X POST https://www.ashdocs.com/api/v1/invoices \
-H "X-API-Key: ash_test_..." \
-H "Content-Type: application/json" \
-d '{
"customer": {
"name": "Northwind Studio Ltd",
"email": "accounts@northwind.example",
"address": { "line1": "12 Market Street", "city": "Leeds", "postal_code": "LS1 6DT", "country": "GB" },
"tax_id": "GB123456789"
},
"line_items": [
{ "description": "Consulting, days", "quantity": "2", "unit_price": "650.00", "tax_rate": "20" },
{ "description": "Workshop venue hire", "quantity": "1", "unit_price": "400.00", "tax_rate": "20" }
],
"currency": "GBP",
"locale": "en-GB",
"paper_size": "A4",
"due_terms": "net_30",
"issue": true,
"send": { "channels": [{ "type": "email" }] }
}'const res = await fetch("https://www.ashdocs.com/api/v1/invoices", {
method: "POST",
headers: { "X-API-Key": "ash_test_...", "Content-Type": "application/json" },
body: JSON.stringify({
customer: {
name: "Northwind Studio Ltd",
email: "accounts@northwind.example",
address: { line1: "12 Market Street", city: "Leeds", postal_code: "LS1 6DT", country: "GB" },
tax_id: "GB123456789",
},
line_items: [
{ description: "Consulting, days", quantity: "2", unit_price: "650.00", tax_rate: "20" },
{ description: "Workshop venue hire", quantity: "1", unit_price: "400.00", tax_rate: "20" },
],
currency: "GBP",
locale: "en-GB",
paper_size: "A4",
due_terms: "net_30",
issue: true,
send: { channels: [{ type: "email" }] },
}),
});
const invoice = await res.json();
console.log(invoice.number, invoice.totals.tax_summary);import requests
r = requests.post(
"https://www.ashdocs.com/api/v1/invoices",
headers={"X-API-Key": "ash_test_..."},
json={
"customer": {
"name": "Northwind Studio Ltd",
"email": "accounts@northwind.example",
"address": {"line1": "12 Market Street", "city": "Leeds", "postal_code": "LS1 6DT", "country": "GB"},
"tax_id": "GB123456789",
},
"line_items": [
{"description": "Consulting, days", "quantity": "2", "unit_price": "650.00", "tax_rate": "20"},
{"description": "Workshop venue hire", "quantity": "1", "unit_price": "400.00", "tax_rate": "20"},
],
"currency": "GBP",
"locale": "en-GB",
"paper_size": "A4",
"due_terms": "net_30",
"issue": True,
"send": {"channels": [{"type": "email"}]},
},
)
invoice = r.json()
print(invoice["number"], invoice["totals"]["tax_summary"]){
"id": "inv_0c5d8e2b7f1a4d9c8e33",
"kind": "invoice",
"status": "issued",
"number": "INV-0001",
"customer": {
"name": "Northwind Studio Ltd",
"tax_id": "GB123456789",
"id": "cus_6a1f3b9d2e7c4a5b8f10"
},
"currency": "GBP",
"locale": "en-GB",
"paper_size": "A4",
"issue_date": "2026-10-09",
"due_date": "2026-11-08",
"tax_mode": "exclusive",
"totals": {
"subtotal_formatted": "£1,700.00",
"tax_formatted": "£340.00",
"total_formatted": "£2,040.00",
"tax_summary": [
{ "name": "Tax", "pct": "20", "taxable_formatted": "£1,700.00", "tax_formatted": "£340.00" }
]
},
"pdf_url": "https://api.ashdocs.com/api/v1/invoices/inv_0c5d8e2b7f1a4d9c8e33/pdf",
"hosted_url": "https://api.ashdocs.com/i/<token>",
"credits_cost": 0,
"testing": true
}Response trimmed; values illustrative. Use a saved tax rate (tax_rate_id) to have the summary row read "VAT 20%" instead of "Tax 20%".
VAT on every line
Set tax_rate per line, or point at a saved rate named VAT with tax_rate_id. Prices can be VAT-exclusive or VAT-inclusive, and totals carry a summary by rate.
Numbers that never repeat
Invoices, quotes and credit notes each draw from their own sequence when issued, with your prefix, padding and an optional yearly reset. Voided documents keep their number.
Records your accountant can use
Export invoices as CSV, download any set of PDFs as a ZIP, and correct an issued invoice with a credit note rather than editing it.
How an e-invoicing API fits your billing
Your application already knows who bought what. Instead of rebuilding invoice layouts, VAT maths and numbering, it posts the customer and line items to POST /api/v1/invoices. With "issue": true the invoice is numbered and rendered; with send it is emailed. The response has the number, the totals in minor units and formatted, a pdf_url and a hosted_url where the customer can view the invoice. The Pay button shows on the hosted invoice page when Stripe or Razorpay is connected.
Seller details, including your VAT registration number, live in a branding profile (business.name, business.address, business.tax_id) so you set them once. The customer's VAT number goes in customer.tax_id. Both print with the label you choose: the tax_id label can read "VAT reg. no." and the tax column can read "VAT".
tax_mode: "inclusive"treats unit prices as VAT-inclusive and labels the subtotal "Subtotal (excl. tax)".roundingin settings:per_line(default) orper_total.- Tax rates can have components (for example two parts that add up to the headline rate).
- Any ISO 4217 currency;
localesuch as en-GB controls formatting; paper is A4 or Letter.
VAT invoice fields and where they live
HMRC's VAT Notice 700/21 lists what a full VAT invoice must show. Each item maps to a field you send or that ASHDOCS fills in; three items have no dedicated field, and the table says what to do instead.
| Required on a full VAT invoice | ASHDOCS field |
|---|---|
| Unique sequential number | number, assigned on issue from your numbering settings |
| Date of issue | issue_date (today in your timezone if left out) |
| Time of supply, where different from the issue date | No dedicated field; state it in notes |
| Supplier name, address and VAT registration number | Branding profile: business.name, business.address, business.tax_id |
| Customer name and address | customer.name, customer.address |
| Description of the goods or services | line_items[].description |
| Quantity, VAT rate and amount excluding VAT per line | line_items[].quantity, tax_rate or tax_rate_id, amount_formatted |
| Unit price | line_items[].unit_price |
| Total excluding VAT | totals.subtotal_formatted (less any discounts shown) |
| Rate of any cash discount offered | No dedicated field; state it in terms |
| Total VAT, in sterling | totals.tax_formatted and totals.tax_summary; on a non-GBP invoice ASHDOCS does not convert, so add the sterling figure in notes |
Where UK e-invoicing is heading
In its consultation response, updated 26 November 2025, the government said the UK will introduce mandatory e-invoicing for all VAT invoices from 2029, using a decentralised model, with standards still to be developed. HMRC's Transformation Roadmap update of 27 July 2026 gives April 2029 as the start and says an implementation roadmap will be published at Budget 2026.
ASHDOCS today produces VAT invoices as PDFs and hosted pages, not structured e-invoices exchanged over a network. Peppol and UBL output is planned but has not shipped yet. Because your invoices already hold structured data (parties, VAT numbers, lines, rates and totals) in ASHDOCS, that data is what a future structured format would be built from.
Frequently asked questions
How does an e-invoicing API work?
Your software sends invoice data (seller, customer, line items, VAT rates) to the API over HTTPS, and the service returns a finished invoice instead of you building it. With ASHDOCS one POST /api/v1/invoices request numbers the invoice, calculates VAT, renders the PDF, publishes a hosted page and can email the customer. Sending structured e-invoices in a format such as Peppol or UBL is not available yet.
Is e-invoicing mandatory in the UK?
Not yet. GOV.UK states that the government will mandate e-invoicing for all VAT invoices from April 2029, and that HMRC and the Department for Business and Trade will publish an implementation roadmap at Budget 2026 (HMRC Transformation Roadmap update, 27 July 2026). The government's November 2025 consultation response confirmed the 2029 mandate and said the standards are still to be developed.
Which fields does a VAT invoice need?
According to HMRC's VAT Notice 700/21, a full VAT invoice shows a unique sequential number, the time of supply, the date of issue, the supplier's name, address and VAT registration number, the customer's name and address, a description of the goods or services, and for each line the quantity, VAT rate and amount excluding VAT, plus the total excluding VAT, the rate of any cash discount, the total VAT in sterling and the unit price. In ASHDOCS these are held by number, issue_date, the branding profile's business block (with business.tax_id), customer, line_items and totals; a separate time of supply or a cash discount rate goes in notes or terms.
Can I export invoices for my accountant?
Yes. GET /api/v1/invoices/export.csv exports up to 10,000 invoices with number, kind, status, customer, currency, issue date, due date, total, balance and created date, filterable by status, kind, customer and due date. POST /api/v1/invoices/bulk/zip downloads up to 200 invoice PDFs in one ZIP; per-rate VAT totals are in each invoice's totals.tax_summary from the API.
Plans
- 100 credits per month
- 1 seat
- No webhooks
- 1,500 credits per month
- 1 seat
- Webhooks
- 10,000 credits per month
- 3 seats
- Webhooks
- 30,000 credits per month
- 5 seats
- Webhooks
- 100,000 credits per month
- 10 seats
- Webhooks
Test keys are free, never expire and never use credits; plan rate limits apply. Webhooks are on paid plans. Issuing an invoice uses 1 credit. No per-seat fees. See full pricing.