OCR a base64-encoded string

View as MarkdownOpen in Claude
Use this endpoint to submit a Base64-encoded image file for OCR processing. The accepted file formats include PDF, JPG, JPEG, PNG, and GIF. Specify the desired type of result (either 'bill' or 'invoice') in the path parameter `typeResult`. The response will contain the OCR processing results, including extracted data such as bill number, vendor information, bill items, and more.

Authentication

requestTokenstring

Long-lived API token sent in the requestToken header. See API token authentication.

OR
AuthorizationBearer

OAuth2 Bearer access token from the client-credentials flow. See OAuth authentication.

Path parameters

typeResultstringRequired

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

Request

This endpoint expects an object.
ftypeenumOptional

The MIME type of the file (if content is provided).

filenamestringOptional
The name of the file to be uploaded
furlstringOptional
Optional URL link to the file
fContentstringOptional

Base64-encoded file content

Response

OCR document processing result
isSuccessboolean

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

responseTextstring

Response text for operation: ‘Success’ or ‘Declined’.

responseCodeinteger

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

responseDataobject
Details of the OCR processing result