Check Bill for Duplicates
POST/api/bills/duplicate-check
Check a bill, before or after it is saved, against the supplier's other bills and purchase invoices and against the unlinked bills in the connected accounting system (Xero / QuickBooks Online) for the provider contacts mapped to that supplier. Writes nothing.
purchase-orders:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Two tiers:
exact- same supplier and the same invoice number, ignoring punctuation, spaces and leading zeros. Creating or editing an expense bill with an exact match is refused with 422 oninvoice_numberuntil you resend it withduplicate_acknowledged: true. Invoice numbers are unique per supplier, not across suppliers: the same supplier's bill with the identical number (case-insensitive) can't be acknowledged, so it stays a 422 until the number changes; that match hasblocks_save: true.possible- same supplier and currency, a total within tolerance and an invoice date within a few days. A warning only; saving is allowed.
A pair someone already answered with Record Bill Duplicate Decision is never flagged again.
Body:
supplier_id(required, integer) - an existing supplier.invoice_number(required key, string or null).invoice_date(required, Y-m-d).total(required, number) - the bill's grand total in its own currency.currency_id(optional, integer, nullable) - the bill's currency; defaults to the tenant currency.exclude_bill_id(optional, integer, nullable) - the saved bill being checked, so it is not matched against itself.
Response:
tier-exact,possible, or null when nothing matched.matches[]- exact matches first. Each hastype(bill,purchase_invoiceorprovider),id(for a provider bill,{connection_id}:{remote_type}:{remote_id}),label,url(an app path, or the provider's own link),total,date,reason,can_link(true for provider bills: use Link Bill to Provider Bill),tierandblocks_save(true only for the same supplier's bill with the identical number). A QuickBooks Online match'surlopens the bill in QuickBooks, as a Xero match's does.
Authentication: Requires Bearer token. Permission: create or edit bills (bills.create or bills.update). Scope: purchase-orders (read/write).
Request
Responses
- 200
- 401
- 403
- 422
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Unprocessable Entity
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.