# ASHDOCS Invoicing API > Create, send and track invoices from JSON. Base URL: https://www.ashdocs.com/api/v1. Authenticate with the X-API-Key header. > Test-mode keys create watermarked documents that use no credits. POST requests accept an Idempotency-Key header. ## Create, issue and email an invoice POST https://www.ashdocs.com/api/v1/invoices { "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 response carries id, number, status, totals (minor units and formatted), pdf_url and hosted_url. ## Endpoints - GET /api/v1/branding: List branding profiles - POST /api/v1/branding: Create a branding profile - POST /api/v1/branding/logo: Upload a logo (PNG, JPEG or SVG, at most 2 MB) - DELETE /api/v1/branding/{branding_id}: Delete a branding profile - 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) - GET /api/v1/channels: Channel 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/customers: List or search customers - POST /api/v1/customers: Create a customer - DELETE /api/v1/customers/{customer_id}: Delete a customer - GET /api/v1/customers/{customer_id}: Get a customer - PATCH /api/v1/customers/{customer_id}: Edit a customer - GET /api/v1/invoice-templates: Template gallery with sample payloads and the request schema - GET /api/v1/invoice-templates/{template_id}/thumbnail.png: Template thumbnail - GET /api/v1/invoices: List invoices (cursor pagination) - POST /api/v1/invoices: Create (and optionally issue and send) an invoice - POST /api/v1/invoices/batch: Create 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}/zip: Download the batch ZIP (PDFs + manifest.csv) - POST /api/v1/invoices/bulk/{action}: Bulk send, remind or download as ZIP - GET /api/v1/invoices/export.csv: Export invoices as CSV - POST /api/v1/invoices/preview: Render a stateless, watermarked preview (0 credits) - DELETE /api/v1/invoices/{invoice_id}: Delete a draft - 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 - POST /api/v1/invoices/{invoice_id}/approve: Approve a draft awaiting approval and issue it - POST /api/v1/invoices/{invoice_id}/attachments: Attach a PDF, PNG or JPEG - DELETE /api/v1/invoices/{invoice_id}/attachments/{index}: Remove an attachment - POST /api/v1/invoices/{invoice_id}/convert: Convert an accepted quote into an issued invoice - POST /api/v1/invoices/{invoice_id}/credit-note: Create a credit note draft against an invoice - GET /api/v1/invoices/{invoice_id}/deliveries: Delivery attempts - POST /api/v1/invoices/{invoice_id}/duplicate: Copy into a new draft - GET /api/v1/invoices/{invoice_id}/events: Event timeline - POST /api/v1/invoices/{invoice_id}/issue: Issue a draft (renders the PDF; debits one credit) - POST /api/v1/invoices/{invoice_id}/payments: Record a manual payment - GET /api/v1/invoices/{invoice_id}/pdf: Download the PDF (202 while it is being rendered) - POST /api/v1/invoices/{invoice_id}/remind: Send a payment reminder now - POST /api/v1/invoices/{invoice_id}/send: Send through one or more channels (optionally scheduled) - POST /api/v1/invoices/{invoice_id}/void: Void an issued document (keeps its number) - GET /api/v1/invoicing/dead-letter: Jobs that ran out of retries - POST /api/v1/invoicing/dead-letter/{dead_letter_id}/retry: Retry a dead-lettered job - GET /api/v1/invoicing/events: Account event feed (cursor pagination) - GET /api/v1/invoicing/integrations: Integrations: 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/import: Turn unbilled Harvest time for one client into an invoice - DELETE /api/v1/invoicing/integrations/{provider}: Remove an integration - PUT /api/v1/invoicing/integrations/{provider}: Configure an integration (config, secrets, enabled) - GET /api/v1/invoicing/integrations/{provider}/log: Recent integration activity - POST /api/v1/invoicing/integrations/{provider}/test: Send a test alert or check the credentials - GET /api/v1/items: List or search saved items - POST /api/v1/items: Create a saved item - DELETE /api/v1/items/{item_id}: Delete a saved item - PATCH /api/v1/items/{item_id}: Edit a saved item - GET /api/v1/recurring-invoices: List recurring profiles - POST /api/v1/recurring-invoices: Create a recurring profile (RRULE) - DELETE /api/v1/recurring-invoices/{profile_id}: Delete a recurring profile - 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 - GET /api/v1/recurring-invoices/{profile_id}/next-runs: The next scheduled run times - GET /api/v1/reminder-rules: List reminder rules - POST /api/v1/reminder-rules: Create a reminder rule (account-wide or per invoice) - DELETE /api/v1/reminder-rules/{rule_id}: Delete a reminder rule - PATCH /api/v1/reminder-rules/{rule_id}: Edit a reminder rule - GET /api/v1/settings: Invoicing settings (mints the Stripe webhook URL on first read) - PATCH /api/v1/settings: Edit invoicing settings - GET /api/v1/settings/next-number: Peek at the next number (read-only) - POST /api/v1/settings/stripe-webhook: Store the Stripe webhook signing secret (whsec_...) - GET /api/v1/tax-rates: List tax rates - POST /api/v1/tax-rates: Create a tax rate (optionally with components) - DELETE /api/v1/tax-rates/{rate_id}: Delete a tax rate - PATCH /api/v1/tax-rates/{rate_id}: Edit a tax rate ## More - Reference: https://www.ashdocs.com/docs/invoicing - Designs: https://www.ashdocs.com/templates/invoices