> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://cla-demo.postmansolutions.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://cla-demo.postmansolutions.com/_mcp/server.

# Documents AI API Routing

General note:

* api.\* refers to the primary backend (likely Python/FastAPI or similar).
* goApi.\* (seen only in WorkflowEditor) likely targets a separate Go-based workflow service.
* Some routes use string interpolation with IDs (e.g. entities/$\{entitiesID}); I list them in templated form.

entities & Line Items

* GET entities: Load list of entities.
* GET entities/\{entityID}: Fetch a single invoice’s full data.
* POST entities/\{entityID}/continue: Move invoice forward in processing workflow.
* POST entities/\{entityID}/approve: Approve an invoice.
* POST entities/\{entityID}/reject: Reject an invoice.
* POST entities/\{entityID}/manual: Mark or trigger manual handling.
* POST entities/\{entityID}/rerun: Reprocess/rerun extraction or workflow.
* PATCH entities/\{entityID}: Update invoice-level fields (header/vendor/customer/total sections).
* POST entities/\{entityID}/lineItems: Add a new line item.
* PUT entities/\{entityID}/lineItems/\{lineID}: Update an existing line item.
* DELETE entities/\{entityID}/lineItems/\{lineID}: Remove a line item.
* POST entities/restart: Bulk restart processing of selected entities (used in RestartBulk).
* POST entities/export: Trigger export (appears in multiple bulk/export components).
* POST entities/\{entityID}/(inside batch line item edit block – likely attachments or note) (There is also a multi-edit section posting data; context suggests saving batched edits.)
* PATCH entities/\{entityID} (also used in line/header edit subforms repeatedly).

Invoice Coding & Supporting Data

* GET accounts / GET classes / GET vendors: Load coding metadata (fallbacks used if failing).
* GET clients/\{clientId}/terms (seen as /clients/123/terms in Matching.tsx): Retrieve payment or contract terms for client.

Knowledge Base Management

* GET /knowledge/\{kbType}: Fetch entries of a specific knowledge base type.
* GET /knowledge/\{kbType}/template: Download/import template format.
* POST /knowledge/\{kbType}: Create a new knowledge base entry.
* POST /knowledge/\{kbType}/import: Bulk import via uploaded file.
* DELETE /knowledge/\{kbType}/\{id}: Remove an entry.
* POST /client/datalookup: Upload or create general data lookup entries (likely reference data).
* POST /client/datalookup/equipment: Same as above but equipment-specific.

ERP / CRM Integration Connections

* GET /admin/client/\{client}/connection/\{type}: Fetch existing connector (ERP/CRM) details (attempted per type).
* POST /admin/client/\{client}/connection: Create or set connector credentials.
* PUT /admin/client/\{client}/connection: Update or clear credentials (also used to “disconnect” by sending empty details).

Feedback & Requests

* GET /feedback: View submitted feedback items (FeedbackViewer).
* POST /feedback: Submit feedback or connector support request (multipart form with topic/integration request).

Webhook Management

* DELETE /admin/webhooks/\{id}: Remove a configured webhook (seen in WebhookManager).

Inbox / Email Monitoring (Exchange)

* GET /exchange/blocked\_senders: List blocked senders.
* POST /exchange/blocked\_senders: Add a blocked sender (value + reason).
* DELETE /exchange/blocked\_senders/\{id}: Unblock a sender.
* GET /exchange/list\_inboxes: List monitored inboxes.
* GET /exchange/auth: Check or retrieve auth status/config for Exchange integration.
* DELETE /exchange/unsubscribe/inbox/\{subscriptionId}: Stop monitoring a specific inbox.
* (Commented) DELETE /exchange/unsubscribe/inbox?inbox\_address=... (older variant).

Workflow / Orchestration (goApi namespace)

* POST /workflow: Create workflow definition.
* GET /workflow: List workflows.
* GET /workflow/\{id}: Fetch workflow by ID (latest or default version).
* GET /workflow/\{id}/\{version}: Fetch a specific version (returned but not directly awaited in snippet).
* PUT /workflow/\{id}: Update workflow.
* DELETE /workflow/\{id}: Delete workflow.
* POST /node: Create a node definition.
* GET /node: List nodes.
* GET /node/\{id}: Fetch node definition.
* PUT /node/\{id}: Update node.
* DELETE /node/\{id}: Delete node.
* GET /nodeconfig: Retrieve node configuration schemas.
* GET /workflows/results: Fetch execution or validation results (likely monitoring or test runs).

Access Control (Hooks)

* (Covered via hooks above: usePermissions, useRoles, useGroups, useUsers, useClients).

Data Lookup (again for clarity)

* POST /client/datalookup
* POST /client/datalookup/equipment

Export / Bulk Ops (besides entities/export)

* POST entities/export (appears in multiple bulk components for download/export).

Misc (from Intake / Viewer helpers)

* PATCH entities/\{entityID} (multiple focused updates for sections)
* Repeated pattern of invoice line operations already summarized.

Inferred Functional Intent (high level)

* entities: Full lifecycle (intake, edit header/vendor/customer/amounts, line CRUD, status transitions, export, rerun).
* Reference Data: accounts/classes/vendors for coding; knowledge base entries for domain guidance.
* Integrations: Manage ERP/CRM connector credentials per client and type (ERP vs CRM).
* Workflow Engine: Separate service (goApi) managing graph-based workflows and nodes.
* Email/Inbox Monitoring: Exchange integration for automated ingestion or monitoring, with security controls (blocked senders).
* Access & Identity: CRUD for users, groups, roles, permissions, and clients.
* Feedback & Requests: General feedback plus requesting new connector support.
* Data Lookup: Uploading structured reference datasets (general + equipment).
* Webhooks: Admin removal of webhook configurations.