This guide covers how to integrate vendor enrichment into your application using the Payabli API. For background on how enrichment works, see Vendor enrichment.
Vendor enrichment is an opt-in feature. Contact Payabli to enable it for your organization.
Use the enrich vendor endpoint to run enrichment stages on a vendor that already exists.
Specify the vendorId and which stages to run in scope. Include a Base64-encoded PDF in invoiceFile when using the invoice_scan scope.
The response includes the enrichment status and, when applyEnrichmentData is false, the raw extraction results.
When applyEnrichmentData is true, the extracted data is written to the vendor record and also returned in the response.
After receiving enrichment results in review mode (applyEnrichmentData: false):
enrichmentData to the user for confirmation.Check stagesTriggered to confirm which stages succeeded. Failed stages are excluded from this array.
Attach a PDF invoice to the create vendor request using the attachment field. When enrichment is enabled, the invoice is scanned and extracted details are merged into the vendor record.
The merge follows the empty-field-only rule: request body fields always take precedence over extracted data. If you include name1 in the request and the invoice scan also extracts a vendor name, your value wins.
If the scan fails for any reason, vendor creation proceeds with the original request data. The scan never causes vendor creation to fail.
The create bill endpoint triggers an invoice scan when the first item in the attachments array is a PDF. No new request fields are needed — use the existing attachments array.
When the scan succeeds, the system:
The same empty-field-only rule applies — your request values always take precedence.
The get vendor endpoint returns enrichment fields directly on the vendor response:
Key fields:
The enrich endpoint returns specific error messages when enrichment can’t proceed:
For invoice scans during vendor or bill creation, scan failures don’t block the request. The creation request always succeeds, even if the scan fails.
See these related resources to help you get the most out of Payabli.