Logo

Loomy Invoices API

v1

๐ŸŒ Base URL

https://loomy-invoices.loomyloo.app

๐Ÿค– Agent Endpoints (Invoices)

GET
/api/invoices/next-number
Returns the next free invoice number for the current year (R2026-000X). Always call this first before creating.
GET
/api/invoices/:id
Fetch a single invoice by Airtable record ID.
POST
/api/invoices/:id/send
Prepares invoice for WhatsApp sending. Returns PDF URL and customer info.
POST
/api/create-invoices
Create a new invoice. Requires rechnungsnummer, jahr, laufende_nummer, kunde, etc.
GET
/api/list-invoices/
List ALL invoices (not paginated โ€” frontend handles pagination).
PUT
/api/update-invoices
Update one or more invoices. Body: { records: [{id, fields}] }
DELETE
/api/delete-invoices
Delete invoices. Body: { recordIds: ['recId1', 'recId2'] }
GET
/api/invoices/health
Health check.

๐Ÿ‘ค Customers (Kunden)

GET
/api/list-customers/
List all customers.
GET
/api/list-customers/list-by-name?name=ACME
Search by company name.
GET
/api/list-customers/list-by-email?email=a@b.de
Search by email.
POST
/api/create-customers
Create a customer.
PUT
/api/update-customers
Update customer(s).
DELETE
/api/delete-customers
Delete customer(s).

๐Ÿ“ฆ Items (Artikel)

GET
/api/list-items/
List all items.
GET
/api/list-items/search?q=Beratung
Search items by name.
POST
/api/create-items
Create an item.
PUT
/api/update-items
Update item(s).
DELETE
/api/delete-items
Delete item(s).

๐Ÿ“ Invoice Items (Positionen)

GET
/api/list-invoiceitems/
List all invoice line items.
POST
/api/create-invoiceitems
Create a line item (link to invoice via rechnung field).
PUT
/api/update-invoiceitems
Update line item(s).
DELETE
/api/delete-invoiceitems
Delete line item(s).

๐Ÿ’ฐ Payments

GET
/api/list-payments/
List all payments.
POST
/api/create-payments
Record a payment for an invoice.
PUT
/api/update-payments
Update payment(s).
DELETE
/api/delete-payments
Delete payment(s).

๐Ÿข Company Profile

GET
/api/list-companyprofile/
Get company profile.
POST
/api/create-companyprofile
Create profile.
PUT
/api/update-companyprofile
Update profile.

๐Ÿ“„ Invoice Texts

GET
/api/list-invoicetexts/
List text templates.
POST
/api/create-invoicetexts
Create a template.
PUT
/api/update-invoicetexts
Update template(s).
DELETE
/api/delete-invoicetexts
Delete template(s).

๐Ÿ”ข Numbering / Locks

GET
/api/list-numberinglocks/
List numbering locks per year.
POST
/api/create-numberinglocks
Create a lock record.
PUT
/api/update-numberinglocks
Update lock (e.g., advance letzte_nummer).

๐Ÿงช Agent Quick Recipes

1. Create a complete invoice

GET  /api/invoices/next-number
POST /api/create-invoices    (use the number)
POST /api/create-invoiceitems (link to new invoice ID)
POST /api/invoices/:id/send   (get PDF URL)
send_message(MEDIA:pdf_url)   (send to WhatsApp)

2. Check what numbers exist this year

GET /api/list-invoices/
# Filter: jahr == 2026, read laufende_nummer

3. Send existing invoice

POST /api/invoices/recInvoiceId/send
# Response contains pdf_url โ€” forward it

๐Ÿ“‹ Quick Links

Rechnungen

Open Invoices

Artikel

Open Items

Einstellungen

Open Settings

API Docs (MD)

Download API.md