apyhub

AI Document Invoice Data Extraction API

What it does

Invoice Extraction turns an invoice document into structured data you can use in your app. Send either a PDF URL to /url or upload a file to /file, and choose the extraction backend with requested_service.

The response contains a data object with the parsing output from either apyhub or azure. If you select azure, you can also pass Azure credentials such as key, region, endpoint, account_id, and access_token in the URL flow, or the matching azure_* fields in the file flow. If you leave requested_service at its default, the service uses apyhub.

Use Invoice Extraction when you need invoice details from supplier PDFs, attached billing documents, or scanned finance paperwork without building your own parsing pipeline. It fits accounts payable workflows, expense systems, and document ingestion jobs where invoices arrive in different formats but need to be normalized into machine-readable output.

The API is focused on extraction, not validation or transformation. You send a document source, optionally provide Azure credentials, and get back the raw parsing result for the service you selected.

▣ ENDPOINT 01 / 02
POST
Extract invoice data (URL input)
https://api.eu.apyverse.com/apyhub/extract-invoice-data/url

QUICKSTART

GUIDE

Quickstart

Extract invoice data from a document URL by sending the invoice link in the request body.

curl -X POST "https://api.eu.apyverse.com/apyhub/extract-invoice-data/url" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "http://assets.apyhub.com/samples/sample.pdf"
  }'

What you'll get back

Returns a JSON object with a data object. Inside data, the response may include an azure object for raw Azure Document Intelligence output and an apyhub object for 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. The request sends the URL in the body, and the response returns a JSON object with a data object containing the parsing output for Azure and ApyHub.

Request Body

ParameterTypeMandatoryDescription
urlStringYesThe invoice document URL to process. Must be a URI.
azureObjectNoCustom credentials for Azure services. Contains optional Azure authentication fields.
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 service to use. Allowed values: azure, apyhub. Default: apyhub.

Response

Returns a JSON object with a data object field. The data object can contain azure and apyhub object fields with parsing output for each service.

ParameterTypeMandatoryDescription
dataObjectNoResponse wrapper containing parsing results.
data.azureObjectNoRaw Azure Document Intelligence parsing output.
data.apyhubObjectNoStructured ApyHub Invoice Extraction parsing output.

Body

Name
Type
Description
bodyREQUIRED
object
▣ ENDPOINT 02 / 02
POST
Extract invoice data (file upload)
https://api.eu.apyverse.com/apyhub/extract-invoice-data/file

QUICKSTART

GUIDE

Quickstart

Upload an invoice file to extract data with ApyHub.

curl -X POST "https://api.eu.apyverse.com/apyhub/extract-invoice-data/file" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/invoice.pdf"

What you'll get back

Returns a JSON object with a data object. The data object may include azure for raw Azure Document Intelligence output and apyhub for 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.
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. You can optionally provide Azure-related credentials and select which parsing service to use via requested_service.

Request Body

ParameterTypeMandatoryDescription
fileStringYesBinary file upload containing the invoice to extract data from.
azure_keyStringNoAzure key used when extracting with Azure.
azure_regionStringNoAzure region.
azure_endpointStringNoAzure endpoint URL.
azure_account_idStringNoAzure account identifier.
requested_serviceENUMNoService 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 can contain azure and/or apyhub objects, which hold the parsing output for the corresponding service.

ParameterTypeMandatoryDescription
dataObjectNoContainer for the 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.

▣ 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.