Create Bill Sync Supplier Rule
POST/api/accounting/bill-sync/rules
Create or replace one supplier's rule on a connection. A supplier has at most one rule per connection, so posting again for the same supplier replaces it.
accounting:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Only service suppliers can have a rule (expense bills need a service supplier). A send rule also queues that supplier's existing bills in the background; the response carries tracked_job_log_id (poll GET /api/tracked-job-logs/{trackedJobLog}), otherwise null.
Request fields:
supplier_id(required, integer) - an existing service supplier.mode(required) -send,provider_ownedorsku_only.note(optional, max 255) - why the supplier is treated differently.connection_id(optional, integer) - defaults to the first Xero / QuickBooks connection.
Returns 201 with the saved rule. Returns 422 when there is no Xero or QuickBooks connection, the supplier sells stock, or a field is invalid.
Authentication: Requires Bearer token. Scope: accounting (read/write). The user must hold the Manage bill sync permission (accounting.bill_sync).
Request
Responses
- 201
- 401
- 403
- 422
- 429
Created
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 Content
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.