/// INVOICING API

Invoicing API reference

The Invoice API reference: endpoints for creating, issuing and sending invoices, quotes and credit notes. For what the API does and how billing works, see the Invoice API overview.

Authenticate with your API key in the X-API-Key header. Test-mode keys create watermarked documents that use no credits.

Send an Idempotency-Key header on POST requests to make retries safe.

Every invoice event is also delivered to your webhooks, signed as usual. A plain-text summary for language models is at /docs/invoicing/llms.txt.

curl -X POST 'https://www.ashdocs.com/api/v1/invoices' \
  -H 'X-API-Key: ash_live_...' \
  -H 'Content-Type: application/json' \
  -d '{"currency":"USD","customer":{"email":"ap@acme.com","name":"Acme Inc"},"due_terms":"net_30","issue":true,"line_items":[{"description":"Consulting","quantity":"3","tax_rate":"8.25","unit_price":"150.00"}],"send":{"channels":[{"type":"email"}]},"template":"clean"}'

The Invoicing API creates an invoice and can issue and send it in the same call. It covers the rest of the invoice's life too: editing drafts, approval, converting an accepted quote into an invoice, credit notes, voiding an issued document (it keeps its number), recording manual payments, reminders and recurring profiles. It also manages customers, saved items, tax rates, branding profiles and invoicing settings, creates invoices in batches from JSON rows or CSV, exports invoices as CSV, renders a watermarked preview that uses 0 credits, and configures integrations. Issuing a draft renders its PDF and debits one credit.

Endpoints

MethodPathWhat it does
GET/api/v1/brandingList branding profiles
POST/api/v1/brandingCreate a branding profile
POST/api/v1/branding/logoUpload a logo (PNG, JPEG or SVG, at most 2 MB)
GET/api/v1/branding/{branding_id}Get a branding profile
PATCH/api/v1/branding/{branding_id}Edit a branding profile (colours, font, layout, labels, sections)
DELETE/api/v1/branding/{branding_id}Delete a branding profile
GET/api/v1/channelsChannel bindings and which channels are available
DELETE/api/v1/channels/{binding_id}Remove a channel binding
POST/api/v1/channels/{channel}Bind an inbound channel
GET/api/v1/customersList or search customers
POST/api/v1/customersCreate a customer
GET/api/v1/customers/{customer_id}Get a customer
PATCH/api/v1/customers/{customer_id}Edit a customer
DELETE/api/v1/customers/{customer_id}Delete a customer
GET/api/v1/invoice-templatesTemplate gallery with sample payloads and the request schema
GET/api/v1/invoice-templates/{template_id}/thumbnail.pngTemplate thumbnail
GET/api/v1/invoicesList invoices (cursor pagination)
POST/api/v1/invoicesCreate (and optionally issue and send) an invoice
POST/api/v1/invoices/batchCreate invoices in a batch (JSON rows or CSV + mapping)
GET/api/v1/invoices/batch/{batch_id}Batch status and manifest
GET/api/v1/invoices/batch/{batch_id}/zipDownload the batch ZIP (PDFs + manifest.csv)
POST/api/v1/invoices/bulk/{action}Bulk send, remind or download as ZIP
GET/api/v1/invoices/export.csvExport invoices as CSV
POST/api/v1/invoices/previewRender a stateless, watermarked preview (0 credits)
GET/api/v1/invoices/{invoice_id}Get one invoice
PATCH/api/v1/invoices/{invoice_id}Edit a draft, or the editable fields of an issued invoice
DELETE/api/v1/invoices/{invoice_id}Delete a draft
POST/api/v1/invoices/{invoice_id}/approveApprove a draft awaiting approval and issue it
POST/api/v1/invoices/{invoice_id}/attachmentsAttach a PDF, PNG or JPEG
DELETE/api/v1/invoices/{invoice_id}/attachments/{index}Remove an attachment
POST/api/v1/invoices/{invoice_id}/convertConvert an accepted quote into an issued invoice
POST/api/v1/invoices/{invoice_id}/credit-noteCreate a credit note draft against an invoice
GET/api/v1/invoices/{invoice_id}/deliveriesDelivery attempts
POST/api/v1/invoices/{invoice_id}/duplicateCopy into a new draft
GET/api/v1/invoices/{invoice_id}/eventsEvent timeline
POST/api/v1/invoices/{invoice_id}/issueIssue a draft (renders the PDF; debits one credit)
POST/api/v1/invoices/{invoice_id}/paymentsRecord a manual payment
GET/api/v1/invoices/{invoice_id}/pdfDownload the PDF (202 while it is being rendered)
POST/api/v1/invoices/{invoice_id}/remindSend a payment reminder now
POST/api/v1/invoices/{invoice_id}/sendSend through one or more channels (optionally scheduled)
POST/api/v1/invoices/{invoice_id}/voidVoid an issued document (keeps its number)
GET/api/v1/invoicing/dead-letterJobs that ran out of retries
POST/api/v1/invoicing/dead-letter/{dead_letter_id}/retryRetry a dead-lettered job
GET/api/v1/invoicing/eventsAccount event feed (cursor pagination)
GET/api/v1/invoicing/integrationsIntegrations: catalogue, configuration and connection status
POST/api/v1/invoicing/integrations/avalara/calculate/{invoice_id}Ask Avalara AvaTax for the tax on a draft and apply the rates to its lines
POST/api/v1/invoicing/integrations/harvest/importTurn unbilled Harvest time for one client into an invoice
PUT/api/v1/invoicing/integrations/{provider}Configure an integration (config, secrets, enabled)
DELETE/api/v1/invoicing/integrations/{provider}Remove an integration
GET/api/v1/invoicing/integrations/{provider}/logRecent integration activity
POST/api/v1/invoicing/integrations/{provider}/testSend a test alert or check the credentials
GET/api/v1/itemsList or search saved items
POST/api/v1/itemsCreate a saved item
PATCH/api/v1/items/{item_id}Edit a saved item
DELETE/api/v1/items/{item_id}Delete a saved item
GET/api/v1/recurring-invoicesList recurring profiles
POST/api/v1/recurring-invoicesCreate a recurring profile (RRULE)
GET/api/v1/recurring-invoices/{profile_id}Get a recurring profile
PATCH/api/v1/recurring-invoices/{profile_id}Pause, resume or edit a recurring profile
DELETE/api/v1/recurring-invoices/{profile_id}Delete a recurring profile
GET/api/v1/recurring-invoices/{profile_id}/next-runsThe next scheduled run times
GET/api/v1/reminder-rulesList reminder rules
POST/api/v1/reminder-rulesCreate a reminder rule (account-wide or per invoice)
PATCH/api/v1/reminder-rules/{rule_id}Edit a reminder rule
DELETE/api/v1/reminder-rules/{rule_id}Delete a reminder rule
GET/api/v1/settingsInvoicing settings (mints the Stripe webhook URL on first read)
PATCH/api/v1/settingsEdit invoicing settings
GET/api/v1/settings/next-numberPeek at the next number (read-only)
POST/api/v1/settings/stripe-webhookStore the Stripe webhook signing secret (whsec_...)
GET/api/v1/tax-ratesList tax rates
POST/api/v1/tax-ratesCreate a tax rate (optionally with components)
PATCH/api/v1/tax-rates/{rate_id}Edit a tax rate
DELETE/api/v1/tax-rates/{rate_id}Delete a tax rate

Loading API reference…