ExportFlow API
Read and verify trade documents from your own software
The ExportFlow API takes the documents that travel with a shipment, reads them, and checks them against each other and against a published rule set. You call it from your ERP, accounting or procurement product with an API key.
What the API does#
Five things, in this order. Each is a separate call or a separate state, so your software can stop at any of them.
- UploadA PDF or an image of one document is scanned for viruses, stored and queued. Documents are grouped into a shipment.
- ClassificationThe document’s type is detected: bill of lading, commercial invoice, packing list, certificate. A file holding several documents is split into them.
- Field extractionEach field is read and returned with its value, or with the reason there is no value. A field is never silently left out.
- Confirmed recordA person checks what was read against the documents and confirms it. Verification will not start without this.
- VerificationThe confirmed record is checked across documents and against the rule set. The result is a list of findings and a statement of what was not checked.
ExportFlow reports evidence of inconsistency. It never certifies compliance. A verification with no critical findings means the rules that ran found nothing; it does not mean the shipment will be accepted. Every result says which documents had rules applied to them and which checks could not run, and those are not passes. See Verification.
A first request#
Every request is authenticated with an API key sent as a bearer token. This one asks the API who the key belongs to, which proves the key works before you upload anything.
from exportflow import ExportFlow
client = ExportFlow(api_key="exfk_test_...") # or set EXPORTFLOW_API_KEY
identity = client.me()
print(identity.organisation_name, identity.environment) # ... sandboxThe quickstart carries on from here to an uploaded document, its extracted fields and a verification.
From nothing to a running integration#
Eleven steps. None of them needs anybody at MeerTech: registration, keys, the sandbox and the console are all self-service.
- Register your organisationCreate an ExportFlow account for your company. Whoever registers it is its owner.Create an account
- Open a developer accountAn organisation registered here is a developer account from the start. One that already uses the ExportFlow application is registered by an owner from the console.Open the console
- Create an applicationOne application for each product that will call the API. Usage, keys and webhooks are kept per application.Applications
- Issue API keysA key belongs to one application and one environment. Its secret is shown once.Authentication
- Choose an environmentStart in the sandbox with an exfk_test_ key: the same pipeline, separate data, never charged. Move to an exfk_live_ key for production.Environments
- Install an SDKPython or TypeScript. Or call the HTTP API directly from anything that can send a request.SDKs
- AuthenticateSend the key as a bearer token and confirm who it is with one request.Quickstart
- Upload documentsA PDF or an image per document, grouped into a shipment. Each is scanned, stored and queued.Documents
- Process and verifyDocuments are classified and read automatically. Confirm what they say, then verify the shipment.Verification
- Retrieve resultsPoll the resource, or register a webhook endpoint and be told when the work finishes.Webhooks
- Monitor consumptionUsage, the request log and estimated charges are in the console, and usage is in the API.Billing
How the API behaves#
- Two environmentsA sandbox for building and production for real documents, kept apart by the key.
- Safe to retryEvery write takes an idempotency key, so a repeated request does the work once.
- AsynchronousUploads and verifications return at once. Poll, or receive a signed webhook.
- Errors you can branch onA stable code and a sentence written for a person, on every failure.
- Additive within a versionVersion 1 only gains fields and endpoints. Nothing is removed or changes meaning.
- Charged for completed workRequests, retries and the sandbox are never charged. Your rates are in your console.