J

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 / create
  • GET/PATCH /api/v1/clients/:id — get / update
  • GET/POST /api/v1/orders — list / create
  • GET/PATCH /api/v1/orders/:id — read / update (same behavior as /api/order actions)
  • 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, or invoice_item (see OpenAPI)
  • GET /api/v1/gmail/threads/:legacyThreadId — Gmail thread ↔ orders/client sync context
  • PUT /api/v1/gmail/email-threads/:legacyThreadId — upsert full Gmail thread + messages (CLI)
  • GET /api/v1/gmail/email-threads/:legacyThreadId — read stored thread (account_email query)

Gmail integration guide (thread context + email thread sync). Repo copy: docs/api/GMAIL_INTEGRATION.md