Integration API
Authenticate to /api/v1 with Authorization: Bearer <token> (token from Settings → Developer).
User guide · Interactive API reference (OpenAPI) · OpenAPI YAML
Endpoints (Phase 1)
GET/POST /api/v1/clients— list / createGET/PATCH /api/v1/clients/:id— get / updateGET/POST /api/v1/orders— list / createGET/PATCH /api/v1/orders/:id— read / update (same behavior as/api/orderactions)GET /api/v1/products/search— unified search (local catalog, S&S, SanMar, matching invoice lines; same mix as invoice item search)GET /api/v1/products/:source— product info:sanmar,ss, orinvoice_item(see OpenAPI)GET /api/v1/gmail/threads/:legacyThreadId— Gmail thread ↔ orders/client sync contextPUT /api/v1/gmail/email-threads/:legacyThreadId— upsert full Gmail thread + messages (CLI)GET /api/v1/gmail/email-threads/:legacyThreadId— read stored thread (account_emailquery)
Gmail integration guide (thread context + email thread sync). Repo copy: docs/api/GMAIL_INTEGRATION.md