POST
/
Import
/
ocrDocumentForm
/
{typeResult}
curl --request POST \
  --url https://api-sandbox.payabli.com/api/Import/ocrDocumentForm/{typeResult} \
  --header 'Content-Type: multipart/form-data' \
  --header 'requestToken: <api-key>'
{
  "isSuccess": true,
  "responseText": "Success",
  "responseCode": 1,
  "responseData": {
    "resultData": {
      "billNumber": "6654477",
      "netAmount": 3000.21,
      "billDate": "2024-02-01T00:00:00",
      "dueDate": "2024-02-01T00:00:00",
      "comments": null,
      "billItems": [
        {
          "itemTotalAmount": 3000,
          "itemTaxAmount": 0,
          "itemTaxRate": 0,
          "itemProductCode": null,
          "itemProductName": "Paper Airplane Stock",
          "itemDescription": "",
          "itemCommodityCode": null,
          "itemUnitOfMeasure": null,
          "itemCost": 3,
          "itemQty": 1000,
          "itemMode": null,
          "itemCategories": []
        }
      ],
      "mode": 0,
      "accountingField1": null,
      "accountingField2": "VBGEB-45841",
      "additionalData": {
        "category": "Job Supplies",
        "currency_code": "USD",
        "type": "invoice",
        "reference_number": "VBGEB-45841"
      },
      "vendor": {
        "vendorNumber": null,
        "name1": "Paul's Paper Supply",
        "name2": "Paul's Paper Supply Company",
        "ein": null,
        "phone": "970-222-2121",
        "email": null,
        "address1": "123 North 1st St",
        "address2": null,
        "city": null,
        "state": null,
        "zip": null,
        "country": null,
        "mcc": null,
        "locationCode": null,
        "contacts": null,
        "billingData": {
          "id": 0,
          "bankName": "",
          "routingAccount": "",
          "accountNumber": "",
          "typeAccount": "",
          "bankAccountHolderName": "",
          "bankAccountHolderType": "Business",
          "bankAccountFunction": 0
        },
        "paymentMethod": null,
        "vendorStatus": 1,
        "remitAddress1": null,
        "remitAddress2": null,
        "remitCity": null,
        "remitState": null,
        "remitZip": null,
        "remitCountry": null,
        "payeeName1": null,
        "payeeName2": null,
        "customerVendorAccount": null,
        "internalReferenceId": null,
        "customField1": null,
        "customField2": null,
        "additionalData": {
          "web": "www.paulspaper.com"
        }
      },
      "endDate": null,
      "frequency": null,
      "terms": null,
      "status": 0,
      "lotNumber": null,
      "attachments": [
        {
          "ftype": "pdf",
          "filename": "paulsPaper_sample Invoice.pdf",
          "fileDescriptor": null,
          "furl": null,
          "fContent": "JVBERi0xLjcNCiW1tbW1DQoxIDAgb2JqDQo8PC9UeXBlL0NhdGFsb2cvUGFnZXMgMiAwIFIvTGFuZyhlbikgL1N0cnVjdFRyZWVSb290IDE4IDAgUi9NYXJrSW5mbzw8L01hcmtlZCB0cnVlPj4vTWV0YWRhdGEgMTg0IDAgUi9WaWV3ZXJQcmVmZXJlbmNlcyAxODUgMCBSPj4NCmVuZG9iag0KMiAwIG9iag0KPDwvVHlwZS9QYWdlcy9Db3VudCAxL0tpZHNbIDMgMCBSXSA..."
        }
      ]
    }
  }
}

Learn how to use our OCR engine to scrape documents and create : Use the OCR Engine

Authorizations

requestToken
string
header
required

Most endpoints require an organization token. Some endpoints require an application token, and those endpoints are noted.

Path Parameters

typeResult
string
required

The type of object to create in Payabli. Accepted values are bill and invoice.

Example:

"bill"

Body

multipart/form-data
file
file

The image file to OCR. Accepted formats:

  • pdf
  • jpg
  • jpeg
  • png
  • gif

Response

200 - application/json

Success

isSuccess
boolean

Boolean indicating whether the operation was successful. A true value indicates success. A false value indicates failure.

Example:

true

responseText
string | null

Response text for operation: 'Success' or 'Declined'.

Example:

"Success"

responseCode
integer | null

Code for the response. Learn more in API Response Codes.

Example:

1

responseData
object | null

Object containing the response data.

pageIdentifier
string | null

Auxiliary validation used internally by payment pages and components.

Example:

null