apyhub
Back
▣ DATA EXTRACTION · FINANCE

AI Document Receipt Data Extraction API

Hosted on ApyHub

What it does

Receipt Extraction reads a receipt from a file upload or a URL and returns parsed receipt data. Send a receipt image or PDF, and choose whether you want the ApyHub result, the raw Azure Document Intelligence output, or both.

Use the /file endpoint when you already have the receipt content in hand. It accepts a binary file plus optional Azure settings such as azure_key, azure_region, azure_endpoint, azure_account_id, azure_access_token, and requested_service. Use the /url endpoint when the receipt is hosted remotely; it takes a url, optional azure credentials object, and requested_service.

The response is wrapped under data and includes azure and apyhub objects, matching the service you requested. That makes it useful when you need receipt parsing in expense apps, accounting workflows, or backend systems that ingest vendor receipts and store extracted data for review or downstream processing.

Provider (requested_service)Atoms
Azure500
ApyHub2000
▣ ENDPOINT 01 / 02
POST
Extract receipt data (file upload)
https://api.eu.apyhub.com/apyhub/extract-receipt-data/file

QUICKSTART

GUIDE

Quickstart

Upload a receipt image to extract its data with the default ApyHub parser.

curl -X POST "https://api.eu.apyhub.com/apyhub/extract-receipt-data/file" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/receipt.jpg" \
  -F 'requested_service="apyhub"' 

What you'll get back

Returns a JSON object with a data object. The data object may contain an apyhub object with structured ApyHub receipt extraction output, and/or an azure object with raw Azure Document Intelligence parsing output.

{
  "data": {
    "apyhub": {},
    "azure": {}
  }
}
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 a receipt file for data extraction and returns parsed receipt data. You can request the result from either the Azure parsing output or the structured ApyHub parsing output.

Request Body

ParameterTypeDescription
fileBinaryReceipt file to upload as binary data.
azure_keyStringAzure key used for Azure-backed extraction.
azure_regionStringAzure region, such as a region name string.
azure_endpointStringAzure endpoint URL.
azure_account_idStringAzure account ID.
requested_serviceENUMWhich parsing service to use. Allowed values: azure, apyhub. Default: apyhub.
azure_access_tokenStringAzure access token.

Response

Returns a JSON object with a data object field. The data object may contain azure and apyhub fields, both of which are objects.

ParameterTypeDescription
dataObjectParsed receipt data container.
data.azureObjectRaw Azure Document Intelligence parsing output.
data.apyhubObjectStructured ApyHub Receipt Extraction parsing output.

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 receipt data (URL input)
https://api.eu.apyhub.com/apyhub/extract-receipt-data/url

QUICKSTART

GUIDE

Quickstart

Extract receipt data from a receipt image or PDF URL.

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

What you'll get back

Returns a JSON object with a data object. That data object may contain azure for raw Azure Document Intelligence output and/or apyhub for structured ApyHub receipt 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.

About this endpoint

What it does

Extracts receipt data from a document URL and returns a JSON object with parsing results under data. The response includes separate fields for the Azure and ApyHub parsing outputs.

Request Body

ParameterTypeDescription
urlStringThe receipt document URL. Must be a valid URI.
azureObjectCustom credentials for Azure services. See schema for nested fields.
azure.keyStringAzure subscription key.
azure.regionStringAzure service region.
azure.endpointStringAzure endpoint URL.
azure.account_idStringAzure account ID.
azure.access_tokenStringOAuth access token for Azure service.
requested_serviceENUMWhich parsing service to use. Allowed values: azure, apyhub. Default: apyhub.

Response

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

ParameterTypeDescription
dataObjectResponse payload containing parsing results.
data.azureObjectRaw Azure Document Intelligence parsing output.
data.apyhubObjectStructured ApyHub Receipt Extraction parsing output.
▣ 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.