Skip to main content
POST
/
invoices
Create or update an invoice draft
curl --request POST \
  --url https://api.app.lastaccountingcompany.com/portal/invoices \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "customer": {
    "name": "<string>",
    "id": "<string>",
    "business_id": "<string>",
    "vat_number": "<string>",
    "address_line1": "<string>",
    "postal_code": "<string>",
    "city": "<string>",
    "country_code": "<string>",
    "email": "<string>",
    "einvoice_address": "<string>",
    "einvoice_operator": "<string>",
    "default_payment_terms_days": 123,
    "default_vat_code": "<string>",
    "default_vat_rate_basis_points": 123,
    "default_invoice_language": "<string>"
  },
  "lines": [
    {
      "description": "<string>",
      "quantity": "<string>",
      "unit_price_cents": 123,
      "net_cents": 123,
      "vat_cents": 123,
      "gross_cents": 123,
      "vat_rate_basis_points": 123,
      "vat_code": "<string>"
    }
  ],
  "customer_id": "<string>",
  "draft_id": "<string>",
  "issue_date": "<string>",
  "delivery_date": "<string>",
  "due_date": "<string>",
  "seller_iban": "<string>",
  "seller_vat_id": "<string>",
  "terms_days": 123,
  "note": "<string>",
  "language": "<string>",
  "email_subject": "<string>",
  "email_message": "<string>",
  "net_cents": 123,
  "vat_cents": 123,
  "gross_cents": 123
}
'
{
  "id": "<string>",
  "entity_id": "<string>",
  "status": "<string>",
  "draft": {},
  "customer": {
    "name": "<string>",
    "id": "<string>",
    "business_id": "<string>",
    "vat_number": "<string>",
    "address_line1": "<string>",
    "postal_code": "<string>",
    "city": "<string>",
    "country_code": "<string>",
    "email": "<string>",
    "einvoice_address": "<string>",
    "einvoice_operator": "<string>",
    "default_payment_terms_days": 123,
    "default_vat_code": "<string>",
    "default_vat_rate_basis_points": 123,
    "default_invoice_language": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Portal API key minted in portal Settings → API access. Scope read or write; pinned to one company. Send as Authorization: Bearer lac_sk_....

Body

application/json

Input for creating or updating a sales-invoice draft. All money in integer cents; dates YYYY-MM-DD.

customer
object
required

An invoicing counterparty (the customer you invoice), with e-invoice routing and per-party defaults. Rates in basis points (25.5% = 2550).

lines
object[]
required
customer_id
string

Target company. Optional for API keys.

draft_id
string

Existing draft to update; omit to create a new draft.

issue_date
string

YYYY-MM-DD.

delivery_date
string

YYYY-MM-DD.

due_date
string

YYYY-MM-DD.

seller_iban
string
seller_vat_id
string
terms_days
integer

Payment terms in days.

note
string
language
string
delivery_channel
enum<string>

How the invoice is delivered.

Available options:
maventa_einvoice,
email_pdf,
pdf_download
email_subject
string

Subject line when delivery_channel is email_pdf.

email_message
string

Email body when delivery_channel is email_pdf.

net_cents
integer

Invoice total net in integer cents.

vat_cents
integer

Invoice total VAT in integer cents.

gross_cents
integer

Invoice total gross in integer cents.

Response

Draft created or updated.

id
string
entity_id
string
status
string
draft
object
customer
object

An invoicing counterparty (the customer you invoice), with e-invoice routing and per-party defaults. Rates in basis points (25.5% = 2550).