Docuro API for developers
Connect your own software to Docuro: read documents and payments, send documents in, and create or issue invoices for one company. Each key belongs to one account and can never reach another account.
API version 1.15.0 · openapi.json
Authentication
The account owner creates keys in Settings → API keys and chooses what each key may do. A key is shown once; send it in every request as a Bearer token. A key can have an expiry date and can be revoked at any time.
Authorization: Bearer sf_live_…
Permissions (scopes)
Each endpoint needs one permission (the monthly summary needs two). A key gets only the permissions ticked when it was created.
There are two kinds of keys. An account-wide key reads documents, payments and files and can send documents into the inbox (read:documents, read:payments, read:files, documents:write). A company key belongs to exactly one company of the account, chosen when the key is created, and carries only invoices:write and/or invoices:read: it can never read or issue another company's invoices. One key is never both.
read:documents— documents and their details (whole account)read:payments— bank payments, their status and linked documents (whole account)read:files— short-lived links to the original files (whole account)documents:write— send documents into this account, like an upload (invoices, receipts, statements) (whole account)invoices:write— issue invoices for the chosen company (same checks as the app) (one company, chosen on the key)invoices:read— read the status of the chosen company's invoices (one company, chosen on the key)
POST /api/v1/invoices saves a DRAFT by default: no number, nothing sent. Add "issue": true to issue the invoice; "send": true works only together with "issue": true.
Invoice fields for booking systems
For a Romanian company, POST /api/v1/invoices also takes: "series" (the series code, e.g. "REPS"), "issueDate" (today or a recent past day; never a future one), "deliveryDate", "notes" (printed under the totals and sent as the e-Factura note, e.g. the booking references), "language" ("ro" or "en", for the printed document), "paid" (a payment already collected: method card, cash or bank, date and amount; printed as collected) and the buyer's "contactName" and "phone". A private person needs no postal code, and neither does a company buyer outside Romania (for a buyer abroad the postal code is optional; never send a placeholder). A Romanian company buyer still needs one. Every issued invoice returns "pdfUrl", a 5-minute link to its PDF.
Endpoints
The reference below is in English and comes straight from the OpenAPI file.
GET/api/v1/documents
List documents
Permission: read:documents
Documents of the account (deleted ones excluded unless filtered by status), ordered by id. Scope: `read:documents`.
Responses
200A page of documents400401403429
POST/api/v1/documents
Send documents into the account
Permission: documents:write
Stores one or more files in the key's account through the same intake as an upload in the app (same accepted types: PDF, images, CSV/Excel/XML/ZIP; same size and count limits; a request body of at most 100 MiB) and queues them for processing; the documents appear in `GET /documents` once processed. Optional header `Idempotency-Key`: the same key with the same files returns the first request (200), with other files 409. Scope: `documents:write`.
Responses
200The same Idempotency-Key and files again: the first request (`replayed: true`, `data.inboundId`)202Stored and queued for processing400Invalid body (`invalid_request`, `invalid_json`, `invalid_multipart`, `invalid_base64`, `no_file`), bad `Idempotency-Key` (`invalid_idempotency_key`), or a `businessId` / `bankLineId` not of this account (`unknown_business`, `unknown_bank_line`)401403409`idempotency_key_reused`: this key was already used for different files413`file_too_large` or `too_many_files`, or `request_too_large`: the whole request body is over 100 MiB (`max` in bytes; send the rest in another request)415`unsupported_type` (file) or `unsupported_media_type` (body: not multipart or JSON)429Too many requests: the per-key limit or the separate write limit (`X-RateLimit-Write-*`)
GET/api/v1/documents/{id}
One document
Permission: read:documents
404 when the id does not exist or belongs to another account. Scope: `read:documents`.
Responses
200The document401403404429
GET/api/v1/documents/{id}/file
Short-lived link to the original file
Permission: read:files
Returns a signed URL valid for 5 minutes. Fetching that URL needs no API key. 404 when the document has no file. Scope: `read:files`.
Responses
200Signed link401403404429503File links are not configured on this deployment
GET/api/v1/files/{token}
Download a file by signed link
Permission: none (a signed, short-lived link)
The URL returned by `/documents/{id}/file`. The link itself is the credential.
Responses
200The original file403Invalid link404410Link expired — request a new one
GET/api/v1/payments
Bank payments with match status
Permission: read:payments
Bank-statement lines with their match status and the ids of the documents they are matched to, ordered by id. Unmatched lines are reported as `missing` (money out), `income` (money in) or `fee` (0.00: no money moved, no document asked); the `status` filter uses the same rule. Scope: `read:payments`.
Responses
200A page of payments400401403429
GET/api/v1/periods/{period}/summary
Month summary: counts, totals, VAT, what is missing
Permission: read:documents + read:payments
Scopes: `read:documents` and `read:payments`. Lists in `missing` are capped at 500 items (`truncated: true`); use the list endpoints for the rest.
Responses
200The summary400401403429
GET/api/v1/invoices
List the company's invoices
Permission: invoices:read
The key's company's invoices (never another company's), oldest first, paged. Scope: `invoices:read`.
Responses
200A page of invoices400401403422`company_cannot_issue`: the key's company does not issue invoices in the app429
POST/api/v1/invoices
Save a draft or issue an invoice
Permission: invoices:write
Since 1.8.0 saves a DRAFT for the key's company by default (no number, nothing sent); with `"issue": true` issues it with the same checks as issuing in the app and returns its number. Header `Idempotency-Key` required: on a draft the same key updates that draft, and the same key with `"issue": true` issues it. With `send: true` (only together with `issue: true`) it is also queued for the company's e-invoicing authority where the country uploads e-invoices. Scope: `invoices:write`.
Responses
200The same Idempotency-Key again: a draft updated with this content, or (issued) the invoice issued the first time (`replayed: true`, `sendQueued: false`)201Draft saved, or issued now400Missing or malformed `Idempotency-Key` (`idempotency_key_required`), body is not JSON (`invalid_json`) or not a valid invoice (`invalid_request`, with `issues`: each wrong field's `path` and `message`), or `send: true` without `issue: true` (`invalid_request`)401403409`idempotency_key_reused`: this key was already used for a different invoice (also when another request with this key and other content was issued at the same moment)422Refused by the issuing rules; nothing was numbered and no draft is left (a draft request, without `issue: true`, is not refused for its buyer's data alone: a missing or invalid tax id, a missing postal code or VAT status save the draft as sent, those fields listed for the owner to complete in the app, with `warnings: ["buyer_incomplete"]`; it cannot be issued until they are); the same `Idempotency-Key` can be retried with corrected content. `error` is the rule (e.g. `vat_rate`, `buyer_tax_id`, `buyer_vat`, `currency_unsupported`, `efactura_rules` with `issues`, `seller_profile_missing` with `detail.missing` (the seller fields to complete in Settings, e.g. `shareCapital` for a Romanian SRL), `account_currency` with `detail.currency` and `detail.currencies` (no company account in the invoice's currency), `no_series`, `fx_rate_missing`, `company_cannot_issue`, since 1.15.0 `vat_on_cash_affiliated` with `message` and `detail.field` = `buyerAffiliated`: say whether the buyer is affiliated with the company).429Too many requests: the per-key limit or the separate write limit (`X-RateLimit-Write-*`)
GET/api/v1/invoices/{id}
Status of one invoice
Permission: invoices:read
The invoice with its number and e-invoice status. 404 when the id does not exist or belongs to another company. Scope: `invoices:read`.
Responses
200The invoice (no `sendQueued`, no `replayed`)401403404422`company_cannot_issue`: the key's company does not issue invoices in the app429
GET/api/v1/invoice-pdf/{token}
Download an invoice PDF by signed link
Permission: none (a signed, short-lived link)
The `pdfUrl` of an invoice. The link itself is the credential, for that one invoice only; it expires after 5 minutes and stops working when the API key it was made for is revoked or expires (403 `link_key_revoked`). At most 20 openings per minute per invoice (429). The first output of an Israeli invoice is the original ("מקור"), every later one "העתק נאמן למקור". A HEAD request or a known link-preview fetcher (User-Agent containing WhatsApp/, facebookexternalhit, TelegramBot, Slackbot, Twitterbot, LinkedInBot or Discordbot) gets 403 `preview` and never produces the PDF, so it never uses up the original.
Responses
200The invoice PDF403Invalid link, its API key was revoked or expired (`link_key_revoked`), or a HEAD / link-preview request (`preview`, nothing produced)404410Link expired — read the invoice again for a new one429503`pdf_unavailable`: the PDF cannot be produced right now; try again later
Errors
Errors are JSON with an "error" code and, where useful, a "message" or "issues". 400 invalid request, 401 missing or revoked key, 403 missing permission or no API access in the plan, 404 not found (or another account's), 409 Idempotency-Key reused with other content, 413/415 file too large or of an unsupported type, 422 refused by the invoice rules, 429 too many requests.
HTTP/1.1 403
{ "error": "insufficient_scope" }Rate limits
Requests are counted per key per clock minute (120 by default) and reported in the X-RateLimit-* headers. Writes (sending documents, saving or issuing invoices) also count against a separate, lower limit (30 per minute by default, X-RateLimit-Write-* headers). Over a limit the answer is 429 with Retry-After.
One request body may be up to 100 MiB in total (all files together; base64 in JSON is about a third larger). A bigger request is refused with 413 request_too_large before it is read: send the rest in another request. Each file also has its own size limit, the same as an upload in the app.
Idempotency (safe retries)
Send an Idempotency-Key header (8–64 characters: letters, digits, . _ : -; a UUID fits). It is required for POST /invoices and recommended for POST /documents. The same key with the same content returns the first result (200) instead of creating something new; the same key with other content is refused with 409. On a draft invoice, the same key with new content updates that draft, and sent again with "issue": true issues it. A refused request leaves nothing behind, so the same key can be sent again with corrected content.
Examples (curl)
List this month's documents
curl -H "Authorization: Bearer $SF_KEY" \ "https://app.scaleflow.ro/api/v1/documents?period=2026-11&limit=50"
Send a file (multipart), safe to retry with the same Idempotency-Key
curl -X POST -H "Authorization: Bearer $SF_KEY" \ -H "Idempotency-Key: 6f1c2b7e-scan-0001" \ -F "file=@invoice.pdf" -F "kind=document" \ https://app.scaleflow.ro/api/v1/documents
Send a file as JSON (base64)
curl -X POST -H "Authorization: Bearer $SF_KEY" -H "Content-Type: application/json" \
-d '{"files":[{"fileName":"receipt.pdf","contentBase64":"JVBERi0xLjQK..."}]}' \
https://app.scaleflow.ro/api/v1/documentsSave an invoice as a draft (the default)
curl -X POST -H "Authorization: Bearer $SF_INVOICE_KEY" -H "Content-Type: application/json" \
-H "Idempotency-Key: order-1042" \
-d '{"buyer":{"type":"b2c","name":"Guest name","street":"Street 1","city":"Bucharest","postalCode":"010101","country":"RO"},"lines":[{"description":"Room","qty":"2","unitPrice":"350","vat":"S:21"}],"currency":"RON"}' \
https://app.scaleflow.ro/api/v1/invoicesIssue the same invoice (same key, "issue": true) and send it to e-Factura (Romanian companies)
curl -X POST -H "Authorization: Bearer $SF_INVOICE_KEY" -H "Content-Type: application/json" \
-H "Idempotency-Key: order-1042" \
-d '{"buyer":{...},"lines":[...],"currency":"RON","issue":true,"send":true}' \
https://app.scaleflow.ro/api/v1/invoicesIssue a hotel invoice (series code, notes, payment collected)
curl -X POST -H "Authorization: Bearer $SF_INVOICE_KEY" -H "Content-Type: application/json" \
-H "Idempotency-Key: booking-71879242" \
-d '{"series":"REPS","buyer":{"type":"b2c","name":"Jane Doe","street":"…","city":"…","country":"GB","phone":"+44…"},"lines":[...],"currency":"RON","notes":"Hostaway ID: 71879242\nBooked via: Booking.com","paid":{"method":"card","date":"2026-11-18","amount":"450.00"},"language":"en","issue":true}' \
https://app.scaleflow.ro/api/v1/invoicesPrices with VAT: the total with VAT is exactly what you send (350.00 at 11 % → 315.32 + 34.68)
curl -X POST -H "Authorization: Bearer $SF_INVOICE_KEY" -H "Content-Type: application/json" \
-H "Idempotency-Key: booking-1001" \
-d '{"buyer":{...},"pricesIncludeVat":true,"lines":[{"description":"Accommodation","qty":"1","unitPrice":"350","vat":"S:11"}],"currency":"RON"}' \
https://app.scaleflow.ro/api/v1/invoicesRead an invoice's status, including the e-Factura state
curl -H "Authorization: Bearer $SF_INVOICE_KEY" https://app.scaleflow.ro/api/v1/invoices/INVOICE_ID
