{"openapi":"3.1.0","info":{"title":"EenFactuurMaken.nl API","version":"1.0.0","summary":"Dutch invoicing: invoices, credit notes, customers, VAT and UBL e-invoices.","description":"REST API for EenFactuurMaken.nl, simple Dutch invoicing. The same API powers the web app and the MCP server.\n\n**Authentication.** Create an API key in Settings → API & AI and send it as `Authorization: Bearer efm_…` (or `X-API-Key: efm_…`).\n\n**Conventions.** JSON in and out. Money is in integer euro cents (`unitPriceCents: 8500` = €85.00). Business dates are `YYYY-MM-DD`, timestamps (`*At`) are ISO 8601 in UTC. Lists return `{ data, page, pageSize, total }` and take `page` and `pageSize` (max 100).\n\n**Errors.** `{ statusCode, statusMessage, data: { code, message, details } }`. Switch on `data.code`.\n\n**Rate limits.** 120 requests per minute per API key (and 300 per minute per IP address). Over the limit you get 429 `rate_limited` with a `Retry-After` header (seconds).\n\n**Invoice lifecycle.** draft → issued (number assigned, data frozen) → sent → paid. Correct issued invoices with a credit note.","contact":{"name":"Support","url":"https://eenfactuurmaken.nl/contact"},"termsOfService":"https://eenfactuurmaken.nl/legal/terms"},"externalDocs":{"description":"API guide","url":"https://eenfactuurmaken.nl/en/docs/api"},"servers":[{"url":"https://eenfactuurmaken.nl","description":"Production (EU, Germany)"}],"tags":[{"name":"Account","description":"The authenticated user: plan, limits and usage."},{"name":"Business","description":"Your business profile (the seller on every invoice): KvK, btw-id, IBAN, numbering and defaults."},{"name":"Customers","description":"Customers (afnemers). Deleting a customer that is used on invoices archives it instead."},{"name":"Products","description":"Products and services with a default price and VAT rate."},{"name":"Invoices","description":"Invoices and credit notes: drafts, issuing (number + frozen snapshots), payment status, credit notes."},{"name":"Documents","description":"PDF and UBL (Peppol BIS Billing 3.0 / NLCIUS) files, previews and compliance checks."},{"name":"Sending","description":"Email invoices (PDF + UBL attached) and payment reminders."},{"name":"Reports","description":"Dashboard KPIs, the btw-aangifte helper and the ZIP export."},{"name":"Layouts","description":"Invoice layouts. Every plan: the house style (PATCH /api/v1/business `houseStyle`: classic/modern/minimal template, colours, logo placement, QR and payment link) and the built-in presets as the account default. Pro: saved templates (fonts, page size, header/footer texts, label overrides) and choosing a layout per customer or per invoice."},{"name":"Recurring","description":"Recurring invoices (Pro)."},{"name":"Email","description":"Custom sender domains (Pro) and the outbound email log."},{"name":"Billing","description":"Your EenFactuurMaken.nl subscription (paid through Stripe; our own invoices for every payment)."},{"name":"AI","description":"Machine-readable entry points: this spec, the MCP server and signed download links."}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"paths":{"/api/v1/me":{"get":{"operationId":"getMe","tags":["Account"],"summary":"Get the current user, plan, limits and usage","responses":{"200":{"description":"The caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"401":{"$ref":"#/components/responses/E401"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/business":{"get":{"operationId":"getBusiness","tags":["Business"],"summary":"Get your business profile","responses":{"200":{"description":"Business profile.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Business"}}}},"401":{"$ref":"#/components/responses/E401"},"429":{"$ref":"#/components/responses/E429"}}},"patch":{"operationId":"updateBusiness","tags":["Business"],"summary":"Update your business profile","description":"Partial update. Numbering changes are validated so numbers stay unique and gap-free. Payment details (iban, bic, bankAccountName, defaultPaymentLink) and the reply-to email can only be changed in the web app with a recent sign-in, to protect against payment-redirection fraud: with an API key or AI app (MCP/OAuth) a request that changes one of them returns 403 session_required (sending the current value unchanged is fine). The account owner is always emailed when they change.","responses":{"200":{"description":"Updated profile.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Business"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessUpdate"},"example":{"kvkNumber":"87654321","vatNumber":"NL001234567B89","invoiceNumberFormat":"{YYYY}-{SEQ:4}"}}}}}},"/api/v1/business/logo":{"put":{"operationId":"uploadLogo","tags":["Business"],"summary":"Upload your logo","description":"multipart/form-data with a `file` field. PNG or JPEG, max 500 KB.","responses":{"200":{"description":"Updated profile.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Business"}}}},"401":{"$ref":"#/components/responses/E401"},"415":{"$ref":"#/components/responses/E415"},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"}},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","contentMediaType":"image/png","description":"PNG or JPEG, max 500 KB."}}}}}}},"get":{"operationId":"getLogo","tags":["Business"],"summary":"Download your logo","responses":{"200":{"description":"Image bytes.","content":{"image/png":{"schema":{"type":"string","contentMediaType":"image/png"}}}},"401":{"$ref":"#/components/responses/E401"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}},"delete":{"operationId":"deleteLogo","tags":["Business"],"summary":"Remove your logo","responses":{"200":{"description":"Updated profile.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Business"}}}},"401":{"$ref":"#/components/responses/E401"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/customers":{"get":{"operationId":"listCustomers","tags":["Customers"],"summary":"List customers","description":"Search with `q` (name, email, KvK, VAT number).","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"page","in":"query","required":false,"schema":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991}},{"name":"pageSize","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"includeArchived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["0","1","true","false",""]}]}},{"name":"archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["0","1","true","false",""]}]}}],"responses":{"200":{"description":"A page of customers.","content":{"application/json":{"schema":{"type":"object","required":["data","page","pageSize","total"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Customer"}},"page":{"type":"integer"},"pageSize":{"type":"integer"},"total":{"type":"integer","description":"Total number of matching items."}}}}}},"401":{"$ref":"#/components/responses/E401"},"429":{"$ref":"#/components/responses/E429"}}},"post":{"operationId":"createCustomer","tags":["Customers"],"summary":"Create a customer","responses":{"201":{"description":"The new customer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerInput"},"example":{"type":"business","name":"Bakkerij De Gouden Korst B.V.","contactName":"Sanne de Vries","email":"administratie@goudenkorst.nl","addressLine1":"Marktstraat 12","postalCode":"3511 AB","city":"Utrecht","country":"NL","kvkNumber":"12345678","vatNumber":"NL123456789B01"}}}}}},"/api/v1/customers/{id}":{"get":{"operationId":"getCustomer","tags":["Customers"],"summary":"Get a customer","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Resource id."}],"responses":{"200":{"description":"The customer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"401":{"$ref":"#/components/responses/E401"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}},"patch":{"operationId":"updateCustomer","tags":["Customers"],"summary":"Update a customer","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Resource id."}],"responses":{"200":{"description":"The updated customer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"401":{"$ref":"#/components/responses/E401"},"404":{"$ref":"#/components/responses/E404"},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerPatch"},"example":{"email":"facturen@goudenkorst.nl","paymentTermDays":30}}}}},"delete":{"operationId":"deleteCustomer","tags":["Customers"],"summary":"Delete (or archive) a customer","description":"Customers used on invoices are archived instead of deleted.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Resource id."}],"responses":{"200":{"description":"What happened.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResult"}}}},"401":{"$ref":"#/components/responses/E401"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/products":{"get":{"operationId":"listProducts","tags":["Products"],"summary":"List products","parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"page","in":"query","required":false,"schema":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991}},{"name":"pageSize","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"includeArchived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["0","1","true","false",""]}]}},{"name":"archived","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"string","enum":["0","1","true","false",""]}]}}],"responses":{"200":{"description":"A page of products.","content":{"application/json":{"schema":{"type":"object","required":["data","page","pageSize","total"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Product"}},"page":{"type":"integer"},"pageSize":{"type":"integer"},"total":{"type":"integer","description":"Total number of matching items."}}}}}},"401":{"$ref":"#/components/responses/E401"},"429":{"$ref":"#/components/responses/E429"}}},"post":{"operationId":"createProduct","tags":["Products"],"summary":"Create a product","responses":{"201":{"description":"The new product.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductInput"},"example":{"name":"Consultancy","unit":"HUR","unitPriceCents":9500,"vatRate":"21"}}}}}},"/api/v1/products/{id}":{"get":{"operationId":"getProduct","tags":["Products"],"summary":"Get a product","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Resource id."}],"responses":{"200":{"description":"The product.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"401":{"$ref":"#/components/responses/E401"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}},"patch":{"operationId":"updateProduct","tags":["Products"],"summary":"Update a product","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Resource id."}],"responses":{"200":{"description":"The updated product.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"401":{"$ref":"#/components/responses/E401"},"404":{"$ref":"#/components/responses/E404"},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductPatch"},"example":{"unitPriceCents":10000}}}}},"delete":{"operationId":"deleteProduct","tags":["Products"],"summary":"Delete (or archive) a product","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Resource id."}],"responses":{"200":{"description":"What happened.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteResult"}}}},"401":{"$ref":"#/components/responses/E401"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/invoices":{"get":{"operationId":"listInvoices","tags":["Invoices"],"summary":"List invoices and credit notes","description":"`status` also accepts `overdue` (unpaid past due date) and `open` (issued or sent).","parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["draft","issued","sent","paid","cancelled","overdue","open"]}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["invoice","credit_note"]}},{"name":"customerId","in":"query","required":false,"schema":{"type":"string"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"from","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"page","in":"query","required":false,"schema":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991}},{"name":"pageSize","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"sort","in":"query","required":false,"schema":{"default":"-createdAt","type":"string","enum":["issueDate","-issueDate","number","-number","total","-total","dueDate","-dueDate","createdAt","-createdAt"]}}],"responses":{"200":{"description":"A page of invoices.","content":{"application/json":{"schema":{"type":"object","required":["data","page","pageSize","total"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceSummary"}},"page":{"type":"integer"},"pageSize":{"type":"integer"},"total":{"type":"integer","description":"Total number of matching items."}}}}}},"401":{"$ref":"#/components/responses/E401"},"429":{"$ref":"#/components/responses/E429"}}},"post":{"operationId":"createInvoice","tags":["Invoices"],"summary":"Create a draft invoice","description":"Creates a DRAFT. Pass `customerId` or an inline `customer`. Counts against the monthly quota (Free: 5 per month); credit notes never count. Issue it with POST /invoices/{id}/issue.","responses":{"201":{"description":"The new draft, including a compliance check.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409","description":"Conflict with the current state. `data.code`: `number_taken`."},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceInput"},"example":{"customer":{"type":"business","name":"Bakkerij De Gouden Korst B.V.","contactName":"Sanne de Vries","email":"administratie@goudenkorst.nl","addressLine1":"Marktstraat 12","postalCode":"3511 AB","city":"Utrecht","country":"NL","kvkNumber":"12345678","vatNumber":"NL123456789B01"},"issueDate":"2026-10-01","dueDate":"2026-10-15","vatTreatment":"standard","reference":"Project nieuwe website","lines":[{"description":"Webdesign en ontwikkeling – september","quantity":"12","unit":"HUR","unitPriceCents":8500,"vatRate":"21"},{"description":"Hosting en onderhoud (jaar)","quantity":"1","unit":"ANN","unitPriceCents":12000,"vatRate":"21"}]}}}}}},"/api/v1/invoices/next-number":{"get":{"operationId":"getNextInvoiceNumber","tags":["Invoices"],"summary":"Preview the next invoice and credit note numbers","responses":{"200":{"description":"Next numbers (nothing is reserved).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NextNumberPreview"},"example":{"invoice":"2026-0043","creditNote":"C2026-0004"}}}},"401":{"$ref":"#/components/responses/E401"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/invoices/{id}":{"get":{"operationId":"getInvoice","tags":["Invoices"],"summary":"Get an invoice","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Resource id."}],"responses":{"200":{"description":"The invoice with lines, parties and (for drafts) the compliance check.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"},"example":{"id":"0f8e2a52-7d0b-4c47-9a1e-3c1b2d4e5f60","kind":"invoice","status":"issued","displayStatus":"issued","number":"2026-0042","customerId":"9d2c1b0a-1234-4cde-8f00-aa11bb22cc33","creditedInvoiceId":null,"issueDate":"2026-10-01","dueDate":"2026-10-15","supplyDate":null,"supplyPeriodEnd":null,"currency":"EUR","locale":"nl","vatTreatment":"standard","reference":"Project nieuwe website","buyerReference":null,"notes":null,"footer":null,"paymentLink":null,"showEpcQr":true,"layoutId":null,"subtotalCents":114000,"vatTotalCents":23940,"totalCents":137940,"vatBreakdown":[{"category":"S","rate":"21","taxableCents":114000,"vatCents":23940}],"issuedAt":"2026-10-01T09:12:00.000Z","sentAt":null,"paidAt":null,"cancelledAt":null,"reminderCount":0,"lastReminderAt":null,"recurringScheduleId":null,"expiresAt":null,"downloadedAt":"2026-10-01T09:13:00.000Z","lastDownloadedAt":"2026-10-01T09:13:00.000Z","createdAt":"2026-10-01T09:05:00.000Z","updatedAt":"2026-10-01T09:12:00.000Z","lines":[{"id":"a1","position":0,"productId":null,"description":"Webdesign en ontwikkeling – september","quantity":"12","unit":"HUR","unitPriceCents":8500,"discountPercent":"0","vatRate":"21","lineTotalCents":102000},{"id":"a2","position":1,"productId":null,"description":"Hosting en onderhoud (jaar)","quantity":"1","unit":"ANN","unitPriceCents":12000,"discountPercent":"0","vatRate":"21","lineTotalCents":12000}],"seller":{"name":"Studio Jansen","legalName":"Studio Jansen","addressLine1":"Oudegracht 100","postalCode":"3511 AX","city":"Utrecht","country":"NL","kvkNumber":"87654321","vatNumber":"NL001234567B89","iban":"NL91ABNA0417164300","email":"hallo@studiojansen.nl"},"sellerSnapshot":{"name":"Studio Jansen","legalName":"Studio Jansen","addressLine1":"Oudegracht 100","postalCode":"3511 AX","city":"Utrecht","country":"NL","kvkNumber":"87654321","vatNumber":"NL001234567B89","iban":"NL91ABNA0417164300","email":"hallo@studiojansen.nl"},"customer":{"type":"business","name":"Bakkerij De Gouden Korst B.V.","contactName":"Sanne de Vries","email":"administratie@goudenkorst.nl","addressLine1":"Marktstraat 12","postalCode":"3511 AB","city":"Utrecht","country":"NL","kvkNumber":"12345678","vatNumber":"NL123456789B01"},"customerSnapshot":{"type":"business","name":"Bakkerij De Gouden Korst B.V.","contactName":"Sanne de Vries","email":"administratie@goudenkorst.nl","addressLine1":"Marktstraat 12","postalCode":"3511 AB","city":"Utrecht","country":"NL","kvkNumber":"12345678","vatNumber":"NL123456789B01"},"compliance":[]}}}},"401":{"$ref":"#/components/responses/E401"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}},"patch":{"operationId":"updateInvoice","tags":["Invoices"],"summary":"Update a draft","description":"Only drafts can be changed (409 invoice_locked). Correct issued invoices with a credit note.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Resource id."}],"responses":{"200":{"description":"The updated draft.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"401":{"$ref":"#/components/responses/E401"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409","description":"Conflict with the current state. `data.code`: `invoice_locked`, `number_taken`."},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceUpdate"},"example":{"dueDate":"2026-10-31","lines":[{"description":"Webdesign en ontwikkeling – september","quantity":"12","unit":"HUR","unitPriceCents":8500,"vatRate":"21"},{"description":"Hosting en onderhoud (jaar)","quantity":"1","unit":"ANN","unitPriceCents":12000,"vatRate":"21"}]}}}}},"delete":{"operationId":"deleteInvoice","tags":["Invoices"],"summary":"Delete a draft","description":"Only drafts can be deleted (409 invoice_locked). Issued invoices are kept (Dutch retention duty); cancel or credit them instead. Deleting a draft invoice gives its unit of the monthly quota back.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Resource id."}],"responses":{"200":{"description":"Deleted.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"const":true}},"required":["id","deleted"]}}}},"401":{"$ref":"#/components/responses/E401"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409","description":"Conflict with the current state. `data.code`: `invoice_locked`."},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/invoices/{id}/duplicate":{"post":{"operationId":"duplicateInvoice","tags":["Invoices"],"summary":"Duplicate into a new draft","description":"Copies lines and settings into a new draft with today's dates and no number. Counts against the quota (credit notes do not).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Resource id."}],"responses":{"201":{"description":"The new draft.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"404":{"$ref":"#/components/responses/E404"},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DuplicateInvoice"}}}}}},"/api/v1/invoices/{id}/issue":{"post":{"operationId":"issueInvoice","tags":["Invoices"],"summary":"Issue a draft","description":"Runs the Dutch compliance check (422 invoice_not_compliant with details), assigns the next number (gap-free), freezes seller and customer data and locks the invoice.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Resource id."}],"responses":{"200":{"description":"The issued invoice.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"},"example":{"id":"0f8e2a52-7d0b-4c47-9a1e-3c1b2d4e5f60","kind":"invoice","status":"issued","displayStatus":"issued","number":"2026-0042","customerId":"9d2c1b0a-1234-4cde-8f00-aa11bb22cc33","creditedInvoiceId":null,"issueDate":"2026-10-01","dueDate":"2026-10-15","supplyDate":null,"supplyPeriodEnd":null,"currency":"EUR","locale":"nl","vatTreatment":"standard","reference":"Project nieuwe website","buyerReference":null,"notes":null,"footer":null,"paymentLink":null,"showEpcQr":true,"layoutId":null,"subtotalCents":114000,"vatTotalCents":23940,"totalCents":137940,"vatBreakdown":[{"category":"S","rate":"21","taxableCents":114000,"vatCents":23940}],"issuedAt":"2026-10-01T09:12:00.000Z","sentAt":null,"paidAt":null,"cancelledAt":null,"reminderCount":0,"lastReminderAt":null,"recurringScheduleId":null,"expiresAt":null,"downloadedAt":"2026-10-01T09:13:00.000Z","lastDownloadedAt":"2026-10-01T09:13:00.000Z","createdAt":"2026-10-01T09:05:00.000Z","updatedAt":"2026-10-01T09:12:00.000Z","lines":[{"id":"a1","position":0,"productId":null,"description":"Webdesign en ontwikkeling – september","quantity":"12","unit":"HUR","unitPriceCents":8500,"discountPercent":"0","vatRate":"21","lineTotalCents":102000},{"id":"a2","position":1,"productId":null,"description":"Hosting en onderhoud (jaar)","quantity":"1","unit":"ANN","unitPriceCents":12000,"discountPercent":"0","vatRate":"21","lineTotalCents":12000}],"seller":{"name":"Studio Jansen","legalName":"Studio Jansen","addressLine1":"Oudegracht 100","postalCode":"3511 AX","city":"Utrecht","country":"NL","kvkNumber":"87654321","vatNumber":"NL001234567B89","iban":"NL91ABNA0417164300","email":"hallo@studiojansen.nl"},"sellerSnapshot":{"name":"Studio Jansen","legalName":"Studio Jansen","addressLine1":"Oudegracht 100","postalCode":"3511 AX","city":"Utrecht","country":"NL","kvkNumber":"87654321","vatNumber":"NL001234567B89","iban":"NL91ABNA0417164300","email":"hallo@studiojansen.nl"},"customer":{"type":"business","name":"Bakkerij De Gouden Korst B.V.","contactName":"Sanne de Vries","email":"administratie@goudenkorst.nl","addressLine1":"Marktstraat 12","postalCode":"3511 AB","city":"Utrecht","country":"NL","kvkNumber":"12345678","vatNumber":"NL123456789B01"},"customerSnapshot":{"type":"business","name":"Bakkerij De Gouden Korst B.V.","contactName":"Sanne de Vries","email":"administratie@goudenkorst.nl","addressLine1":"Marktstraat 12","postalCode":"3511 AB","city":"Utrecht","country":"NL","kvkNumber":"12345678","vatNumber":"NL123456789B01"},"compliance":[]}}}},"401":{"$ref":"#/components/responses/E401"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409","description":"Conflict with the current state. `data.code`: `invoice_locked`, `number_taken`."},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueInvoice"}}}}}},"/api/v1/invoices/{id}/credit-note":{"post":{"operationId":"createCreditNote","tags":["Invoices"],"summary":"Create a credit note for an invoice","description":"Creates a DRAFT credit note (creditfactuur) that references the invoice, with the same lines (full credit). Edit the lines for a partial credit, then issue it. Credit notes do not count against the monthly quota.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Resource id."}],"responses":{"201":{"description":"The draft credit note.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409","description":"Conflict with the current state. `data.code`: `invoice_not_creditable`, `credit_note_draft_exists`, `invoice_fully_credited`."},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/invoices/{id}/mark-paid":{"post":{"operationId":"markInvoicePaid","tags":["Invoices"],"summary":"Mark as paid","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Resource id."}],"responses":{"200":{"description":"The invoice.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"401":{"$ref":"#/components/responses/E401"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409","description":"Conflict with the current state. `data.code`: `invoice_not_issued`, `invoice_cancelled`."},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkPaid"},"example":{"paidAt":"2026-10-10"}}}}}},"/api/v1/invoices/{id}/mark-unpaid":{"post":{"operationId":"markInvoiceUnpaid","tags":["Invoices"],"summary":"Mark as unpaid","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Resource id."}],"responses":{"200":{"description":"The invoice.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"401":{"$ref":"#/components/responses/E401"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409","description":"Conflict with the current state. `data.code`: `invoice_not_paid`."},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/invoices/{id}/public-link":{"post":{"operationId":"createPublicLink","tags":["Invoices"],"summary":"Create or replace the public invoice link","description":"Issued invoices get a public \"view online\" page (`publicUrl`, /i/{token}) when they are issued: the customer can pay, download the PDF/UBL, and views are recorded (`firstViewedAt`, `viewedAt`, `viewCount`). Without a body this (re)creates a missing link; `{ \"regenerate\": true }` replaces the token so the old link stops working. Drafts → 409 invoice_not_issued.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Resource id."}],"responses":{"200":{"description":"The invoice with its new publicUrl.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"401":{"$ref":"#/components/responses/E401"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409","description":"Conflict with the current state. `data.code`: `invoice_not_issued`."},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicLink"},"example":{"regenerate":true}}}}},"delete":{"operationId":"revokePublicLink","tags":["Invoices"],"summary":"Switch the public invoice link off","description":"The public page and its downloads return 404 from now on. Create a new link with POST.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Resource id."}],"responses":{"200":{"description":"The invoice (publicUrl: null).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"401":{"$ref":"#/components/responses/E401"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/invoices/{id}/cancel":{"post":{"operationId":"cancelInvoice","tags":["Invoices"],"summary":"Cancel an issued invoice","description":"Only issued/sent unpaid invoices. The number stays used. For paid invoices, create a credit note. An invoice that already has an issued credit note can't be cancelled any more (409 invoice_has_credit_notes, details.creditNotes): the credit note is the correction.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Resource id."}],"responses":{"200":{"description":"The cancelled invoice.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"401":{"$ref":"#/components/responses/E401"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409","description":"Conflict with the current state. `data.code`: `invoice_not_issued`, `invoice_cancelled`, `invoice_not_cancellable`, `invoice_has_credit_notes`."},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/invoices/{id}/send":{"post":{"operationId":"sendInvoice","tags":["Sending"],"summary":"Email the invoice","description":"Emails the PDF and (unless `attachUbl` is false) the UBL e-invoice as attachments, to the customer email or `to`. Issued invoices only (409 invoice_not_issued). Status becomes `sent`. 422 no_recipient when there is no address. Limits: Free can only email the customer's own address(es) on file (email + CC) or the account email (403 email_recipient_not_allowed, `details.addresses`) and at most 30 recipients (to + cc) per 24 hours (429 email_daily_limit); Pro at most 500 recipients per hour (429 email_rate_limited). The same document can be emailed at most 5 times per 24 hours (429 invoice_resend_limit). Sending pauses for up to 7 days when recent emails of the account bounced or were marked as spam (403 email_sending_paused), and a platform-wide daily cap can apply (429 email_platform_limit).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Resource id."}],"responses":{"200":{"description":"The invoice after sending.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409","description":"Conflict with the current state. `data.code`: `invoice_not_issued`, `invoice_cancelled`."},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendInvoice"},"example":{"message":"Hoi Sanne,\n\nIn de bijlage vind je de factuur voor september.\n\nGroet, Pieter"}}}}}},"/api/v1/invoices/{id}/remind":{"post":{"operationId":"sendPaymentReminder","tags":["Sending"],"summary":"Send a payment reminder now","description":"Emails a friendly payment reminder (betalingsherinnering) for an open (issued/sent, unpaid) invoice. 409 invoice_not_remindable / reminder_too_early, 422 no_recipient.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Resource id."}],"responses":{"200":{"description":"The invoice (reminderCount and lastReminderAt updated).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"401":{"$ref":"#/components/responses/E401"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409","description":"Conflict with the current state. `data.code`: `invoice_not_issued`, `invoice_already_paid`, `invoice_cancelled`, `invoice_not_remindable`, `invoice_fully_credited`, `reminder_too_early`, `reminder_in_progress`."},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/invoices/{id}/pdf":{"get":{"operationId":"getInvoicePdf","tags":["Documents"],"summary":"Download the PDF","description":"`?download=1` sets Content-Disposition: attachment and marks an issued document as downloaded (`downloadedAt`). Drafts get a \"concept\" watermark.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Resource id."},{"name":"download","in":"query","required":false,"schema":{"type":"string","enum":["0","1","true","false"]}},{"name":"embedUbl","in":"query","required":false,"schema":{"type":"string","enum":["0","1","true","false"]}}],"responses":{"200":{"description":"PDF file.","content":{"application/pdf":{"schema":{"type":"string","contentMediaType":"application/pdf"}}}},"401":{"$ref":"#/components/responses/E401"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/invoices/{id}/ubl":{"get":{"operationId":"getInvoiceUbl","tags":["Documents"],"summary":"Download the UBL e-invoice","description":"UBL 2.1, Peppol BIS Billing 3.0 / NLCIUS. Issued invoices only (409 invoice_not_issued). Dutch sellers need a KvK number for Peppol (409 peppol_kvk_required). Credit notes produce a CreditNote document. Marks the document as downloaded (`downloadedAt`).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Resource id."},{"name":"download","in":"query","required":false,"schema":{"type":"string","enum":["0","1","true","false"]}},{"name":"embedPdf","in":"query","required":false,"schema":{"type":"string","enum":["0","1","true","false"]}}],"responses":{"200":{"description":"UBL XML.","content":{"application/xml":{"schema":{"type":"string","contentMediaType":"application/xml"}}}},"401":{"$ref":"#/components/responses/E401"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409","description":"Conflict with the current state. `data.code`: `invoice_not_issued`, `peppol_kvk_required`."},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/invoices/{id}/compliance":{"get":{"operationId":"checkInvoiceCompliance","tags":["Documents"],"summary":"Check the Dutch invoice requirements","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Resource id."}],"responses":{"200":{"description":"Issues (empty = compliant).","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ComplianceIssue"}}}}},"401":{"$ref":"#/components/responses/E401"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/invoices/preview-pdf":{"post":{"operationId":"previewInvoicePdf","tags":["Documents"],"summary":"Render a preview PDF","description":"Renders an unsaved invoice and/or layout. Nothing is stored. Any plan may preview custom layouts.","responses":{"200":{"description":"PDF with a draft watermark.","content":{"application/pdf":{"schema":{"type":"string","contentMediaType":"application/pdf"}}}},"401":{"$ref":"#/components/responses/E401"},"404":{"$ref":"#/components/responses/E404"},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewPdf"}}}}}},"/api/v1/stats":{"get":{"operationId":"getStats","tags":["Reports"],"summary":"Dashboard KPIs and VAT per quarter","description":"Open, overdue and paid amounts, revenue this year, and the btw-aangifte helper (rubrieken 1a–3b, plus exempt/KOR turnover) for this and the previous quarter. Pass `quarter` (and optionally `year`, default this year) to also get any other quarter in `vat.selected`.","parameters":[{"name":"year","in":"query","required":false,"schema":{"type":"integer","minimum":2000,"maximum":2100}},{"name":"quarter","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":4}}],"responses":{"200":{"description":"Statistics.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Stats"}}}},"401":{"$ref":"#/components/responses/E401"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/export":{"get":{"operationId":"exportInvoices","tags":["Reports"],"summary":"Export everything as ZIP","description":"PDF + UBL for every issued invoice and credit note, plus invoices.csv. Optional issue date range.\n\nRequires the **Pro** plan (402 `plan_upgrade_required` on Free).","parameters":[{"name":"from","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}],"responses":{"200":{"description":"ZIP archive (streamed).","content":{"application/zip":{"schema":{"type":"string","contentMediaType":"application/zip"}}}},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"}},"x-plan":"pro"}},"/api/v1/export/expiring":{"get":{"operationId":"exportExpiringInvoices","tags":["Reports"],"summary":"Download the invoices that will be deleted soon","description":"Every plan. Same ZIP as /export (PDF + UBL + invoices.csv) with the issued invoices and credit notes that the free-plan retention deletes within 30 days. Marks them as downloaded (`downloadedAt`). You remain responsible for the 7-year retention (bewaarplicht).","responses":{"200":{"description":"ZIP archive (streamed).","content":{"application/zip":{"schema":{"type":"string","contentMediaType":"application/zip"}}}},"401":{"$ref":"#/components/responses/E401"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/layouts":{"get":{"operationId":"listLayouts","tags":["Layouts"],"summary":"List layouts","responses":{"200":{"description":"Built-in presets and your saved templates (custom layouts). The house style is on GET /api/v1/business (`houseStyle`).","content":{"application/json":{"schema":{"type":"object","required":["data","page","pageSize","total"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Layout"}},"page":{"type":"integer"},"pageSize":{"type":"integer"},"total":{"type":"integer","description":"Total number of matching items."}}}}}},"401":{"$ref":"#/components/responses/E401"},"429":{"$ref":"#/components/responses/E429"}}},"post":{"operationId":"createLayout","tags":["Layouts"],"summary":"Create a saved template (custom layout)","description":"Requires the **Pro** plan (402 `plan_upgrade_required` on Free).","responses":{"201":{"description":"The new layout.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Layout"}}}},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"}},"x-plan":"pro","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LayoutInput"}}}}}},"/api/v1/layouts/{id}":{"get":{"operationId":"getLayout","tags":["Layouts"],"summary":"Get a layout","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Resource id."}],"responses":{"200":{"description":"The layout.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Layout"}}}},"401":{"$ref":"#/components/responses/E401"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}},"patch":{"operationId":"updateLayout","tags":["Layouts"],"summary":"Update a saved template (custom layout)","description":"Requires the **Pro** plan (402 `plan_upgrade_required` on Free).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Resource id."}],"responses":{"200":{"description":"The updated layout.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Layout"}}}},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"}},"x-plan":"pro","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LayoutUpdate"}}}}},"delete":{"operationId":"deleteLayout","tags":["Layouts"],"summary":"Delete a custom layout","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Resource id."}],"responses":{"200":{"description":"Deleted.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"const":true}}}}}},"401":{"$ref":"#/components/responses/E401"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/recurring":{"get":{"operationId":"listRecurring","tags":["Recurring"],"summary":"List recurring invoices","description":"Requires the **Pro** plan (402 `plan_upgrade_required` on Free).","parameters":[{"name":"page","in":"query","required":false,"schema":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991}},{"name":"pageSize","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Your schedules.","content":{"application/json":{"schema":{"type":"object","required":["data","page","pageSize","total"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/RecurringSchedule"}},"page":{"type":"integer"},"pageSize":{"type":"integer"},"total":{"type":"integer","description":"Total number of matching items."}}}}}},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"429":{"$ref":"#/components/responses/E429"}},"x-plan":"pro"},"post":{"operationId":"createRecurring","tags":["Recurring"],"summary":"Create a recurring invoice","description":"Requires the **Pro** plan (402 `plan_upgrade_required` on Free).","responses":{"201":{"description":"The schedule.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringSchedule"}}}},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"404":{"$ref":"#/components/responses/E404"},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"}},"x-plan":"pro","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringInput"},"example":{"templateInvoiceId":"0f8e2a52-7d0b-4c47-9a1e-3c1b2d4e5f60","frequency":"monthly","interval":1,"nextRunDate":"2026-11-01","autoIssue":true,"autoSend":true}}}}}},"/api/v1/recurring/{id}":{"get":{"operationId":"getRecurring","tags":["Recurring"],"summary":"Get a recurring invoice","description":"Requires the **Pro** plan (402 `plan_upgrade_required` on Free).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Resource id."}],"responses":{"200":{"description":"The schedule.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringSchedule"}}}},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}},"x-plan":"pro"},"patch":{"operationId":"updateRecurring","tags":["Recurring"],"summary":"Update a recurring invoice","description":"Requires the **Pro** plan (402 `plan_upgrade_required` on Free).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Resource id."}],"responses":{"200":{"description":"The schedule.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringSchedule"}}}},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"404":{"$ref":"#/components/responses/E404"},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"}},"x-plan":"pro","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecurringUpdate"}}}}},"delete":{"operationId":"deleteRecurring","tags":["Recurring"],"summary":"Delete a recurring invoice","description":"Requires the **Pro** plan (402 `plan_upgrade_required` on Free).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Resource id."}],"responses":{"200":{"description":"Deleted.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean"}}}}}},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}},"x-plan":"pro"}},"/api/v1/recurring/{id}/run-now":{"post":{"operationId":"runRecurringNow","tags":["Recurring"],"summary":"Run a recurring invoice now","description":"Requires the **Pro** plan (402 `plan_upgrade_required` on Free).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Resource id."}],"responses":{"200":{"description":"The created invoice.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}},"x-plan":"pro"}},"/api/v1/email-domains":{"get":{"operationId":"listEmailDomains","tags":["Email"],"summary":"List sender domains","description":"Requires the **Pro** plan (402 `plan_upgrade_required` on Free).","responses":{"200":{"description":"Your domains.","content":{"application/json":{"schema":{"type":"object","required":["data","page","pageSize","total"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EmailDomain"}},"page":{"type":"integer"},"pageSize":{"type":"integer"},"total":{"type":"integer","description":"Total number of matching items."}}}}}},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"429":{"$ref":"#/components/responses/E429"}},"x-plan":"pro"},"post":{"operationId":"createEmailDomain","tags":["Email"],"summary":"Add a sender domain","description":"Requires the **Pro** plan (402 `plan_upgrade_required` on Free).","responses":{"201":{"description":"The domain with the DNS records to add.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailDomain"}}}},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"409":{"$ref":"#/components/responses/E409"},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"}},"x-plan":"pro","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailDomainInput"},"example":{"domain":"studiojansen.nl","fromLocalPart":"facturen","fromName":"Studio Jansen"}}}}}},"/api/v1/email-domains/{id}":{"get":{"operationId":"getEmailDomain","tags":["Email"],"summary":"Get a sender domain","description":"Requires the **Pro** plan (402 `plan_upgrade_required` on Free).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Resource id."}],"responses":{"200":{"description":"The domain.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailDomain"}}}},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}},"x-plan":"pro"},"delete":{"operationId":"deleteEmailDomain","tags":["Email"],"summary":"Remove a sender domain","description":"Requires the **Pro** plan (402 `plan_upgrade_required` on Free).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Resource id."}],"responses":{"200":{"description":"Deleted.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean"}}}}}},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}},"x-plan":"pro"}},"/api/v1/email-domains/{id}/verify":{"post":{"operationId":"verifyEmailDomain","tags":["Email"],"summary":"Check the DNS records now","description":"Requires the **Pro** plan (402 `plan_upgrade_required` on Free).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Resource id."}],"responses":{"200":{"description":"The domain with updated status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailDomain"}}}},"401":{"$ref":"#/components/responses/E401"},"402":{"$ref":"#/components/responses/E402"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}},"x-plan":"pro"}},"/api/v1/emails":{"get":{"operationId":"listEmails","tags":["Email"],"summary":"Outbound email log","parameters":[{"name":"page","in":"query","required":false,"schema":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991}},{"name":"pageSize","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Sent emails, newest first.","content":{"application/json":{"schema":{"type":"object","required":["data","page","pageSize","total"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EmailLogEntry"}},"page":{"type":"integer"},"pageSize":{"type":"integer"},"total":{"type":"integer","description":"Total number of matching items."}}}}}},"401":{"$ref":"#/components/responses/E401"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/billing":{"get":{"operationId":"getBilling","tags":["Billing"],"summary":"Subscription and payments","responses":{"200":{"description":"Subscription.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billing"}}}},"401":{"$ref":"#/components/responses/E401"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/billing/checkout":{"post":{"operationId":"startCheckout","tags":["Billing"],"summary":"Start a Pro checkout","responses":{"200":{"description":"Checkout URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutResult"}}}},"401":{"$ref":"#/components/responses/E401"},"409":{"$ref":"#/components/responses/E409"},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutInput"},"example":{"interval":"month"}}}}}},"/api/v1/billing/cancel":{"post":{"operationId":"cancelSubscription","tags":["Billing"],"summary":"Cancel Pro at the end of the period","description":"Web app session only (403 session_required with an API key).","responses":{"200":{"description":"Subscription.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billing"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/billing/resume":{"post":{"operationId":"resumeSubscription","tags":["Billing"],"summary":"Undo a cancellation","description":"Restarts renewals before Pro ends (Stripe cancel_at_period_end = false). 409 not_cancelled / subscription_ended (start a new checkout). Web app session only.","responses":{"200":{"description":"Subscription.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billing"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/billing/sync":{"post":{"operationId":"syncBilling","tags":["Billing"],"summary":"Re-check the checkout and subscription","description":"Asks Stripe for the status of the open checkout session, or of the running subscription and its latest invoice (the return page polls this).","responses":{"200":{"description":"Subscription.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billing"}}}},"401":{"$ref":"#/components/responses/E401"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/billing/payments/{id}/invoice":{"get":{"operationId":"getBillingInvoice","tags":["Billing"],"summary":"Download our invoice for a payment","description":"The EenFactuurMaken.nl invoice (PDF) for a paid subscription payment.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Resource id."}],"responses":{"200":{"description":"PDF file.","content":{"application/pdf":{"schema":{"type":"string","contentMediaType":"application/pdf"}}}},"401":{"$ref":"#/components/responses/E401"},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/billing/portal":{"post":{"operationId":"openBillingPortal","tags":["Billing"],"summary":"Open the Stripe billing portal","description":"Short-lived URL of the Stripe billing portal: update the payment method or cancel at the end of the period. Web app session only (403 session_required with an API key). 409 no_billing_account without a running subscription.","responses":{"200":{"description":"Portal URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingPortalResult"}}}},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingPortalInput"},"example":{"locale":"nl"}}}}}},"/api/webhooks/stripe":{"post":{"operationId":"stripeWebhook","tags":["Billing"],"summary":"Stripe webhook (for Stripe only)","description":"Called by Stripe. Requires a valid Stripe-Signature header over the raw body (400 otherwise). The object is re-fetched from the Stripe API, so the body is never trusted; events are idempotent per event id.","responses":{"200":{"description":"Acknowledged.","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/E400"}},"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}}}},"/api/v1/vat-check":{"get":{"operationId":"checkVatNumber","tags":["Customers"],"summary":"Check an EU VAT number (VIES)","description":"Checks a customer VAT number with the EU VIES service, e.g. before an intra-EU (ICP) invoice. Rate-limited per user.","parameters":[{"name":"vat","in":"query","required":true,"schema":{"type":"string","minLength":4,"maxLength":30}}],"responses":{"200":{"description":"VIES result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VatCheck"},"example":{"vatNumber":"DE123456789","countryCode":"DE","status":"valid","checkedAt":"2026-10-12T09:30:00.000Z","source":"VIES"}}}},"401":{"$ref":"#/components/responses/E401"},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"}}}},"/api/v1/exchange-rate":{"get":{"operationId":"getExchangeRate","tags":["Invoices"],"summary":"ECB exchange rate for a currency","description":"Euro reference rate of the European Central Bank (EUR per unit) for invoices in another currency; `date` defaults to today. 422 exchange_rate_unknown_currency, 503 exchange_rate_unavailable (enter the rate manually).","parameters":[{"name":"currency","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":3}},{"name":"date","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}],"responses":{"200":{"description":"The rate.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeRate"},"example":{"currency":"USD","date":"2026-10-12","rateDate":"2026-10-09","ecbRate":"1.1298","rate":"0.8851124093","source":"ECB"}}}},"401":{"$ref":"#/components/responses/E401"},"422":{"$ref":"#/components/responses/E422"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/api/public/invoices/{token}":{"get":{"operationId":"getPublicInvoice","tags":["Documents"],"summary":"Public invoice page data","description":"What the customer sees on /i/{token}: display-ready, in the invoice language. 404 when the token is unknown or the link was switched off. Rate-limited per IP.","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"},"description":"Signed token from get_invoice_download_links."}],"responses":{"200":{"description":"The public invoice.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicInvoice"}}}},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}},"security":[]}},"/api/public/invoices/{token}/pdf":{"get":{"operationId":"getPublicInvoicePdf","tags":["Documents"],"summary":"Public invoice PDF","description":"PDF (with the UBL embedded). `?download=1` → attachment.","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"},"description":"Signed token from get_invoice_download_links."},{"name":"download","in":"query","required":false,"schema":{"type":"string","enum":["0","1","true","false"]}}],"responses":{"200":{"description":"PDF file.","content":{"application/pdf":{"schema":{"type":"string","contentMediaType":"application/pdf"}}}},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}},"security":[]}},"/api/public/invoices/{token}/ubl":{"get":{"operationId":"getPublicInvoiceUbl","tags":["Documents"],"summary":"Public invoice UBL e-invoice","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"},"description":"Signed token from get_invoice_download_links."}],"responses":{"200":{"description":"UBL XML.","content":{"application/xml":{"schema":{"type":"string","contentMediaType":"application/xml"}}}},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}},"security":[]}},"/api/public/invoices/{token}/view":{"post":{"operationId":"recordPublicInvoiceView","tags":["Documents"],"summary":"Record a view of the public page","description":"Called by the page in the browser. Not counted when the signed-in owner opens their own page; repeated views within 30 minutes count once.","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"},"description":"Signed token from get_invoice_download_links."}],"responses":{"200":{"description":"Whether the view was recorded.","content":{"application/json":{"schema":{"type":"object","properties":{"recorded":{"type":"boolean"},"owner":{"type":"boolean"}},"required":["recorded","owner"]}}}},"404":{"$ref":"#/components/responses/E404"},"429":{"$ref":"#/components/responses/E429"}},"security":[]}},"/api/v1/openapi.json":{"get":{"operationId":"getOpenApiSpec","tags":["AI"],"summary":"This OpenAPI 3.1 document","responses":{"200":{"description":"OpenAPI document.","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[]}},"/mcp":{"post":{"operationId":"mcp","tags":["AI"],"summary":"MCP server (Streamable HTTP)","description":"Model Context Protocol endpoint for AI assistants (ChatGPT, Claude, Gemini, Cursor, VS Code). JSON-RPC 2.0 over Streamable HTTP, stateless. Authenticate with an API key or an OAuth access token. See /docs/mcp.","responses":{"200":{"description":"JSON-RPC response.","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/E401"},"429":{"$ref":"#/components/responses/E429"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"JSON-RPC 2.0 message"}}}}}},"/d/{token}":{"get":{"operationId":"signedDownload","tags":["AI"],"summary":"Signed download link","description":"Short-lived link (default 15 minutes) to an invoice PDF or UBL file, created by the MCP tool get_invoice_download_links. No authentication: the token is signed. 410 link_expired after expiry.","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"},"description":"Signed token from get_invoice_download_links."}],"responses":{"200":{"description":"The file.","content":{"application/pdf":{"schema":{"type":"string","contentMediaType":"application/pdf"}}}},"404":{"$ref":"#/components/responses/E404"},"410":{"$ref":"#/components/responses/E410"}},"security":[]}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API key (efm_…)","description":"API key from Settings → API & AI, or an OAuth access token (MCP connectors)."},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key","description":"Alternative header for the API key."}},"schemas":{"BusinessUpdate":{"type":"object","properties":{"name":{"type":"string","maxLength":200},"legalName":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"addressLine1":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"addressLine2":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"postalCode":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"city":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"country":{"type":"string","minLength":2,"maxLength":2},"kvkNumber":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"description":"KvK number (8 digits). Required on Dutch invoices."},"vatNumber":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}],"description":"Your VAT number (btw-id), e.g. NL123456789B01. Required unless you use the KOR."},"iban":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"description":"IBAN for payments. Web app session only: with an API key or AI app, changing iban, bic, bankAccountName, email or defaultPaymentLink returns 403 session_required."},"bic":{"anyOf":[{"type":"string","maxLength":15},{"type":"null"}],"description":"BIC of your bank. Web app session only (403 session_required with an API key)."},"bankAccountName":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"Account holder name. Web app session only (403 session_required with an API key)."},"email":{"anyOf":[{"anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},{"type":"string","const":""}],"description":"Reply-to address of the invoice emails. Web app session only (403 session_required with an API key)."},"phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"website":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"peppolId":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"defaultVatTreatment":{"type":"string","enum":["standard","reverse_charge","intra_eu","export","kor","exempt"],"description":"Default VAT treatment. Use kor if you use the small business scheme (kleineondernemersregeling)."},"defaultSupplyType":{"type":"string","enum":["goods","services"]},"defaultVatExemptionReason":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"notInHandelsregister":{"type":"boolean"},"defaultVatRate":{"type":["string","number"]},"defaultPaymentTermDays":{"type":"integer","minimum":0,"maximum":365},"defaultCurrency":{"type":"string","minLength":3,"maxLength":3},"defaultInvoiceLocale":{"type":"string","enum":["nl","en","de","fr"]},"defaultNotes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"defaultFooter":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"defaultPaymentLink":{"anyOf":[{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},{"type":"string","const":""}]},"defaultLayoutId":{"type":["string","null"]},"houseStyle":{"anyOf":[{"type":"object","properties":{"template":{"type":"string","enum":["classic","modern","minimal"]},"primaryColor":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"accentColor":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"logoPosition":{"type":"string","enum":["left","right","center"]},"logoMaxHeight":{"type":"number","minimum":20,"maximum":160},"showLogo":{"type":"boolean"},"showEpcQr":{"type":"boolean"},"showPaymentLink":{"type":"boolean"}}},{"type":"null"}]},"showEpcQrByDefault":{"type":"boolean"},"invoiceNumberFormat":{"type":"string","minLength":1,"maxLength":50,"description":"Number format. Tokens: {YYYY} {YY} {MM} {SEQ} {SEQ:n}. Example: \"{YYYY}-{SEQ:4}\" → 2026-0001."},"nextInvoiceSequence":{"type":"integer","minimum":1,"maximum":9007199254740991},"creditNoteNumberFormat":{"type":"string","minLength":1,"maxLength":50,"description":"Number format for credit notes, e.g. \"C{YYYY}-{SEQ:4}\"."},"nextCreditNoteSequence":{"type":"integer","minimum":1,"maximum":9007199254740991},"resetSequenceYearly":{"type":"boolean","description":"Restart the sequence at 1 every calendar year (needs a year token in the format)."},"remindersEnabled":{"type":"boolean"},"reminderSchedule":{"maxItems":5,"type":"array","items":{"type":"integer","minimum":1,"maximum":365},"description":"Days after the due date to send automatic reminders (Pro), e.g. [7, 14, 30]."},"reminderMessage":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"invoiceEmailSubject":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"invoiceEmailMessage":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]}},"description":"Partial update of the business profile. Only the fields you send change."},"CustomerInput":{"type":"object","properties":{"type":{"default":"business","type":"string","enum":["business","individual"],"description":"business (B2B) or individual (consumer)."},"name":{"type":"string","minLength":1,"maxLength":200,"description":"Company or person name as printed on the invoice."},"contactName":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"email":{"anyOf":[{"anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},{"type":"string","const":""}]},"emailCc":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"description":"Extra recipients (comma separated) for invoice emails."},"phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"addressLine1":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"addressLine2":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"postalCode":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"city":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"country":{"type":"string","minLength":2,"maxLength":2,"description":"ISO 3166-1 alpha-2 country code. Defaults to NL."},"kvkNumber":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"description":"KvK number (Dutch Chamber of Commerce, 8 digits). Recommended for Dutch business customers."},"vatNumber":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}],"description":"Customer VAT number (btw-id / VAT ID), e.g. NL123456789B01 or DE123456789. Required for reverse_charge and intra_eu invoices."},"peppolId":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"description":"Peppol participant id, e.g. 0106:12345678 (KvK) or 0190:00000000000000000000 (OIN)."},"defaultVatTreatment":{"anyOf":[{"type":"string","enum":["standard","reverse_charge","intra_eu","export","kor","exempt"]},{"type":"null"}],"description":"VAT treatment suggested for new invoices to this customer."},"defaultSupplyType":{"anyOf":[{"type":"string","enum":["goods","services"]},{"type":"null"}]},"paymentTermDays":{"anyOf":[{"type":"integer","minimum":0,"maximum":365},{"type":"null"}],"description":"Payment term in days; overrides the business default."},"locale":{"anyOf":[{"type":"string","enum":["nl","en","de","fr"]},{"type":"null"}],"description":"Language of invoices and emails for this customer: nl, en, de or fr."},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"defaultLayoutId":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]}},"required":["name"],"description":"A customer. For businesses in NL, add the KvK number; for reverse charge (btw verlegd) and intra-EU supplies the customer VAT number is required."},"CustomerPatch":{"type":"object","properties":{"type":{"type":"string","enum":["business","individual"]},"name":{"type":"string","minLength":1,"maxLength":200},"contactName":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"email":{"anyOf":[{"anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},{"type":"string","const":""}]},"emailCc":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"addressLine1":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"addressLine2":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"postalCode":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"city":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"country":{"type":"string","minLength":2,"maxLength":2},"kvkNumber":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"vatNumber":{"anyOf":[{"type":"string","maxLength":30},{"type":"null"}]},"peppolId":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"defaultVatTreatment":{"anyOf":[{"type":"string","enum":["standard","reverse_charge","intra_eu","export","kor","exempt"]},{"type":"null"}]},"defaultSupplyType":{"anyOf":[{"type":"string","enum":["goods","services"]},{"type":"null"}]},"paymentTermDays":{"anyOf":[{"type":"integer","minimum":0,"maximum":365},{"type":"null"}]},"locale":{"anyOf":[{"type":"string","enum":["nl","en","de","fr"]},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"defaultLayoutId":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"archived":{"type":"boolean"}},"description":"Partial customer update. `archived: true|false` archives or restores the customer."},"ProductInput":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"unit":{"default":"C62","type":"string","minLength":1,"maxLength":3},"unitPriceCents":{"type":"integer","minimum":-100000000000,"maximum":100000000000},"vatRate":{"type":["string","number"]},"sku":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]}},"required":["name","unitPriceCents"],"description":"A product or service with a default price (excl. VAT) and VAT rate."},"ProductPatch":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"unit":{"type":"string","minLength":1,"maxLength":3},"unitPriceCents":{"type":"integer","minimum":-100000000000,"maximum":100000000000},"vatRate":{"type":["string","number"]},"sku":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"archived":{"type":"boolean"}},"description":"Partial product update. `archived: true|false` archives or restores the product."},"InvoiceLineInput":{"type":"object","properties":{"description":{"type":"string","maxLength":2000,"description":"What you deliver, e.g. \"Webdesign – september\"."},"quantity":{"type":["string","number"],"description":"Decimal, string or number. \"1.5\" or 1.5."},"unit":{"default":"C62","type":"string","minLength":1,"maxLength":3,"description":"UN/ECE Rec 20 unit code: C62 piece (default), HUR hour, DAY day, MON month, KGM kilogram, …"},"unitPriceCents":{"type":"integer","minimum":-100000000000,"maximum":100000000000,"description":"Price per unit EXCLUDING VAT, in euro cents. €85.00 = 8500."},"discountPercent":{"type":["string","number"],"description":"Line discount in percent (0–100)."},"vatRate":{"type":["string","number"],"description":"VAT rate in percent: 21, 9 or 0. Ignored (0%) for non-standard VAT treatments."},"productId":{"type":["string","null"],"description":"Optional product this line came from."}},"required":["description","unitPriceCents"],"description":"One invoice line. Prices are excl. VAT in cents; quantity and percentages are decimals (string or number)."},"InvoiceInput":{"type":"object","properties":{"kind":{"default":"invoice","type":"string","enum":["invoice","credit_note"],"description":"invoice (default) or credit_note. Credit notes for an existing invoice are easier via POST /invoices/{id}/credit-note."},"customerId":{"type":["string","null"],"description":"Id of an existing customer."},"customer":{"anyOf":[{"$ref":"#/components/schemas/CustomerInput"},{"type":"null"}],"description":"Inline customer data instead of customerId. A customer record is created for it."},"number":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"description":"Normally left empty: the number is assigned when you issue. Must be unique."},"issueDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Invoice date (factuurdatum). Default: today."},"dueDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Due date. Default: issue date + payment term."},"supplyDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}],"description":"Date of supply (leverdatum) if different from the invoice date."},"supplyPeriodEnd":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}],"description":"End of the supply period, for services delivered over a period."},"currency":{"type":"string","minLength":3,"maxLength":3,"description":"ISO 4217 code. Default: EUR."},"locale":{"type":"string","enum":["nl","en","de","fr"],"description":"Document language: nl, en, de or fr."},"vatTreatment":{"type":"string","enum":["standard","reverse_charge","intra_eu","export","kor","exempt"],"description":"standard (default), reverse_charge (btw verlegd, NL B2B), intra_eu (ICP, EU B2B), export (outside the EU), kor (small business scheme), exempt. Non-standard treatments charge 0% VAT and print the required legal note."},"supplyType":{"type":"string","enum":["goods","services"]},"vatExemptionReason":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"exchangeRate":{"type":["string","number","null"]},"exchangeRateDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"exchangeRateSource":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"creditedInvoiceId":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"creditedInvoiceNumber":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"creditedInvoiceDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"reference":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"Your own reference, e.g. a project or order number."},"buyerReference":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"description":"The customer's reference (PO number / inkoopordernummer). Some Peppol receivers require it."},"notes":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"description":"Text printed above the totals."},"footer":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"description":"Footer text."},"paymentLink":{"anyOf":[{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},{"type":"string","const":""}],"description":"Optional payment URL (e.g. a Tikkie or Mollie link) printed on the invoice."},"showEpcQr":{"type":"boolean","description":"Print the EPC QR code (SEPA payment QR) for banking apps."},"layoutId":{"type":["string","null"],"description":"Pro: layout for this invoice (preset:classic|modern|minimal or a saved template id). Omit or null: the customer's layout, then the business default / house style. On Free only null or preset:classic is accepted (and the house style is used)."},"lines":{"maxItems":500,"type":"array","items":{"$ref":"#/components/schemas/InvoiceLineInput"},"description":"Invoice lines (max. 500)."}},"description":"Creates a DRAFT invoice or credit note. Omitted fields default from the customer and your business profile (payment term, VAT treatment, locale, notes, layout)."},"InvoiceUpdate":{"type":"object","properties":{"customerId":{"type":["string","null"]},"customer":{"anyOf":[{"$ref":"#/components/schemas/CustomerInput"},{"type":"null"}]},"number":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"issueDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"dueDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"supplyDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"supplyPeriodEnd":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"currency":{"type":"string","minLength":3,"maxLength":3},"locale":{"type":"string","enum":["nl","en","de","fr"]},"vatTreatment":{"type":"string","enum":["standard","reverse_charge","intra_eu","export","kor","exempt"]},"supplyType":{"type":"string","enum":["goods","services"]},"vatExemptionReason":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"exchangeRate":{"type":["string","number","null"]},"exchangeRateDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"exchangeRateSource":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"creditedInvoiceId":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"creditedInvoiceNumber":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"creditedInvoiceDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"reference":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"buyerReference":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"notes":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}]},"footer":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}]},"paymentLink":{"anyOf":[{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},{"type":"string","const":""}]},"showEpcQr":{"type":"boolean"},"layoutId":{"type":["string","null"]},"lines":{"maxItems":500,"type":"array","items":{"$ref":"#/components/schemas/InvoiceLineInput"}}},"description":"Partial update of a draft. `lines` replaces all lines when given."},"IssueInvoice":{"type":"object","properties":{"number":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"description":"Override the generated number (must be unique)."},"issueDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Override the invoice date; the due date moves along."}},"description":"Optional overrides when issuing."},"MarkPaid":{"type":"object","properties":{"paidAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"description":"Payment date (defaults to today)."},"SendInvoice":{"type":"object","properties":{"to":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"description":"Recipients. Default: the customer email."},"cc":{"maxItems":10,"type":"array","items":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"description":"CC recipients."},"subject":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}],"description":"Subject. Default: your template."},"message":{"anyOf":[{"type":"string","maxLength":5000},{"type":"null"}],"description":"Message body (plain text). Default: your template."},"attachUbl":{"default":true,"type":"boolean","description":"Attach the UBL e-invoice next to the PDF."}},"description":"Email options. Defaults: the customer email (+ CC), your subject/message templates, UBL attached."},"DuplicateInvoice":{"type":"object","properties":{"issueDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"dueDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"supplyDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"supplyPeriodEnd":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]}},"description":"Optional dates for the new draft (default: today + payment term)."},"PreviewPdf":{"type":"object","properties":{"invoice":{"anyOf":[{"$ref":"#/components/schemas/InvoiceInput"},{"type":"null"}]},"layoutId":{"anyOf":[{"type":"string","minLength":1,"maxLength":100},{"type":"null"}]},"layout":{"anyOf":[{"$ref":"#/components/schemas/LayoutConfig"},{"type":"null"}]}},"description":"Unsaved invoice and/or layout to preview. Without `invoice` a realistic sample invoice is used."},"LayoutConfig":{"type":"object","properties":{"template":{"type":"string","enum":["classic","modern","minimal"]},"primaryColor":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"accentColor":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"font":{"type":"string","enum":["Helvetica","Roboto","Times"]},"logoPosition":{"type":"string","enum":["left","right","center"]},"logoMaxHeight":{"type":"number","minimum":20,"maximum":160},"showLogo":{"type":"boolean"},"showEpcQr":{"type":"boolean"},"showPaymentLink":{"type":"boolean"},"headerText":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"footerText":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"labels":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":100}}},"pageSize":{"type":"string","enum":["A4","LETTER"]}},"required":["template","primaryColor","accentColor","font","logoPosition","logoMaxHeight","showLogo","showEpcQr","showPaymentLink","pageSize"],"description":"Visual configuration of an invoice layout."},"HouseStyle":{"type":"object","properties":{"template":{"type":"string","enum":["classic","modern","minimal"]},"primaryColor":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"accentColor":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"logoPosition":{"type":"string","enum":["left","right","center"]},"logoMaxHeight":{"type":"number","minimum":20,"maximum":160},"showLogo":{"type":"boolean"},"showEpcQr":{"type":"boolean"},"showPaymentLink":{"type":"boolean"}},"required":["template","primaryColor","accentColor","logoPosition","logoMaxHeight","showLogo","showEpcQr","showPaymentLink"],"description":"The house style (every plan): template, primary and accent colour (#rrggbb), logo position and height (pt), and whether the logo, the EPC payment QR and the payment link are shown. Font, page size and texts come from the template preset; saved templates (Pro) can change those too."},"LayoutInput":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"config":{"$ref":"#/components/schemas/LayoutConfig"}},"required":["name","config"],"description":"A saved template (custom layout, Pro)."},"LayoutUpdate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"config":{"type":"object","properties":{"template":{"type":"string","enum":["classic","modern","minimal"]},"primaryColor":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"accentColor":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"font":{"type":"string","enum":["Helvetica","Roboto","Times"]},"logoPosition":{"type":"string","enum":["left","right","center"]},"logoMaxHeight":{"type":"number","minimum":20,"maximum":160},"showLogo":{"type":"boolean"},"showEpcQr":{"type":"boolean"},"showPaymentLink":{"type":"boolean"},"headerText":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"footerText":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"labels":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","maxLength":100}}},"pageSize":{"type":"string","enum":["A4","LETTER"]}}}},"description":"Name and/or a partial config, merged over the stored config."},"RecurringInput":{"type":"object","properties":{"templateInvoiceId":{"type":"string"},"frequency":{"type":"string","enum":["weekly","monthly","quarterly","yearly"]},"interval":{"default":1,"type":"integer","minimum":1,"maximum":12},"nextRunDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"endDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"autoIssue":{"default":true,"type":"boolean"},"autoSend":{"default":false,"type":"boolean"},"active":{"default":true,"type":"boolean"}},"required":["templateInvoiceId","frequency","nextRunDate"],"description":"A recurring schedule: the template invoice is duplicated on every run."},"RecurringUpdate":{"type":"object","properties":{"frequency":{"type":"string","enum":["weekly","monthly","quarterly","yearly"]},"interval":{"type":"integer","minimum":1,"maximum":12},"nextRunDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"endDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]},"autoIssue":{"type":"boolean"},"autoSend":{"type":"boolean"},"active":{"type":"boolean"}},"description":"Partial update of a recurring schedule."},"EmailDomainInput":{"type":"object","properties":{"domain":{"type":"string","pattern":"^(?!-)[a-z0-9-]{1,63}(\\.[a-z0-9-]{1,63})+$"},"fromLocalPart":{"default":"facturen","type":"string","pattern":"^[a-z0-9._+-]{1,64}$"},"fromName":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]}},"required":["domain"],"description":"A custom sender domain (Pro)."},"CheckoutInput":{"type":"object","properties":{"interval":{"type":"string","enum":["month","year"]},"locale":{"description":"Language of the Stripe Checkout page and the return page.","type":"string","enum":["nl","en"]}},"required":["interval"],"description":"Billing interval for Pro: €7/month or €70/year (excl. VAT)."},"BillingPortalInput":{"type":"object","properties":{"locale":{"description":"Language of the billing portal and the return page.","type":"string","enum":["nl","en"]}},"description":"Open the Stripe billing portal."},"VatBreakdownRow":{"type":"object","properties":{"category":{"type":"string","enum":["S","Z","E","AE","K","G","O"],"description":"UNCL5305 VAT category (S standard, Z zero, E exempt, AE reverse charge, K intra-EU, G export, O outside scope)."},"rate":{"type":"string","description":"VAT rate in percent, e.g. \"21\"."},"taxableCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in euro cents (integer). 12345 = €123.45."},"vatCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in euro cents (integer). 12345 = €123.45."}},"required":["category","rate","taxableCents","vatCents"]},"ComplianceIssue":{"type":"object","properties":{"level":{"type":"string","enum":["error","warning","info"],"description":"Errors block issuing; warnings should be checked; info is good to know."},"field":{"type":"string","description":"Field path, e.g. seller.vatNumber, customer.address, lines."},"code":{"type":"string","description":"Stable code of the rule, e.g. sellerVatRequired, customerVatRequiredForReverseCharge."}},"required":["level","field","code"],"description":"A Dutch invoice requirement (art. 35a Wet OB) or Peppol rule that is not met."},"SellerSnapshot":{"type":"object","properties":{"name":{"type":"string"},"legalName":{"type":["string","null"]},"addressLine1":{"type":["string","null"]},"addressLine2":{"type":["string","null"]},"postalCode":{"type":["string","null"]},"city":{"type":["string","null"]},"country":{"type":"string","description":"ISO 3166-1 alpha-2 country code, e.g. NL."},"kvkNumber":{"description":"KvK number (Dutch Chamber of Commerce).","type":["string","null"]},"vatNumber":{"description":"VAT number (btw-id), e.g. NL123456789B01.","type":["string","null"]},"iban":{"type":["string","null"]},"bic":{"type":["string","null"]},"bankAccountName":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"website":{"type":["string","null"]},"peppolId":{"type":["string","null"]}},"required":["name","country"],"description":"Seller data as printed on the invoice. Frozen at issue time."},"CustomerSnapshot":{"type":"object","properties":{"type":{"type":"string","enum":["business","individual"]},"name":{"type":"string"},"contactName":{"type":["string","null"]},"email":{"type":["string","null"]},"addressLine1":{"type":["string","null"]},"addressLine2":{"type":["string","null"]},"postalCode":{"type":["string","null"]},"city":{"type":["string","null"]},"country":{"type":"string","description":"ISO 3166-1 alpha-2 country code, e.g. NL."},"kvkNumber":{"type":["string","null"]},"vatNumber":{"type":["string","null"]},"peppolId":{"type":["string","null"]}},"required":["type","name","country"],"description":"Customer data as printed on the invoice. Frozen at issue time."},"Business":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"legalName":{"type":["string","null"]},"addressLine1":{"type":["string","null"]},"addressLine2":{"type":["string","null"]},"postalCode":{"type":["string","null"]},"city":{"type":["string","null"]},"country":{"type":"string"},"kvkNumber":{"description":"KvK number (8 digits).","type":["string","null"]},"vatNumber":{"description":"VAT number (btw-id), e.g. NL123456789B01.","type":["string","null"]},"iban":{"type":["string","null"]},"bic":{"type":["string","null"]},"bankAccountName":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"website":{"type":["string","null"]},"peppolId":{"type":["string","null"]},"hasLogo":{"type":"boolean","description":"Logo bytes are served by GET /api/v1/business/logo."},"logoMime":{"type":["string","null"]},"defaultVatTreatment":{"type":"string","enum":["standard","reverse_charge","intra_eu","export","kor","exempt"]},"defaultVatRate":{"type":"string","description":"Decimal as a string with a dot, e.g. \"21\" or \"1.5\"."},"defaultPaymentTermDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"defaultCurrency":{"type":"string"},"defaultInvoiceLocale":{"type":"string"},"defaultNotes":{"type":["string","null"]},"defaultFooter":{"type":["string","null"]},"defaultPaymentLink":{"type":["string","null"]},"defaultLayoutId":{"description":"null = the house style; preset:classic|modern|minimal (every plan) or a saved template id (Pro).","type":["string","null"]},"houseStyle":{"$ref":"#/components/schemas/HouseStyle"},"showEpcQrByDefault":{"type":"boolean"},"invoiceNumberFormat":{"type":"string","description":"Tokens: {YYYY} {YY} {MM} {SEQ} {SEQ:n}. Example: \"{YYYY}-{SEQ:4}\" → 2026-0001."},"nextInvoiceSequence":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"creditNoteNumberFormat":{"type":"string"},"nextCreditNoteSequence":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"resetSequenceYearly":{"type":"boolean"},"sequenceYear":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"remindersEnabled":{"type":"boolean"},"reminderSchedule":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"description":"Days after the due date on which reminders go out (Pro)."},"reminderMessage":{"type":["string","null"]},"invoiceEmailSubject":{"type":["string","null"]},"invoiceEmailMessage":{"type":["string","null"]},"defaultSupplyType":{"type":"string","enum":["goods","services"],"description":"Default for new invoices: goods or services (drives the intra-EU / export legal notes)."},"defaultVatExemptionReason":{"description":"Default legal basis printed on exempt invoices.","type":["string","null"]},"notInHandelsregister":{"type":"boolean","description":"True when the business is not registered in the Dutch trade register (no KvK number required)."},"createdAt":{"type":"string","description":"ISO 8601 timestamp (UTC)."},"updatedAt":{"type":"string","description":"ISO 8601 timestamp (UTC)."}},"required":["id","name","legalName","addressLine1","addressLine2","postalCode","city","country","kvkNumber","vatNumber","iban","bic","bankAccountName","email","phone","website","peppolId","hasLogo","logoMime","defaultVatTreatment","defaultVatRate","defaultPaymentTermDays","defaultCurrency","defaultInvoiceLocale","defaultNotes","defaultFooter","defaultPaymentLink","defaultLayoutId","houseStyle","showEpcQrByDefault","invoiceNumberFormat","nextInvoiceSequence","creditNoteNumberFormat","nextCreditNoteSequence","resetSequenceYearly","sequenceYear","remindersEnabled","reminderSchedule","reminderMessage","invoiceEmailSubject","invoiceEmailMessage","defaultSupplyType","defaultVatExemptionReason","notInHandelsregister","createdAt","updatedAt"],"description":"Your business profile. Never contains logo bytes."},"Customer":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["business","individual"]},"name":{"type":"string"},"contactName":{"type":["string","null"]},"email":{"type":["string","null"]},"emailCc":{"type":["string","null"]},"phone":{"type":["string","null"]},"addressLine1":{"type":["string","null"]},"addressLine2":{"type":["string","null"]},"postalCode":{"type":["string","null"]},"city":{"type":["string","null"]},"country":{"type":"string"},"kvkNumber":{"type":["string","null"]},"vatNumber":{"type":["string","null"]},"peppolId":{"type":["string","null"]},"defaultVatTreatment":{"anyOf":[{"type":"string","enum":["standard","reverse_charge","intra_eu","export","kor","exempt"]},{"type":"null"}]},"paymentTermDays":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"locale":{"type":["string","null"]},"notes":{"type":["string","null"]},"archived":{"type":"boolean"},"archivedAt":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp (UTC)."},{"type":"null"}]},"defaultSupplyType":{"anyOf":[{"type":"string","enum":["goods","services"]},{"type":"null"}],"description":"Supply type for new invoices to this customer (null = business default)."},"defaultLayoutId":{"description":"Pro: layout for invoices to this customer (preset:<template> or a saved template id). null = the business default.","type":["string","null"]},"createdAt":{"type":"string","description":"ISO 8601 timestamp (UTC)."},"updatedAt":{"type":"string","description":"ISO 8601 timestamp (UTC)."}},"required":["id","type","name","contactName","email","emailCc","phone","addressLine1","addressLine2","postalCode","city","country","kvkNumber","vatNumber","peppolId","defaultVatTreatment","paymentTermDays","locale","notes","archived","archivedAt","defaultSupplyType","defaultLayoutId","createdAt","updatedAt"]},"Product":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"unit":{"type":"string","description":"UN/ECE Rec 20 unit code: C62 piece, HUR hour, DAY day, MON month, …"},"unitPriceCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in euro cents (integer). 12345 = €123.45."},"vatRate":{"type":"string","description":"Decimal as a string with a dot, e.g. \"21\" or \"1.5\"."},"sku":{"type":["string","null"]},"archived":{"type":"boolean"},"archivedAt":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp (UTC)."},{"type":"null"}]},"createdAt":{"type":"string","description":"ISO 8601 timestamp (UTC)."},"updatedAt":{"type":"string","description":"ISO 8601 timestamp (UTC)."}},"required":["id","name","description","unit","unitPriceCents","vatRate","sku","archived","archivedAt","createdAt","updatedAt"]},"DeleteResult":{"type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean"},"archived":{"type":"boolean"}},"required":["id","deleted","archived"],"description":"Deleted, or archived when still used by invoices."},"InvoiceLine":{"type":"object","properties":{"id":{"type":"string"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"productId":{"type":["string","null"]},"description":{"type":"string"},"quantity":{"type":"string","description":"Decimal as a string with a dot, e.g. \"21\" or \"1.5\"."},"unit":{"type":"string"},"unitPriceCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in euro cents (integer). 12345 = €123.45."},"discountPercent":{"type":"string","description":"Decimal as a string with a dot, e.g. \"21\" or \"1.5\"."},"vatRate":{"type":"string","description":"Decimal as a string with a dot, e.g. \"21\" or \"1.5\"."},"lineTotalCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"quantity × unit price − discount, excl. VAT, in cents."}},"required":["id","position","productId","description","quantity","unit","unitPriceCents","discountPercent","vatRate","lineTotalCents"]},"VatCheck":{"type":"object","properties":{"vatNumber":{"type":"string"},"countryCode":{"type":"string"},"status":{"type":"string","enum":["valid","invalid","unavailable"],"description":"unavailable = VIES (or the member state) could not answer; try again later."},"name":{"type":["string","null"]},"address":{"type":["string","null"]},"requestDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Calendar date, YYYY-MM-DD."},{"type":"null"}]},"consultationNumber":{"description":"VIES consultation number (proof of the check), when your own VAT number is set.","type":["string","null"]},"error":{"type":["string","null"]},"checkedAt":{"type":"string","description":"ISO 8601 timestamp (UTC)."},"source":{"type":"string","const":"VIES"}},"required":["vatNumber","countryCode","status","checkedAt","source"],"description":"Result of a VIES check of an EU VAT number. Stored on intra-EU invoices as evidence."},"Invoice":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["invoice","credit_note"]},"status":{"type":"string","enum":["draft","issued","sent","paid","cancelled"]},"number":{"description":"Assigned when issued (gap-free per kind). Null for drafts.","type":["string","null"]},"customerId":{"type":["string","null"]},"creditedInvoiceId":{"description":"For credit notes: the invoice being credited.","type":["string","null"]},"issueDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Calendar date, YYYY-MM-DD."},"dueDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Calendar date, YYYY-MM-DD."},"supplyDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Calendar date, YYYY-MM-DD."},{"type":"null"}]},"supplyPeriodEnd":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Calendar date, YYYY-MM-DD."},{"type":"null"}]},"currency":{"type":"string"},"locale":{"type":"string","description":"Document language: nl, en, de or fr."},"vatTreatment":{"type":"string","enum":["standard","reverse_charge","intra_eu","export","kor","exempt"],"description":"standard, reverse_charge (btw verlegd), intra_eu (ICP), export, kor (small business scheme) or exempt. Non-standard treatments charge 0% and print the legal note."},"reference":{"type":["string","null"]},"buyerReference":{"type":["string","null"]},"notes":{"type":["string","null"]},"footer":{"type":["string","null"]},"paymentLink":{"type":["string","null"]},"showEpcQr":{"type":"boolean"},"layoutId":{"type":["string","null"]},"sellerSnapshot":{"anyOf":[{"$ref":"#/components/schemas/SellerSnapshot"},{"type":"null"}]},"customerSnapshot":{"anyOf":[{"$ref":"#/components/schemas/CustomerSnapshot"},{"type":"null"}]},"subtotalCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in euro cents (integer). 12345 = €123.45."},"vatTotalCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in euro cents (integer). 12345 = €123.45."},"totalCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Total incl. VAT in cents. Credit notes store positive amounts."},"vatBreakdown":{"type":"array","items":{"$ref":"#/components/schemas/VatBreakdownRow"}},"issuedAt":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp (UTC)."},{"type":"null"}]},"sentAt":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp (UTC)."},{"type":"null"}]},"paidAt":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp (UTC)."},{"type":"null"}]},"cancelledAt":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp (UTC)."},{"type":"null"}]},"reminderCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lastReminderAt":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp (UTC)."},{"type":"null"}]},"recurringScheduleId":{"type":["string","null"]},"expiresAt":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp (UTC)."},{"type":"null"}],"description":"Free plan: deleted after this moment (60 days after creation; postponed when the deletion warning e-mail could not be sent in time). Pro: null (kept 7 years)."},"createdAt":{"type":"string","description":"ISO 8601 timestamp (UTC)."},"updatedAt":{"type":"string","description":"ISO 8601 timestamp (UTC)."},"lines":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceLine"}},"displayStatus":{"type":"string","enum":["draft","issued","sent","paid","cancelled","overdue"],"description":"Status for display: adds overdue for unpaid invoices past their due date."},"seller":{"$ref":"#/components/schemas/SellerSnapshot"},"customer":{"anyOf":[{"$ref":"#/components/schemas/CustomerSnapshot"},{"type":"null"}]},"compliance":{"type":"array","items":{"$ref":"#/components/schemas/ComplianceIssue"},"description":"Compliance check (drafts only). Errors must be fixed before issuing."},"creditedInvoiceNumber":{"type":"string"},"supplyType":{"type":"string","enum":["goods","services"],"description":"goods or services. Decides the legal note on intra-EU and export invoices."},"vatExemptionReason":{"description":"Legal basis printed on exempt invoices.","type":["string","null"]},"exchangeRate":{"anyOf":[{"type":"string","description":"Decimal as a string with a dot, e.g. \"21\" or \"1.5\"."},{"type":"null"}],"description":"EUR per 1 unit of `currency` (non-EUR invoices). See GET /exchange-rate."},"exchangeRateDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Calendar date, YYYY-MM-DD."},{"type":"null"}]},"exchangeRateSource":{"description":"e.g. ECB or manual.","type":["string","null"]},"vatTotalEurCents":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in euro cents (integer). 12345 = €123.45."},{"type":"null"}],"description":"VAT total in euro (required on non-EUR invoices); null for EUR invoices."},"creditedInvoiceDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Calendar date, YYYY-MM-DD."},{"type":"null"}],"description":"Issue date of the credited invoice (credit notes)."},"creditedInvoiceExternal":{"type":"boolean","description":"The credited invoice was not made in EenFactuurMaken.nl (number/date entered by hand)."},"vatCheck":{"anyOf":[{"$ref":"#/components/schemas/VatCheck"},{"type":"null"}],"description":"VIES evidence for the customer VAT number (intra-EU)."},"publicUrl":{"description":"Public \"view online\" page (/i/{token}) with pay button, PDF and UBL downloads. No login needed: share it only with the customer. Null for drafts or when switched off (POST/DELETE /invoices/{id}/public-link).","type":["string","null"]},"firstViewedAt":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp (UTC)."},{"type":"null"}],"description":"When the customer first opened the public page."},"viewedAt":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp (UTC)."},{"type":"null"}],"description":"When the customer last opened the public page."},"viewCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How often the customer opened the public page (reloads within 30 minutes count once; your own visits never count)."},"downloadedAt":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp (UTC)."},{"type":"null"}],"description":"First time you downloaded this document (PDF with ?download=1, UBL, a ZIP export or a signed download link). Inline previews and your customer's downloads don't count. Null = never."},"lastDownloadedAt":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp (UTC)."},{"type":"null"}],"description":"Most recent download by you."},"creditNotes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":["string","null"]},"status":{"type":"string","enum":["draft","issued","sent","paid","cancelled"]},"totalCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in euro cents (integer). 12345 = €123.45."}},"required":["id","number","status","totalCents"]},"description":"Invoices only: credit notes that reference this invoice (any status)."}},"required":["id","kind","status","number","customerId","creditedInvoiceId","issueDate","dueDate","supplyDate","supplyPeriodEnd","currency","locale","vatTreatment","reference","buyerReference","notes","footer","paymentLink","showEpcQr","layoutId","sellerSnapshot","customerSnapshot","subtotalCents","vatTotalCents","totalCents","vatBreakdown","issuedAt","sentAt","paidAt","cancelledAt","reminderCount","lastReminderAt","recurringScheduleId","expiresAt","createdAt","updatedAt","lines","displayStatus","seller","customer","compliance","supplyType","vatExemptionReason","exchangeRate","exchangeRateDate","exchangeRateSource","vatTotalEurCents","creditedInvoiceDate","creditedInvoiceExternal","vatCheck","publicUrl","firstViewedAt","viewedAt","viewCount","downloadedAt","lastDownloadedAt","creditNotes"],"description":"An invoice or credit note."},"InvoiceSummary":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["invoice","credit_note"]},"status":{"type":"string","enum":["draft","issued","sent","paid","cancelled"]},"displayStatus":{"type":"string","enum":["draft","issued","sent","paid","cancelled","overdue"]},"number":{"type":["string","null"]},"issueDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Calendar date, YYYY-MM-DD."},"dueDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Calendar date, YYYY-MM-DD."},"customerId":{"type":["string","null"]},"customerName":{"type":["string","null"]},"totalCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in euro cents (integer). 12345 = €123.45."},"currency":{"type":"string"},"paidAt":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp (UTC)."},{"type":"null"}]},"createdAt":{"type":"string","description":"ISO 8601 timestamp (UTC)."},"expiresAt":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp (UTC)."},{"type":"null"}],"description":"Free plan: deleted after this moment. Pro: null."},"downloadedAt":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp (UTC)."},{"type":"null"}],"description":"First download by you (null = never downloaded)."},"lastDownloadedAt":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp (UTC)."},{"type":"null"}]}},"required":["id","kind","status","displayStatus","number","issueDate","dueDate","customerId","customerName","totalCents","currency","paidAt","createdAt","expiresAt","downloadedAt","lastDownloadedAt"],"description":"List item of GET /api/v1/invoices."},"NextNumberPreview":{"type":"object","properties":{"invoice":{"type":"string"},"creditNote":{"type":"string"}},"required":["invoice","creditNote"],"description":"The numbers the next issued invoice and credit note would get. Nothing is reserved."},"PlanLimits":{"type":"object","properties":{"invoicesPerMonth":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"layoutStyling":{"type":"boolean","description":"House style: template, colours, logo placement, QR / payment link (every plan)."},"savedTemplates":{"type":"boolean","description":"Saved templates with fonts, texts and labels, and a layout per customer or invoice (Pro)."},"customLayouts":{"type":"boolean","description":"Deprecated: same as savedTemplates."},"recurringInvoices":{"type":"boolean"},"customEmailDomain":{"type":"boolean"},"automaticReminders":{"type":"boolean"},"zipExport":{"type":"boolean"},"retentionDays":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"maxCustomers":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"maxProducts":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"emailSending":{"type":"boolean"}},"required":["invoicesPerMonth","layoutStyling","savedTemplates","customLayouts","recurringInvoices","customEmailDomain","automaticReminders","zipExport","retentionDays","maxCustomers","maxProducts","emailSending"],"description":"Limits of a plan. null = unlimited."},"Me":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"locale":{"type":"string"},"emailVerified":{"type":"boolean"},"twoFactorEnabled":{"type":"boolean"}},"required":["id","email","name","locale","emailVerified","twoFactorEnabled"]},"plan":{"type":"string","enum":["free","pro"]},"limits":{"$ref":"#/components/schemas/PlanLimits"},"usage":{"type":"object","properties":{"invoicesThisMonth":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["invoicesThisMonth"]},"subscription":{"anyOf":[{"type":"object","properties":{"plan":{"type":"string","enum":["free","pro"]},"status":{"type":"string","enum":["active","pending","canceled","past_due"]},"interval":{"anyOf":[{"type":"string","enum":["month","year"]},{"type":"null"}]},"currentPeriodEnd":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp (UTC)."},{"type":"null"}]},"cancelAt":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp (UTC)."},{"type":"null"}]}},"required":["plan","status","interval","currentPeriodEnd","cancelAt"]},{"type":"null"}]}},"required":["user","plan","limits","usage","subscription"]},"VatQuarterReport":{"type":"object","properties":{"year":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"quarter":{"anyOf":[{"type":"number","const":1},{"type":"number","const":2},{"type":"number","const":3},{"type":"number","const":4}]},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Calendar date, YYYY-MM-DD."},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Calendar date, YYYY-MM-DD."},"rubriek1a":{"type":"object","properties":{"taxableCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in euro cents (integer). 12345 = €123.45."},"vatCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in euro cents (integer). 12345 = €123.45."}},"required":["taxableCents","vatCents"],"description":"1a: standard rate (21%)."},"rubriek1b":{"type":"object","properties":{"taxableCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in euro cents (integer). 12345 = €123.45."},"vatCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in euro cents (integer). 12345 = €123.45."}},"required":["taxableCents","vatCents"],"description":"1b: reduced rate (9%)."},"rubriek1c":{"type":"object","properties":{"taxableCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in euro cents (integer). 12345 = €123.45."},"vatCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in euro cents (integer). 12345 = €123.45."}},"required":["taxableCents","vatCents"],"description":"1c: other rates."},"rubriek1e":{"type":"object","properties":{"taxableCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in euro cents (integer). 12345 = €123.45."},"vatCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in euro cents (integer). 12345 = €123.45."}},"required":["taxableCents","vatCents"],"description":"1e: 0% or not taxed with you (incl. btw verlegd)."},"rubriek3a":{"type":"object","properties":{"taxableCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in euro cents (integer). 12345 = €123.45."},"vatCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in euro cents (integer). 12345 = €123.45."}},"required":["taxableCents","vatCents"],"description":"3a: supplies outside the EU (export)."},"rubriek3b":{"type":"object","properties":{"taxableCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in euro cents (integer). 12345 = €123.45."},"vatCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in euro cents (integer). 12345 = €123.45."}},"required":["taxableCents","vatCents"],"description":"3b: intra-EU supplies (ICP). Also file these in the ICP declaration."},"reverseChargeCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in euro cents (integer). 12345 = €123.45."},"exemptCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in euro cents (integer). 12345 = €123.45."},"vatDueCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"VAT owed (rubriek 5a, before input VAT)."},"perRate":{"type":"array","items":{"$ref":"#/components/schemas/VatBreakdownRow"}},"documentCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["year","quarter","from","to","rubriek1a","rubriek1b","rubriek1c","rubriek1e","rubriek3a","rubriek3b","reverseChargeCents","exemptCents","vatDueCents","perRate","documentCount"],"description":"Amounts for one quarter of the Dutch VAT return (btw-aangifte). Credit notes count negative."},"Stats":{"type":"object","properties":{"currency":{"type":"string"},"today":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Calendar date, YYYY-MM-DD."},"outstanding":{"type":"object","properties":{"totalCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in euro cents (integer). 12345 = €123.45."},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["totalCents","count"]},"overdue":{"type":"object","properties":{"totalCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in euro cents (integer). 12345 = €123.45."},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["totalCents","count"]},"paidThisMonth":{"type":"object","properties":{"totalCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in euro cents (integer). 12345 = €123.45."},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["totalCents","count"]},"revenueYtdCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Revenue excl. VAT this calendar year (credit notes negative)."},"vat":{"type":"object","properties":{"current":{"$ref":"#/components/schemas/VatQuarterReport"},"previous":{"$ref":"#/components/schemas/VatQuarterReport"},"selected":{"$ref":"#/components/schemas/VatQuarterReport"}},"required":["current","previous"]},"quota":{"type":"object","properties":{"used":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"limit":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"remaining":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"period":{"type":"string","description":"YYYY-MM"}},"required":["used","limit","remaining","period"]}},"required":["currency","today","outstanding","overdue","paidThisMonth","revenueYtdCents","vat","quota"]},"Layout":{"type":"object","properties":{"id":{"type":"string","description":"Custom layout id, or preset:<template> for built-in presets."},"name":{"type":"string"},"config":{"$ref":"#/components/schemas/LayoutConfig"},"builtIn":{"type":"boolean"},"preset":{"anyOf":[{"type":"string","enum":["classic","modern","minimal"]},{"type":"null"}]},"isDefault":{"type":"boolean"},"available":{"type":"boolean","description":"Usable on your plan. Presets: every plan as the account default (per customer / per invoice needs Pro). Saved templates: Pro. Any layout can be previewed."},"createdAt":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp (UTC)."},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp (UTC)."},{"type":"null"}]}},"required":["id","name","config","builtIn","preset","isDefault","available","createdAt","updatedAt"]},"RecurringSchedule":{"type":"object","properties":{"id":{"type":"string"},"templateInvoiceId":{"type":"string"},"frequency":{"type":"string","enum":["weekly","monthly","quarterly","yearly"]},"interval":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"nextRunDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Calendar date, YYYY-MM-DD."},"endDate":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Calendar date, YYYY-MM-DD."},{"type":"null"}]},"autoIssue":{"type":"boolean"},"autoSend":{"type":"boolean"},"active":{"type":"boolean"},"lastRunAt":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp (UTC)."},{"type":"null"}]},"runCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdAt":{"type":"string","description":"ISO 8601 timestamp (UTC)."},"updatedAt":{"type":"string","description":"ISO 8601 timestamp (UTC)."}},"required":["id","templateInvoiceId","frequency","interval","nextRunDate","endDate","autoIssue","autoSend","active","lastRunAt","runCount","createdAt","updatedAt"],"additionalProperties":{},"description":"A recurring schedule (Pro)."},"EmailDomain":{"type":"object","properties":{"id":{"type":"string"},"domain":{"type":"string"},"fromLocalPart":{"type":"string"},"fromName":{"type":["string","null"]},"status":{"type":"string","enum":["pending","verified","failed"]},"dnsRecords":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["TXT","CNAME","MX"]},"name":{"type":"string"},"value":{"type":"string"},"purpose":{"type":"string","enum":["dkim","spf","dmarc","mail_from","verification"]},"status":{"type":"string","enum":["pending","ok","missing"]}},"required":["type","name","value","purpose"]},"description":"DNS records to add at your DNS provider (DKIM, SPF, DMARC)."},"lastCheckedAt":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp (UTC)."},{"type":"null"}]},"verifiedAt":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp (UTC)."},{"type":"null"}]},"createdAt":{"type":"string","description":"ISO 8601 timestamp (UTC)."},"updatedAt":{"type":"string","description":"ISO 8601 timestamp (UTC)."}},"required":["id","domain","fromLocalPart","fromName","status","dnsRecords","lastCheckedAt","verifiedAt","createdAt","updatedAt"],"additionalProperties":{}},"EmailLogEntry":{"type":"object","properties":{"id":{"type":"string"},"invoiceId":{"type":["string","null"]},"type":{"type":"string","enum":["invoice","credit_note","reminder","system"]},"to":{"type":"string"},"subject":{"type":"string"},"status":{"type":"string","enum":["queued","sent","failed","bounced","delivered"]},"error":{"type":["string","null"]},"createdAt":{"type":"string","description":"ISO 8601 timestamp (UTC)."}},"required":["id","invoiceId","type","to","subject","status","error","createdAt"],"additionalProperties":{}},"Billing":{"type":"object","properties":{"plan":{"type":"string","enum":["free","pro"]},"status":{"type":"string","enum":["active","pending","canceled","past_due"]},"interval":{"anyOf":[{"type":"string","enum":["month","year"]},{"type":"null"}]},"currentPeriodEnd":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp (UTC)."},{"type":"null"}]},"cancelAt":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp (UTC)."},{"type":"null"}],"description":"Set when cancelled: Pro stays until then."},"pastDueSince":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp (UTC)."},{"type":"null"}],"description":"A renewal payment failed at this moment (grace period)."},"proEndsAt":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp (UTC)."},{"type":"null"}],"description":"When Pro ends if nothing changes (cancelled or payment problem). Null = renews."},"endedAt":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp (UTC)."},{"type":"null"}]},"renews":{"type":"boolean"},"canResume":{"type":"boolean"},"canManagePayment":{"type":"boolean","description":"POST /billing/portal is available (a Stripe subscription runs): update the payment method."},"provider":{"type":"string","enum":["stripe","fake","unavailable"],"description":"stripe in production; fake only in development without a Stripe key."},"pendingCheckout":{"type":"boolean"},"prices":{"type":"object","properties":{"month":{"type":"object","properties":{"interval":{"type":"string","enum":["month","year"]},"currency":{"type":"string"},"vatRate":{"type":"string","description":"Decimal as a string with a dot, e.g. \"21\" or \"1.5\"."},"exclVatCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in euro cents (integer). 12345 = €123.45."},"vatCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in euro cents (integer). 12345 = €123.45."},"inclVatCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in euro cents (integer). 12345 = €123.45."}},"required":["interval","currency","vatRate","exclVatCents","vatCents","inclVatCents"]},"year":{"type":"object","properties":{"interval":{"type":"string","enum":["month","year"]},"currency":{"type":"string"},"vatRate":{"type":"string","description":"Decimal as a string with a dot, e.g. \"21\" or \"1.5\"."},"exclVatCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in euro cents (integer). 12345 = €123.45."},"vatCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in euro cents (integer). 12345 = €123.45."},"inclVatCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in euro cents (integer). 12345 = €123.45."}},"required":["interval","currency","vatRate","exclVatCents","vatCents","inclVatCents"]}},"required":["month","year"]},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"},"sequenceType":{"type":"string","enum":["first","recurring","fake"]},"interval":{"anyOf":[{"type":"string","enum":["month","year"]},{"type":"null"}]},"amountCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Charged amount incl. VAT."},"description":{"type":["string","null"]},"method":{"type":["string","null"]},"createdAt":{"type":"string","description":"ISO 8601 timestamp (UTC)."},"paidAt":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp (UTC)."},{"type":"null"}]},"periodStart":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Calendar date, YYYY-MM-DD."},{"type":"null"}]},"periodEnd":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Calendar date, YYYY-MM-DD."},{"type":"null"}]},"invoiceNumber":{"description":"Our invoice number (FT2026-00001) once paid.","type":["string","null"]},"hasInvoice":{"type":"boolean","description":"GET /billing/payments/{id}/invoice returns the PDF."}},"required":["id","status","sequenceType","interval","amountCents","description","method","createdAt","paidAt","periodStart","periodEnd","invoiceNumber","hasInvoice"]}},"retention":{"type":"object","properties":{"days":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Free: invoices are deleted after this many days. Pro: null."},"windowDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Window of the counts below (30 days)."},"expiringSoon":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Issued invoices and credit notes that will be deleted within windowDays."},"expiringNotDownloaded":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Of those, the ones you never downloaded. Get them all with GET /export/expiring."},"nextExpiry":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp (UTC)."},{"type":"null"}]}},"required":["days","windowDays","expiringSoon","expiringNotDownloaded","nextExpiry"]}},"required":["plan","status","interval","currentPeriodEnd","cancelAt","pastDueSince","proEndsAt","endedAt","renews","canResume","canManagePayment","provider","pendingCheckout","prices","payments","retention"],"description":"Your EenFactuurMaken.nl subscription, prices and payments."},"CheckoutResult":{"type":"object","properties":{"checkoutUrl":{"type":"string","description":"Stripe Checkout URL. Redirect the user there."},"provider":{"type":"string","enum":["stripe","fake","unavailable"]}},"required":["checkoutUrl","provider"]},"BillingPortalResult":{"type":"object","properties":{"url":{"type":"string","description":"Short-lived Stripe billing portal URL. Redirect the user there."}},"required":["url"]},"PublicLink":{"type":"object","properties":{"regenerate":{"type":"boolean"}},"description":"Create or replace the public invoice link."},"ExchangeRate":{"type":"object","properties":{"currency":{"type":"string"},"date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Requested date."},"rateDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Date of the ECB publication used (the last one on or before `date`)."},"ecbRate":{"type":"string","description":"ECB quote: units of the currency per 1 EUR."},"rate":{"type":"string","description":"EUR per 1 unit of the currency (use this as invoice exchangeRate)."},"source":{"type":"string","const":"ECB"}},"required":["currency","date","rateDate","ecbRate","rate","source"],"description":"ECB euro reference rate."},"PublicInvoice":{"type":"object","properties":{"locale":{"type":"string","enum":["nl","en","de","fr"]},"kind":{"type":"string","enum":["invoice","credit_note"]},"state":{"type":"string","enum":["open","overdue","paid","cancelled","credit_note"]},"title":{"type":"string"},"number":{"type":"string"},"currency":{"type":"string"},"totalCents":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Amount in euro cents (integer). 12345 = €123.45."},"total":{"type":"string","description":"Formatted in the invoice language."},"issueDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Calendar date, YYYY-MM-DD."},"dueDate":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Calendar date, YYYY-MM-DD."},"paymentLink":{"type":["string","null"]},"epcQr":{"description":"EPC (SEPA) payment QR code as a PNG data URL.","type":["string","null"]},"pdfUrl":{"type":"string"},"ublUrl":{"type":["string","null"]}},"required":["locale","kind","state","title","number","currency","totalCents","total","issueDate","dueDate","paymentLink","epcQr","pdfUrl","ublUrl"],"additionalProperties":{},"description":"Display-ready invoice for the public page, in the invoice language."},"Error":{"type":"object","properties":{"error":{"type":"boolean","const":true},"url":{"type":"string"},"statusCode":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"statusMessage":{"type":"string"},"message":{"type":"string"},"data":{"type":"object","properties":{"code":{"type":"string","description":"Stable, machine-readable snake_case code, e.g. not_found, validation_failed, invoice_locked, plan_upgrade_required."},"message":{"type":"string","description":"Human-readable English message."},"details":{"description":"Extra info: zod-style issues for validation_failed, ComplianceIssue[] for invoice_not_compliant, { feature } for plan_upgrade_required."}},"required":["code","message"]}},"required":["statusCode","statusMessage","data"],"description":"Every error has this shape. Switch on data.code, not on the message."}},"responses":{"E400":{"description":"Bad request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E401":{"description":"Missing or invalid API key (`unauthenticated`, `invalid_api_key`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":401,"statusMessage":"Invalid or expired API key","data":{"code":"invalid_api_key","message":"Invalid or expired API key"}}}}},"E402":{"description":"Plan limit reached (`plan_limit_reached`) or Pro needed (`plan_upgrade_required`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":402,"statusMessage":"The free plan includes 5 invoices per month. Upgrade to Pro for unlimited invoices.","data":{"code":"plan_limit_reached","message":"The free plan includes 5 invoices per month. Upgrade to Pro for unlimited invoices.","details":{"limit":5}}}}}},"E403":{"description":"Forbidden.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E404":{"description":"Not found (also for resources of other accounts).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":404,"statusMessage":"Invoice not found","data":{"code":"not_found","message":"Invoice not found"}}}}},"E409":{"description":"Conflict with the current state, e.g. `invoice_locked`, `invoice_not_issued`, `number_taken`, `invoice_has_credit_notes`, `invoice_fully_credited`, `peppol_kvk_required`. Each operation lists its own codes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":409,"statusMessage":"This invoice has been issued and can no longer be changed. Create a credit note to correct it.","data":{"code":"invoice_locked","message":"This invoice has been issued and can no longer be changed. Create a credit note to correct it.","details":{"status":"issued"}}}}}},"E410":{"description":"Gone (expired link).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E415":{"description":"Unsupported media type.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"E422":{"description":"Validation failed (`validation_failed`, details = issues) or the invoice does not meet the Dutch requirements (`invoice_not_compliant`, details = ComplianceIssue[]).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":422,"statusMessage":"The invoice doesn't meet the Dutch invoice requirements yet","data":{"code":"invoice_not_compliant","message":"The invoice doesn't meet the Dutch invoice requirements yet","details":[{"level":"error","field":"customer.vatNumber","code":"customerVatRequiredForReverseCharge"}]}}}}},"E429":{"description":"Too many requests (`rate_limited`). Wait the number of seconds in the `Retry-After` header.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"statusCode":429,"statusMessage":"Too many requests","data":{"code":"rate_limited","message":"Too many requests","details":{"retryAfter":42}}}}}},"E503":{"description":"An external service (VIES, ECB, Stripe) is unavailable. Try again later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}