Ocrolus API

Ocrolus API Documentation

Welcome to Ocrolus' API Documentation. You'll find comprehensive guides and documentation here to help you get started with the Ocrolus API. Let's jump right in!

Ocrolus captures Invoice data in two parts:

  • invoice header & footer data (e.g. Invoice No, Invoice Date, Total Amount)
  • itemized line item data (e.g. Item SKU, Price, Quantity)

The form_type parameter INVOICE for the Upload PDF endpoint is required for this Form Type.

Optional invoice header & footer data captured

Invoice header & footer data (e.g. Invoice No, Invoice Date, Customer Name) is captured as Form Data objects, each one keyed off the following attribute names.

📘

Configuration-Driven Output

All fields below are optionally captured, depending on your order form. To adjust fields captured, please speak with your Ocrolus Account Manager.

JSON Attribute

Data Type

Description

invoice-Part1-General:invoiceNumber

Text

Invoice Number

invoice-Part1-General:purchaseOrderNumber(Po)

Text

Purchase Order Number (PO)

invoice-Part1-General:invoiceDate

Date

Invoice Date

invoice-Part1-General:orderDate

Date

Order Date

invoice-Part1-General:accountNumber

Text

Account Number

invoice-Part1-General:terms

Text

Terms

invoice-Part2-VendorDetails:vendorName

Text

Vendor Name

invoice-Part2-VendorDetails:vendorAddress:addressLine1

Text

Vendor Address Line 1

invoice-Part2-VendorDetails:vendorAddress:addressLine2

Text

Vendor Address Line 2

invoice-Part2-VendorDetails:vendorAddress:city

Text

Vendor Address City

invoice-Part2-VendorDetails:vendorAddress:state

Text

Vendor Address State (formatted 2 character State code)

invoice-Part2-VendorDetails:vendorAddress:zip

Text

Vendor Address Zip Code (formatted 5 digit code)

invoice-Part2-VendorDetails:vendorAddress:country

Text

Vendor Address Country

invoice-Part2-VendorDetails:vendorEmailAddress

Text

Vendor Email Address

invoice-Part2-VendorDetails:vendorPhoneNumber

Text

Vendor Phone Number

invoice-Part2-VendorDetails:bankAccount

Text

Bank Account

invoice-Part3-BuyerDetails:buyerName(BillTo)

Text

Buyer Bill To Name

invoice-Part3-BuyerDetails:buyerAddress(BillTo):addressLine1

Text

Buyer Bill To Address Line 1

invoice-Part3-BuyerDetails:buyerAddress(BillTo):addressLine2

Text

Buyer Bill To Address Line 2

invoice-Part3-BuyerDetails:buyerAddress(BillTo):city

Text

Buyer Bill To Address City

invoice-Part3-BuyerDetails:buyerAddress(BillTo):state

Text

Buyer Bill To Address State (formatted 2 character State code)

invoice-Part3-BuyerDetails:buyerAddress(BillTo):zip

Text

Buyer Bill To Address Zip Code (formatted 5 digit code)

invoice-Part3-BuyerDetails:buyerAddress(BillTo):country

Text

Buyer Bill To Address Country

invoice-Part3-BuyerDetails:buyerName(ShipTo)

Text

Buyer Ship To Name

invoice-Part3-BuyerDetails:buyerAddress(ShipTo):addressLine1

Text

Buyer Ship To Address Line 1

invoice-Part3-BuyerDetails:buyerAddress(ShipTo):addressLine2

Text

Buyer Ship To Address Line 2

invoice-Part3-BuyerDetails:buyerAddress(ShipTo):city

Text

Buyer Ship To Address City

invoice-Part3-BuyerDetails:buyerAddress(ShipTo):state

Text

Buyer Ship To Address State (formatted 2 character State code)

invoice-Part3-BuyerDetails:buyerAddress(ShipTo):zip

Text

Buyer Ship To Address Zip Code (formatted 5 digit code)

invoice-Part3-BuyerDetails:buyerAddress(ShipTo):country

Text

Buyer Ship To Address Country

invoice-Part3-BuyerDetails:buyerEmailAddress

Text

Buyer Email Address

invoice-Part3-BuyerDetails:buyerPhoneNumber

Text

Buyer Phone Number

invoice-Part3-BuyerDetails:buyerTaxIdentifierType

Text

Buyer Tax Identifier Type

invoice-Part3-BuyerDetails:buyerTaxIdentifierValue

Text

Buyer Tax Identifier

invoice-Part4-Payment:paymentDueDate

Date

Payment Due Date

invoice-Part4-Payment:deliveryDate

Date

Delivery Date

invoice-Part4-Payment:freight

Money

Freight

invoice-Part4-Payment:packing

Money

Packing

invoice-Part4-Payment:travel

Money

Travel

invoice-Part4-Payment:handling

Money

Handling

invoice-Part4-Payment:carriage

Money

Carriage

invoice-Part4-Payment:insurance

Money

Insurance

invoice-Part4-Payment:fuel

Money

Fuel

invoice-Part4-Payment:invoiceSubtotal

Money

Invoice Subtotal

invoice-Part4-Payment:invoiceTax

Money

Invoice Tax

invoice-Part4-Payment:invoiceTotal

Money

Invoice Total

'invoice-Part4-Payment:amountPaid'

Money

Amount Paid

Optional itemized line item fields captured

Field data attributed to itemized line items in the Invoice is captured as a Table object.

📘

Form-Driven Output

column_ids associated with the Table object will be a subset of the following list that matches the line item headers as they appear on the specific form.

Column ID

Data Type

Description

description

Text

Description

price

Money

Price

quantity

Text

Quantity

total

Money

Total

Sample Form

The below Ocrolus Sample PDF (input) matches the below Sample JSON Result (output).

Sample JSON Result

{
  "forms": [
    {
      "tables": [
        {
          "pk": 12245,
          "rows": [
            {
              "page_idx": 0,
              "cells": {
                "price": {
                  "value": "100.00"
                },
                "total": {
                  "value": "100.00"
                },
                "description": {
                  "value": "Front and rear brake cables"
                },
                "quantity": {
                  "value": "1.00"
                }
              },
              "page_doc_pk": 82312796
            },
            {
              "page_idx": 0,
              "cells": {
                "price": {
                  "value": "15.00"
                },
                "total": {
                  "value": "30.00"
                },
                "description": {
                  "value": "New set of pedal arms"
                },
                "quantity": {
                  "value": "2.00"
                }
              },
              "page_doc_pk": 82312796
            },
            {
              "page_idx": 0,
              "cells": {
                "price": {
                  "value": "5.00"
                },
                "total": {
                  "value": "15.00"
                },
                "description": {
                  "value": "Labor 3hrs"
                },
                "quantity": {
                  "value": "3.00"
                }
              },
              "page_doc_pk": 82312796
            }
          ],
          "columns": [
            {
              "alias_used": "QTY",
              "column_id": "quantity"
            },
            {
              "alias_used": "DESCRIPTION",
              "column_id": "description"
            },
            {
              "alias_used": "UNIT PRICE",
              "column_id": "price"
            },
            {
              "alias_used": "AMOUNT",
              "column_id": "total"
            }
          ]
        }
      ],
      "type": "INVOICE",
      "form_pk": 9677325,
      "pages": [
        {
          "other_frauds": [],
          "page_idx": 0,
          "uploaded_doc_pk": 10572889,
          "fields": {
            "Buyer Address (Ship To) Address Line 1": {
              "is_empty": false,
              "source_filename": "Ocrolus Sample PDF - Invoice.pdf",
              "alias_used": null,
              "value": "3787 PINEVIEW DRIVE",
              "page_doc_pk": 82312796
            },
            "Buyer Address (Ship To) Address Line 2": {
              "is_empty": true,
              "source_filename": "Ocrolus Sample PDF - Invoice.pdf",
              "alias_used": null,
              "value": "",
              "page_doc_pk": 82312796
            },
            "Buyer Phone Number": {
              "is_empty": true,
              "source_filename": "Ocrolus Sample PDF - Invoice.pdf",
              "alias_used": null,
              "value": "",
              "page_doc_pk": 82312796
            },
            "Buyer Email Address": {
              "is_empty": true,
              "source_filename": "Ocrolus Sample PDF - Invoice.pdf",
              "alias_used": null,
              "value": "",
              "page_doc_pk": 82312796
            },
            "Bank Account ": {
              "is_empty": true,
              "source_filename": "Ocrolus Sample PDF - Invoice.pdf",
              "alias_used": null,
              "value": "",
              "page_doc_pk": 82312796
            },
            "Payment Due Date": {
              "is_empty": false,
              "source_filename": "Ocrolus Sample PDF - Invoice.pdf",
              "alias_used": null,
              "value": "02/26/2019",
              "page_doc_pk": 82312796
            },
            "Fuel": {
              "is_empty": true,
              "source_filename": "Ocrolus Sample PDF - Invoice.pdf",
              "alias_used": null,
              "value": "",
              "page_doc_pk": 82312796
            },
            "Travel": {
              "is_empty": true,
              "source_filename": "Ocrolus Sample PDF - Invoice.pdf",
              "alias_used": null,
              "value": "",
              "page_doc_pk": 82312796
            },
            "Routing Number": {
              "is_empty": true,
              "source_filename": "Ocrolus Sample PDF - Invoice.pdf",
              "alias_used": null,
              "value": "",
              "page_doc_pk": 82312796
            },
            "Invoice Subtotal": {
              "is_empty": false,
              "source_filename": "Ocrolus Sample PDF - Invoice.pdf",
              "alias_used": null,
              "value": "145.00",
              "page_doc_pk": 82312796
            },
            "Terms": {
              "is_empty": true,
              "source_filename": "Ocrolus Sample PDF - Invoice.pdf",
              "alias_used": null,
              "value": "",
              "page_doc_pk": 82312796
            },
            "Buyer Address (Ship To) State": {
              "is_empty": false,
              "source_filename": "Ocrolus Sample PDF - Invoice.pdf",
              "alias_used": null,
              "value": "MA",
              "page_doc_pk": 82312796
            },
            "Invoice Date": {
              "is_empty": false,
              "source_filename": "Ocrolus Sample PDF - Invoice.pdf",
              "alias_used": null,
              "value": "11/02/2019",
              "page_doc_pk": 82312796
            },
            "Vendor Address Address Line 1": {
              "is_empty": false,
              "source_filename": "Ocrolus Sample PDF - Invoice.pdf",
              "alias_used": null,
              "value": "1912 HARVEST LANE",
              "page_doc_pk": 82312796
            },
            "Vendor Address Zip": {
              "is_empty": false,
              "source_filename": "Ocrolus Sample PDF - Invoice.pdf",
              "alias_used": null,
              "value": "12210",
              "page_doc_pk": 82312796
            },
            "Vendor Address Address Line 2": {
              "is_empty": true,
              "source_filename": "Ocrolus Sample PDF - Invoice.pdf",
              "alias_used": null,
              "value": "",
              "page_doc_pk": 82312796
            },
            "Packing": {
              "is_empty": true,
              "source_filename": "Ocrolus Sample PDF - Invoice.pdf",
              "alias_used": null,
              "value": "",
              "page_doc_pk": 82312796
            },
            "Buyer Address (Ship To) City": {
              "is_empty": false,
              "source_filename": "Ocrolus Sample PDF - Invoice.pdf",
              "alias_used": null,
              "value": "CAMBRIDGE",
              "page_doc_pk": 82312796
            },
            "Buyer Tax Identifier ": {
              "is_empty": true,
              "source_filename": "Ocrolus Sample PDF - Invoice.pdf",
              "alias_used": null,
              "value": "",
              "page_doc_pk": 82312796
            },
            "Purchase Order Number (PO)": {
              "is_empty": false,
              "source_filename": "Ocrolus Sample PDF - Invoice.pdf",
              "alias_used": null,
              "value": "2312/2019",
              "page_doc_pk": 82312796
            },
            "Vendor Address Country": {
              "is_empty": true,
              "source_filename": "Ocrolus Sample PDF - Invoice.pdf",
              "alias_used": null,
              "value": "",
              "page_doc_pk": 82312796
            },
            "Handling": {
              "is_empty": true,
              "source_filename": "Ocrolus Sample PDF - Invoice.pdf",
              "alias_used": null,
              "value": "",
              "page_doc_pk": 82312796
            },
            "Buyer Address (Bill To) Address Line 2": {
              "is_empty": true,
              "source_filename": "Ocrolus Sample PDF - Invoice.pdf",
              "alias_used": null,
              "value": "",
              "page_doc_pk": 82312796
            },
            "Vendor Email Address": {
              "is_empty": true,
              "source_filename": "Ocrolus Sample PDF - Invoice.pdf",
              "alias_used": null,
              "value": "",
              "page_doc_pk": 82312796
            },
            "Order Date": {
              "is_empty": true,
              "source_filename": "Ocrolus Sample PDF - Invoice.pdf",
              "alias_used": null,
              "value": "",
              "page_doc_pk": 82312796
            },
            "Buyer Address (Bill To) Address Line 1": {
              "is_empty": false,
              "source_filename": "Ocrolus Sample PDF - Invoice.pdf",
              "alias_used": null,
              "value": "2 COURT SQUARE",
              "page_doc_pk": 82312796
            },
            "Buyer Address (Ship To) Zip": {
              "is_empty": false,
              "source_filename": "Ocrolus Sample PDF - Invoice.pdf",
              "alias_used": null,
              "value": "12210",
              "page_doc_pk": 82312796
            },
            "Buyer Address (Ship To) Country": {
              "is_empty": true,
              "source_filename": "Ocrolus Sample PDF - Invoice.pdf",
              "alias_used": null,
              "value": "",
              "page_doc_pk": 82312796
            },
            "Buyer Address (Bill To) State": {
              "is_empty": false,
              "source_filename": "Ocrolus Sample PDF - Invoice.pdf",
              "alias_used": null,
              "value": "NY",
              "page_doc_pk": 82312796
            },
            "Invoice Total": {
              "is_empty": false,
              "source_filename": "Ocrolus Sample PDF - Invoice.pdf",
              "alias_used": null,
              "value": "154.06",
              "page_doc_pk": 82312796
            },
            "Buyer Name (Bill To)": {
              "is_empty": false,
              "source_filename": "Ocrolus Sample PDF - Invoice.pdf",
              "alias_used": null,
              "value": "JOHN SMITH",
              "page_doc_pk": 82312796
            },
            "Amount Paid": {
              "is_empty": true,
              "source_filename": "Ocrolus Sample PDF - Invoice.pdf",
              "alias_used": null,
              "value": "",
              "page_doc_pk": 82312796
            },
            "Vendor Address City": {
              "is_empty": false,
              "source_filename": "Ocrolus Sample PDF - Invoice.pdf",
              "alias_used": null,
              "value": "NEW YORK",
              "page_doc_pk": 82312796
            },
            "Invoice Tax": {
              "is_empty": false,
              "source_filename": "Ocrolus Sample PDF - Invoice.pdf",
              "alias_used": null,
              "value": "9.06",
              "page_doc_pk": 82312796
            },
            "Vendor Phone Number": {
              "is_empty": true,
              "source_filename": "Ocrolus Sample PDF - Invoice.pdf",
              "alias_used": null,
              "value": "",
              "page_doc_pk": 82312796
            },
            "Buyer Address (Bill To) Country": {
              "is_empty": true,
              "source_filename": "Ocrolus Sample PDF - Invoice.pdf",
              "alias_used": null,
              "value": "",
              "page_doc_pk": 82312796
            },
            "Vendor Address State": {
              "is_empty": false,
              "source_filename": "Ocrolus Sample PDF - Invoice.pdf",
              "alias_used": null,
              "value": "NY",
              "page_doc_pk": 82312796
            },
            "Account Number": {
              "is_empty": true,
              "source_filename": "Ocrolus Sample PDF - Invoice.pdf",
              "alias_used": null,
              "value": "",
              "page_doc_pk": 82312796
            },
            "Buyer Address (Bill To) City": {
              "is_empty": false,
              "source_filename": "Ocrolus Sample PDF - Invoice.pdf",
              "alias_used": null,
              "value": "NEW YORK",
              "page_doc_pk": 82312796
            },
            "Buyer Name (Ship To)": {
              "is_empty": false,
              "source_filename": "Ocrolus Sample PDF - Invoice.pdf",
              "alias_used": null,
              "value": "JOHN SMITH",
              "page_doc_pk": 82312796
            },
            "Delivery Date": {
              "is_empty": true,
              "source_filename": "Ocrolus Sample PDF - Invoice.pdf",
              "alias_used": null,
              "value": "",
              "page_doc_pk": 82312796
            },
            "Buyer Address (Bill To) Zip": {
              "is_empty": false,
              "source_filename": "Ocrolus Sample PDF - Invoice.pdf",
              "alias_used": null,
              "value": "12210",
              "page_doc_pk": 82312796
            },
            "Carriage": {
              "is_empty": true,
              "source_filename": "Ocrolus Sample PDF - Invoice.pdf",
              "alias_used": null,
              "value": "",
              "page_doc_pk": 82312796
            },
            "Freight": {
              "is_empty": true,
              "source_filename": "Ocrolus Sample PDF - Invoice.pdf",
              "alias_used": null,
              "value": "",
              "page_doc_pk": 82312796
            },
            "Vendor Name": {
              "is_empty": false,
              "source_filename": "Ocrolus Sample PDF - Invoice.pdf",
              "alias_used": null,
              "value": "EAST REPAIR INC.",
              "page_doc_pk": 82312796
            },
            "Insurance": {
              "is_empty": true,
              "source_filename": "Ocrolus Sample PDF - Invoice.pdf",
              "alias_used": null,
              "value": "",
              "page_doc_pk": 82312796
            },
            "Invoice Number": {
              "is_empty": false,
              "source_filename": "Ocrolus Sample PDF - Invoice.pdf",
              "alias_used": null,
              "value": "US-001",
              "page_doc_pk": 82312796
            }
          }
        }
      ]
    }
  ],
  "pk": 10572889
}

Updated 10 days ago

Invoices


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.