OCR a PDF or Image File
API Basics
Pay In Endpoints
- MoneyIn
- Subscription
- TokenStorage
- Invoice
- LineItem
- PaymentLink
- PaymentMethodDomain
- HostedPaymentPages
- Cloud
- Wallet: Apple Pay
Pay Out Endpoints
- MoneyOut
- Bill
Pay Ops Endpoints
- Templates
- Boarding
- Chargebacks and ACH Returns
- Entities
- Notification
- Query
- Statistic
- Export
- Import
Object Models
- Object Model References
OCR a PDF or Image File
Use Payabli’s optical character recognition (OCR) engine on an uploaded image file. You can use the response data to then create a new bill or invoice.
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
Most endpoints require an organization
token. Some endpoints require an application
token, and those endpoints are noted.
Path Parameters
The type of object to create in Payabli. Accepted values are bill
and invoice
.
Example:
"bill"
Body
multipart/form-data
Response
200 - application/json
Success
Was this page helpful?
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..."
}
]
}
}
}