Skip to content
All projects
Core engineering libraryData Manager

MANAGER.py — Manager.io Accounting API Client

BCHPR · finance and supply chain · 2023 – present

15,661-line Manager.io API client. Full create / update / delete across 18 document types — sales quotes, orders, invoices, credit notes, delivery notes and receipts; purchase quotes, orders, invoices and debit notes; inventory items, locations, transfers, write-offs, goods receipts, production orders and starting balances; and payments. Customers, suppliers, projects, accounts, assets and tax codes are exposed read-only.

Highlights

  • Manager.io list endpoints return summaries only, so every full record needs a second call — those run thread-parallel rather than in sequence.
  • Server-side pagination, sort and field projection via a fluent QueryBuilder; timestamp filtering is client-side because the API does not support it.
  • A dedicated timestamp pipeline built to fix three named defects: same-second edits dropped by a “+1 microsecond” hack, naive-versus-aware datetime comparisons raising TypeError, and untimestamped records silently discarded.
  • Manual redirect handling — Manager.io's load balancer answers writes with a 302, and following it naively turns a POST into a GET and loses the body.
  • Per-business custom fields (seven types) expanded onto sales, purchase, inventory and account records so callers get named columns rather than opaque IDs.
  • Retry with exponential backoff and jitter on 408, 429 and 5xx; in-memory TTL caches on chart-of-accounts and inventory lookups.