apyhub
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)
http://localhost:8080/apyhub/extract-receipt-data/file
QUICKSTARTGUIDE

Quickstart

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

curl -X POST "http://localhost:8080/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

ParameterTypeMandatoryDescription
fileStringYesReceipt file to upload as binary data.
azure_keyStringNoAzure key used for Azure-backed extraction.
azure_regionStringNoAzure region, such as a region name string.
azure_endpointStringNoAzure endpoint URL.
azure_account_idStringNoAzure account ID.
requested_serviceENUMNoWhich parsing service to use. 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 fields, both of which are objects.

ParameterTypeMandatoryDescription
dataObjectNoParsed receipt data container.
data.azureObjectNoRaw Azure Document Intelligence parsing output.
data.apyhubObjectNoStructured ApyHub Receipt 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 receipt data (URL input)
http://localhost:8080/apyhub/extract-receipt-data/url
QUICKSTARTGUIDE

Quickstart

Extract receipt data from a receipt image or PDF URL.

curl -X POST "http://localhost:8080/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.
Azure account ID.
OAuth access token for Azure service.

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

ParameterTypeMandatoryDescription
urlStringYesThe receipt document URL. Must be a valid URI.
azureObjectNoCustom credentials for Azure services. See schema for nested 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 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.

ParameterTypeMandatoryDescription
dataObjectNoResponse payload containing parsing results.
data.azureObjectNoRaw Azure Document Intelligence parsing output.
data.apyhubObjectNoStructured ApyHub Receipt 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.