Sync Payments from Xero
POST/api/xero/payments/download
Dispatch a tracked background sync that pulls payments from Xero's Payments API into the local mirror (paged 100/request, upserted by PaymentID). Payments recorded directly in Xero appear locally; payments previously pushed from SKU refresh in place. Payments deleted in Xero are kept with status DELETED.
This endpoint currently requires session authentication; Personal Access Token scope support is in progress.
Authentication: Requires Bearer token.
Body (all optional, nullable dates Y-m-d):
date_from— only payments dated on/after (builds the Xero ODataDate >= DateTime(...)filter)date_to— only payments dated on/beforemodified_after— incremental: only records changed since (If-Modified-Since)
All null = full pull. A nightly incremental sync also runs automatically for entities enabled in the accounting sync settings (mirror_sync_controls, off by default); this endpoint is the on-demand trigger and never disturbs the scheduled sync's incremental cursor. Returns the tracked-job id for following progress via the tracked job log endpoints.
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.