Upload a PDF — get back the list of recipients to mail it to. · v0.1.0
One endpoint. Send a document, receive a JSON array of recipients (who to mail, and which page each one's documents start on) for batch enveloping.
curl -X POST https://vokavimas.softa.lt/v1/extract -F "file=@document.pdf"
Response — a JSON array, one entry per recipient, in page order:
[
{ "page_number": 1, "name": "Vardenis Pavardenis",
"address": "Pavyzdžio g. 1-2, 00001 Vilnius" },
{ "page_number": 3, "name": "Vardenė Pavardenė",
"address": "Pavyzdžio g. 3-4, 00002 Kaunas" }
]
page_number is where that recipient's documents start; every page up
to the next entry belongs to the same recipient (one envelope).
| Way | How |
|---|---|
| Upload (usual) | multipart form field file = the PDF |
| By URL | ?url=https://.../doc.pdf — the server fetches it |
| Raw body | Content-Type: application/pdf, the PDF bytes as the body |
| Parameter | Effect |
|---|---|
?full=true | return { customers, review, meta } instead of the bare list |
?split_names=true | split the name into given-name + a surname field |
?mode=async | return a job_id at once; poll GET https://vokavimas.softa.lt/v1/jobs/<id> (for very large files) |
| Field | Description |
|---|---|
page_number | 1-based page where this recipient's documents start |
name | recipient name, verbatim (given name only when split_names=true) |
address | full postal address |
| Status | Meaning |
|---|---|
200 | OK |
422 | file isn't a usable PDF |
413 | file too large |
400 | no document in the request |
401 | missing/invalid key (only when auth is enabled) |
If the service is configured with API keys, send one in the X-API-Key
header; otherwise the API is open.
The call is synchronous: it blocks until done and returns the finished JSON
(no streaming, no polling). A 2000-page invoice takes ~25 s; large scanned files
can take a few minutes — use a generous client read timeout, or ?mode=async.
Interactive explorer: https://vokavimas.softa.lt/docs · this page as PDF.
# full output + split the name into given-name + surname
curl -X POST "https://vokavimas.softa.lt/v1/extract?full=true&split_names=true" \
-F "file=@document.pdf"
# Python
import requests
r = requests.post("https://vokavimas.softa.lt/v1/extract",
files={"file": open("document.pdf", "rb")})
recipients = r.json()