Skip to main content

Classify Provider Bill

PATCH 

/api/accounting/provider-bills/review/:remoteId

Save a decision for one provider bill: an expense bill, a purchase invoice on a purchase order, or ignored. Nothing is created yet; classified bills are brought in by Bring Provider Bills into SKU.io. Nothing is written to Xero or QuickBooks.

Required scope: purchase-orders:write

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Request fields:

  • classification (required) - bill (expense bill), purchase_invoice (an invoice on a purchase order) or ignored.
  • supplier_id (optional, integer) - the SKU.io supplier. Saved as the contact's mapping for next time. When omitted, the contact's saved mapping or a supplier with the same name is used.
  • create_supplier (optional, boolean) - create a service supplier named after the provider contact instead of choosing one.
  • purchase_order_id (required when classification is purchase_invoice, integer) - the purchase order this bill invoices. It must belong to the same supplier.
  • ignore_reason (optional, max 255) - why the bill is ignored.
  • always_ignore (optional, boolean) - with ignored, also ignore every future bill from this contact.
  • connection_id (optional, integer).

Expense bills need a service supplier; a goods supplier's bill must be a purchase invoice or ignored.

Review fields: id, connection_id, remote_type, remote_id, status (pending, classified, committed, ignored, failed), classification (bill, purchase_invoice, ignored, or null), billable_type / billable_id (the SKU.io document once brought in), supplier_id, purchase_order_id, ignore_reason, provider_status, amount_due, total, currency_code, document_state (from_provider, uploaded, none), change_state (none, changed, voided - whether the provider bill changed after it was brought in), placeholder_number (true when the provider bill had no number and SKU.io gave it one), invoice_details (what was read from an uploaded invoice), error (why bringing it in failed), decided_at, refreshed_at.

Returns 422 when the bill is already in SKU.io, the supplier is a goods supplier on an expense bill, the purchase order belongs to another supplier, or a field is invalid. Returns 404 when the tenant has no Xero or QuickBooks connection.

Authentication: Requires Bearer token. Scope: purchase-orders (read/write). The user must hold the Review provider bills permission (bills.review_provider).

Request​

Responses​

OK

Response Headers
    Content-Type