apyhub
ARTIFICIAL INTELLIGENCE · DATA EXTRACTION

AI Document Invoice Data Extraction API

Hosted on ApyHub

What it does

Invoice Extraction pulls structured invoice data from a PDF or document URL and returns either ApyHub's parsed invoice output or raw Azure Document Intelligence output, depending on the service you request.

Send a file to POST /file or pass a document URL to POST /url. Both endpoints accept a requested_service value of azure or apyhub. The file endpoint also supports Azure credentials in the request body: azure_key, azure_region, azure_endpoint, azure_account_id, and azure_access_token. The URL endpoint accepts an azure object with key, region, endpoint, account_id, and access_token.

The response wraps the extraction result in data.azure or data.apyhub. Use the Azure branch when you need the raw parsing output from Document Intelligence. Use the ApyHub branch when you want the structured invoice extraction response for downstream automation, such as accounts payable workflows, expense ingestion, or invoice indexing.

Invoice Extraction fits into systems that need to turn invoices into machine-readable data without building your own document parser. It gives you a single interface for file uploads and remote documents, with output shaped for programmatic processing.

Provider (requested_service)Atoms
Azure500
ApyHub2000
▣ ENDPOINT 01 / 02
POST
Extract invoice data (file upload)
http://localhost:8080/apyhub/extract-invoice-data/file
QUICKSTARTGUIDE

Quickstart

Upload an invoice file to extract its data with the default ApyHub parser.

curl -X POST "http://localhost:8080/apyhub/extract-invoice-data/file" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/document.pdf" \
  -F "requested_service=apyhub"

What you'll get back

Returns a JSON object with a data object field. Inside data, the response may include azure for raw Azure Document Intelligence parsing output and/or apyhub for structured ApyHub Invoice Extraction parsing output.

{
  "data": {
    "azure": {},
    "apyhub": {}
  }
}
TRY ITLIVE · 500 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
body*

About this endpoint

What it does

Uploads an invoice file and returns parsed invoice data in a JSON object. The response includes data, which may contain azure and/or apyhub objects with the extraction output.

Request Body

ParameterTypeMandatoryDescription
fileStringYesInvoice file to upload as binary data.
azure_keyStringNoAzure key used for Azure Document Intelligence parsing.
azure_regionStringNoAzure region value.
azure_endpointStringNoAzure endpoint URL.
azure_account_idStringNoAzure account identifier.
requested_serviceENUMNoWhich service to use for extraction. Allowed values: azure, apyhub. Default: apyhub.
azure_access_tokenStringNoAzure access token.

Response

Returns a JSON object with a data object field. The data object may contain azure and apyhub object fields with the corresponding invoice extraction output.

ParameterTypeMandatoryDescription
dataObjectNoContainer for extraction results.
data.azureObjectNoRaw Azure Document Intelligence parsing output.
data.apyhubObjectNoStructured ApyHub Invoice Extraction parsing output.

Body

Name
Type
Description
bodyREQUIRED
object

Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.

▣ ENDPOINT 02 / 02
POST
Extract invoice data (URL input)
http://localhost:8080/apyhub/extract-invoice-data/url
QUICKSTARTGUIDE

Quickstart

Send an invoice PDF URL to extract its data.

curl -X POST "http://localhost:8080/apyhub/extract-invoice-data/url" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com/invoice.pdf"}'

What you'll get back

Returns a JSON object with a data object field. data.azure contains the raw Azure Document Intelligence parsing output, and data.apyhub contains the structured ApyHub invoice extraction output.

{
  "data": {
    "azure": {},
    "apyhub": {}
  }
}
TRY ITLIVE · 500 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
azure
Custom credentials for Azure services.
Azure subscription key.
Azure service region.
Azure endpoint URL.
Azure account ID.
OAuth access token for Azure service.

About this endpoint

What it does

Extracts invoice data from a document available at a URL and returns parsed results in a JSON object. The response includes separate top-level result objects for Azure and ApyHub parsing outputs.

Request Body

ParameterTypeMandatoryDescription
urlStringYesThe invoice document URL to process. Must be a URI.
azureObjectNoOptional custom credentials for Azure services.
azure.keyStringNoAzure subscription key.
azure.regionStringNoAzure service region.
azure.endpointStringNoAzure endpoint URL.
azure.account_idStringNoAzure account ID.
azure.access_tokenStringNoOAuth access token for Azure service.
requested_serviceENUMNoWhich parsing service to use. Allowed values: azure, apyhub. Default: apyhub.

Response

Returns a JSON object with a data object field. Inside data, the response may include azure and apyhub object fields containing the corresponding parsing outputs.

ParameterTypeMandatoryDescription
dataObjectNoResult wrapper object.
data.azureObjectNoRaw Azure Document Intelligence parsing output.
data.apyhubObjectNoStructured ApyHub Invoice Extraction parsing output.

Body

Name
Type
Description
bodyREQUIRED
object
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.