Developers
API reference
Send a letter of credit, shipping bill, bill of entry or EPCG licence. Get structured data back as JSON, XML or text.
Authentication
Send your API key in the X-Api-Key header on every request. Create keys under API keys in the app.
X-Api-Key: YOUR_API_KEYBase URL
https://api.example.com/v1Placeholder address. Your real base URL is shown in the app.
POST /extract
/extractUpload a document and receive the extracted fields.
| Parameter | Type | Description |
|---|---|---|
file | file | The PDF or image (multipart form field). |
type | string | One of: auto | lc | shipping_bill | bill_of_entry | epcg. |
format | string | json (default), xml or text. |
curl -X POST https://api.example.com/v1/extract \
-H "X-Api-Key: YOUR_API_KEY" \
-F "file=@document.pdf" \
-F "type=auto" \
-F "format=json"Sample response
{
"id": "doc_8f3a21c9",
"type": "shipping_bill",
"status": "done",
"pages": 2,
"fields": [
{ "name": "shipping_bill_number", "value": "SB-2041", "status": "filled" },
{ "name": "shipping_bill_date", "value": "2026-03-14", "status": "filled" },
{ "name": "fob_value", "value": "48,250.00", "status": "review" },
{ "name": "reference", "value": "", "status": "blank" },
{ "name": "licence_number", "value": null, "status": "not_found" }
]
}GET /documents/{id}
/documents/{id}Fetch one document and its fields.
GET /documents
/documentsList your documents, newest first. Supports limit and offset.
DELETE /documents/{id}
/documents/{id}Delete a document and its results. This cannot be undone.
GET /usage
/usagePages used and pages left on your current plan.
Errors
Errors return the HTTP status and a JSON body with a message.
| Code | Meaning |
|---|---|
401 | Missing or invalid API key. |
402 | Subscription expired. Renew your plan to continue. |
403 | The key is valid but not allowed to do this, for example it was revoked. |
404 | The document does not exist or belongs to another account. |
413 | File too large. Split the document and try again. |
422 | The request was understood but a parameter is wrong, such as an unknown type or format. |
429 | Rate limit reached. Wait for the time in the Retry-After header. |
500 | Something went wrong on our side. Retry; contact support if it persists. |
Rate limits
Each key may send up to 60 requests per minute. Over the limit you receive 429 with a Retry-After header.
Webhooks
Add an HTTPS endpoint in the app and we will POST a JSON event to it.
document.doneA document finished and results are ready.document.failedA document could not be read.plan.expiringYour plan ends soon.
Status values
Every field carries one status so you know what to trust.
- filledRead with confidence.
- reviewRead, but worth a human look.
- blankThe field is empty on the document.
- not_foundThe field could not be located.