Documentation
API overview
Short contract for POST /v1/extract/awb. Full interactive OpenAPI is served by the FastAPI app locally (/docs on the API host)—this page is the marketing/docs summary.
Base URL
Public API endpoint — coming soon
https://getdocapi.com
Marketing site is live. Extraction API routes (e.g. /v1/extract/awb) are not public yet.
Authentication
Public API (when live) will expect:
Authorization: Bearer <api_key>
API keys ship with the public API. Credit packs already check out via Creem on Pricing.
Extract air waybill
| Method | POST |
| Path | /v1/extract/awb |
| Body | multipart/form-data · field file |
| Accepts | PDF, PNG, JPEG, and other common images · max ~20 MB (skeleton) |
| Success | 200 + JSON object (one AWB) |
curl
curl -sS -X POST "https://getdocapi.com/v1/extract/awb" \
-H "Authorization: Bearer <api_key>" \
-F "file=@./sample-mawb.pdf;type=application/pdf"
Response shape
{
"document_type": "air_waybill",
"awb_level": "mawb",
"awb_number": "071-12760786",
"hawb_number": null,
"issue_date": "2006-05-27",
"shipper_name": "…",
"consignee_name": "…",
"airport_dep": "DXB",
"airport_dest": "ADD",
"flight_number": null,
"flight_date": null,
"pieces": "60",
"gross_kg": "2520",
"chargeable_kg": "2520",
"charges_payment": "prepaid",
"field_confidence": { "awb_number": 0.95 },
"validations": {
"awb_check_digit_ok": true,
"chargeable_gte_gross": true
},
"needs_review": false
}
Validators
- AWB Mod-7 —
validations.awb_check_digit_ok. Details: Mod-7 page. - Chargeable ≥ gross —
validations.chargeable_gte_gross. - Review gate —
needs_reviewwhen checks fail or confidence is low.
Errors (typical)
| Status | Meaning | Billed? |
|---|---|---|
| 401 | Missing / invalid API key (when auth is on) | No |
| 413 | File too large | No |
| 422 | Bad multipart / unsupported type / page cap | No |
| 5xx | Upstream / server failure | No |
| 200 | JSON returned (even if needs_review) | Yes |
Playground
A playground page is reserved on this site. Interactive upload goes live with the public API. Until then, see the static before & after on the product page.