apyhub
DATA EXTRACTION · FINANCE

Invoice Parsing API

What it does

Invoice Parser takes an invoice file, submits it for asynchronous processing, and returns structured invoice data you can use in your application. Send a PDF, DOC, DOCX, PNG, JPG, JPEG, TIFF, or TIF file, and optionally set the document language. You get back a job ID and a status URL for polling.

Use it when you need to turn supplier invoices into machine-readable records without building your own extraction pipeline. The status endpoint reports the job state as queued, running, success, or failed, and when processing completes it returns the extracted result set.

The parsed output can include buyer details with a billing address, seller details with a VAT ID and address, invoice metadata such as currency, issue date, and invoice number, a boolean is_invoice flag, financial totals including subtotal, total payable, and total tax amount, plus line items with quantity, subtotal, unit price, and description.

Invoice Parser is a good fit for accounts payable workflows, expense systems, document ingestion, and back-office automation where invoice fields need to be captured consistently from scanned or digital files.

▣ ENDPOINT 01 / 02
POST
Submit Invoice Parse Job
http://localhost:8080/sharpapi/parse-invoice
QUICKSTARTGUIDE

Quickstart

Submit an invoice file for parsing by uploading it as JSON in the request body.

curl -X POST "http://localhost:8080/sharpapi/parse-invoice" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/invoice.pdf"

What you'll get back

Returns a JSON object with optional job_id and status_url string fields for the submitted job.

{
  "status_url": "https://apyhub.com/services/provider/sharpapi/api/v1/finance/parse_invoice/job/status/a233324c-02cb-4c89-9ec4-fbe736758586",
  "job_id": "a233324c-02cb-4c89-9ec4-fbe736758586"
}
TRY ITLIVE · 50 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*
Provide the Invoice file in PDF, DOC, DOCX, PNG, JPG, JPEG, TIFF, or TIF formats.
Specify the language of the Invoice. Defaults to English.

About this endpoint

What it does

Submits an invoice file for asynchronous parsing and returns identifiers for tracking the job. The request uploads the invoice file, and the response provides the submitted job ID and a status URL.

Request Body

ParameterTypeMandatoryDescription
fileStringYesProvide the Invoice file in PDF, DOC, DOCX, PNG, JPG, JPEG, TIFF, or TIF formats.
languageStringNoSpecify the language of the Invoice. Defaults to English.

Response

Returns a JSON object with two string fields: job_id for the submitted job identifier and status_url for the URL used to poll job status.

ParameterTypeMandatoryDescription
job_idStringYesThe unique identifier for the submitted job.
status_urlStringYesThe URL to poll for job status.

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
GET
Check Invoice Parse Status
http://localhost:8080/sharpapi/parse-invoice/job/status/:job_id
QUICKSTARTGUIDE

Quickstart

Check the status of an invoice parsing job by its job ID.

curl -X GET "http://localhost:8080/sharpapi/parse-invoice/job/status/:job_id" \
  -H "apy-token: $APY_TOKEN"

What you'll get back

Returns a JSON object with a data object. data includes id (the job UUID), type (for example, api_job_result), and attributes, which contains status and may include a result array with parsed invoice data.

{
  "data": {
    "id": "2f1c8d8e-4c4b-4d1a-9e7e-8f8f5d3d2f11",
    "type": "api_job_result",
    "attributes": {
      "status": "success"
    }
  }
}
TRY ITLIVE · 1 ATOM
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.

About this endpoint

What it does

Checks the processing status of an asynchronous invoice parsing job by job ID. When the job has finished successfully, the response also includes the parsed invoice data under the job result.

Path Parameter(s)

AttributeTypeMandatoryDescription
job_idStringYesThe job's unique UUID.

Response

Returns a JSON object with a data object field. data contains the job id string, type string, and attributes object; attributes includes status and, once the job succeeds, result.

ParameterTypeMandatoryDescription
dataObjectYesJob result wrapper.
data.idStringYesThe job's unique UUID.
data.typeStringYesAPI job result type.
data.attributesObjectYesJob attributes, including status and result.
data.attributes.statusENUMYesCurrent status of the asynchronous job. Allowed values: running, failed, queued, success.
data.attributes.resultObject ArrayNoParsed invoice result items. Present when the job status is success.
data.attributes.result[].buyerObjectNoBuyer details in the parsed invoice result.
data.attributes.result[].buyer.nameStringNoBuyer name.
data.attributes.result[].buyer.billing_addressObjectNoBuyer billing address.
data.attributes.result[].buyer.billing_address.cityStringNoCity.
data.attributes.result[].buyer.billing_address.stateStringNoState.
data.attributes.result[].buyer.billing_address.countryStringNoCountry.
data.attributes.result[].buyer.billing_address.postcodeStringNoPostcode.
data.attributes.result[].buyer.billing_address.street_line_1StringNoStreet address line 1.
data.attributes.result[].sellerObjectNoSeller details in the parsed invoice result.
data.attributes.result[].seller.nameStringNoSeller name.
data.attributes.result[].seller.vat_idStringNoSeller VAT ID.
data.attributes.result[].seller.addressObjectNoSeller address.
data.attributes.result[].seller.address.cityStringNoCity.
data.attributes.result[].seller.address.stateStringNoState.
data.attributes.result[].seller.address.countryStringNoCountry.
data.attributes.result[].seller.address.postcodeStringNoPostcode.
data.attributes.result[].seller.address.street_line_1StringNoStreet address line 1.
data.attributes.result[].invoiceObjectNoInvoice metadata.
data.attributes.result[].invoice.currencyStringNoInvoice currency code.
data.attributes.result[].invoice.issue_dateStringNoInvoice issue date.
data.attributes.result[].invoice.invoice_numberStringNoInvoice number.
data.attributes.result[].documentObjectNoDocument classification details.
data.attributes.result[].document.is_invoiceBooleanNoWhether the document is an invoice.
data.attributes.result[].financialsObjectNoInvoice financial totals.
data.attributes.result[].financials.subtotalNumberNoSubtotal amount.
data.attributes.result[].financials.total_payableNumberNoTotal payable amount.
data.attributes.result[].financials.total_tax_amountNumberNoTotal tax amount.
data.attributes.result[].line_itemsObject ArrayNoInvoice line items.
data.attributes.result[].line_items[].quantityNumberNoQuantity.
data.attributes.result[].line_items[].subtotalNumberNoLine subtotal.
data.attributes.result[].line_items[].unit_priceNumberNoUnit price.
data.attributes.result[].line_items[].descriptionStringNoLine item description.

Notes

Poll this endpoint with the job_id returned by the submit call. The data.attributes.status field cycles through transitional values (queued, running) before reaching a terminal state (success or failed). The parsed invoice data is returned in data.attributes.result and should be read only when data.attributes.status is success.

Path parameters

Name
Type
Description
job_idREQUIRED
string
▣ 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.