Skip to main content

Operations API

Run bounded bulk receivables actions and generate operational exports.

Operations endpoints apply one reviewed action to explicit record selections or produce bounded data exports. Always check counts and identifier arrays in the response. The API can skip eligible, inaccessible, terminal, or approval-gated records.

Batch Operations

/v1/operations/batches
MethodPathRequest schemaSuccess response
POST/invoices/deleteBatchInvoiceIdsRequestBatchDeleteResponse
POST/invoices/statusBatchUpdateStatusRequestBatchStatusUpdateResponse
POST/invoices/sendBatchSendRequestBatchSendResponse
POST/invoices/mark-paidBatchMarkPaidRequestBatchMarkPaidResponse
POST/invoices/assign-templateBatchAssignTemplateRequestBatchAssignTemplateResponse
POST/invoices/duplicateBatchInvoiceIdsRequestBatchDuplicateResponse
POST/clients/archiveBatchClientIdsRequestBatchArchiveClientsResponse

Identifier arrays accept 1–100 UUIDs. Status updates add status. Mark-paid adds optional paidAt. Template assignment adds templateId. Batch sending can include emailSubject with maximum 500 characters and emailBody with maximum 5,000 characters.

{
  "invoiceIds": [
    "550e8400-e29b-41d4-a716-446655440000",
    "0f8fad5b-d9cb-469f-a165-70867728950e"
  ],
  "status": "pending"
}

Response fields vary by operation but include the processed count and affected IDs. Status and send operations can also include skippedCount, skipped IDs, IDs that need approval, blocked IDs, or a summary message.

Exports

/v1/operations/exports
MethodPathRequest schemaSuccess response
POST/invoicesExportInvoicesRequestExportInvoicesResponse
POST/clientsExportClientsRequestExportClientsResponse
POST/invoice/{invoiceId}ExportSingleInvoiceRequestExportSingleInvoiceResponse
POST/summaryExportSummaryRequestExportSummaryResponse

Invoice and client exports support json or csv. Invoice filters include status, ISO 8601 date range, client, and optional line-item inclusion. Client exports can include archived records and per-client statistics. Summary periods are month, quarter, or year.

Export responses include format, filename, content, recordCount, and truncated. A truncated response means that more records match beyond the bounded export limit. Narrow the filters or split the export window. Do not assume that the file is complete.

Concurrency and Retry Safety

  • disable repeated submission while a batch is in progress
  • use a stable idempotency key when the operation documents support for one
  • after a timeout, check affected records before you retry a destructive batch or a batch that the client sees
  • refresh invoice, client, collections, and analytics views after a successful operation
  • treat generated export content as potentially sensitive organization data

We use cookies to improve your experience, analyze traffic, and personalize content.