Skip to content

API Calls

Base: https://api.g3nretailstack.com/accounting

Source of truth: /internal-docs/accounting-openapi.yaml/accounting/openapi.yaml

Notes: samples are schema-derived placeholders. Replace placeholder values (ORGCODE, SESSION_GUID, etc.) with real values.

Inventory

MethodPathSummaryRequest schemaResponse schema
POST/ar/aging/reportAR aging report (draft)ArAgingReportRequestArAgingReportEnvelope
POST/ar/balancePer-customer AR balance (draft)ArBalanceRequestArBalanceEnvelope
POST/ar/credit-hold/checkCheck active credit/payment holds for a customerNoneEnvelope
POST/ar/statementCustomer AR statement (draft)ArStatementRequestArStatementEnvelope
POST/commentAdd comment (draft)CommentAddRequestCommentEnvelope
POST/comment/getGet comment (draft)CommentGetRequestCommentEnvelope
POST/comment/listList comments (draft)CommentListRequestCommentListEnvelope
POST/comment/reportReport top-N largest comments (draft)CommentReportRequestCommentReportEnvelope
POST/comment/reviseRevise comment (draft)CommentReviseRequestCommentEnvelope
POST/comment/statusUpdate comment status (draft)CommentStatusRequestCommentEnvelope
POST/commission/adjustRecord a manual commission adjustment (bonus, chargeback, correction)NoneEnvelope
POST/commission/getGet commission record by commission_idNoneEnvelope
POST/commission/listList commissions by org, associate, or orderNoneEnvelope
POST/commission/payout/createCreate a commission payout for an associate and periodNoneEnvelope
POST/commission/payout/getGet commission payout by payout_idNoneEnvelope
POST/commission/payout/listList commission payouts by org or associateNoneEnvelope
POST/commission/payout/status/setAdvance commission payout lifecycle (pending → approved → paid)NoneEnvelope
POST/commission/split/setSet multi-associate commission splits (must sum to 10000 bps)NoneEnvelope
POST/commission/statementGet commission statement for an associate in a given periodNoneEnvelope
POST/consignment/settlement/approveApprove a consignment settlementNoneEnvelope
POST/consignment/settlement/createCreate a consignment settlementNoneEnvelope
POST/consignment/settlement/getGet a consignment settlement by IDNoneEnvelope
POST/consignment/settlement/listList consignment settlementsNoneEnvelope
POST/consignment/settlement/status/setSet consignment settlement statusNoneEnvelope
POST/dunning/action/createRecord a dunning action on an overdue invoiceNoneEnvelope
POST/dunning/action/listList dunning actions for an invoice or customerNoneEnvelope
POST/dunning/evaluateEvaluate overdue invoices against dunning policy (read-only)NoneEnvelope
POST/dunning/policy/getGet dunning escalation policy for orgNoneEnvelope
POST/dunning/policy/setSet dunning escalation policy for orgNoneEnvelope
POST/event/getGet financial event (draft)EventGetRequestEventEnvelope
POST/event/listList financial events (draft)EventListRequestEventListEnvelope
POST/event/recordRecord financial event (draft)EventRecordRequestEventEnvelope
POST/export/batch/createCreate export batch (draft)ExportBatchCreateRequestExportBatchEnvelope
POST/export/batch/getGet export batch (draft)ExportBatchGetRequestExportBatchEnvelope
POST/export/batch/listList export batches (draft)ExportBatchListRequestExportBatchListEnvelope
POST/export/batch/repairCreate export repair batch (draft)ExportBatchRepairRequestExportBatchEnvelope
POST/export/batch/status/setSet export batch status (draft)ExportBatchStatusSetRequestExportBatchEnvelope
POST/export/createCreate export batch (draft)ExportCreateRequestExportEnvelope
POST/export/getGet export batch (draft)ExportGetRequestExportEnvelope
POST/export/listList export batches (draft)ExportListRequestExportListEnvelope
POST/export/schedule/createCreate export schedule (draft)ExportScheduleCreateRequestExportScheduleEnvelope
POST/export/schedule/getGet export schedule (draft)ExportScheduleGetRequestExportScheduleEnvelope
POST/export/schedule/listList export schedules (draft)ExportScheduleListRequestExportScheduleListEnvelope
POST/export/schedule/status/setSet export schedule status (draft)ExportScheduleStatusSetRequestExportScheduleEnvelope
POST/franchise/royalty/calculateCalculate franchise royalty for facility and periodNoneEnvelope
POST/franchise/royalty/getGet a franchise royalty recordNoneEnvelope
POST/franchise/royalty/listList franchise royalty recordsNoneEnvelope
POST/franchise/royalty/rule/getGet current franchise royalty ruleNoneEnvelope
POST/franchise/royalty/rule/setSet franchise royalty rule (dual-record)NoneEnvelope
POST/franchise/royalty/status/setSet franchise royalty record statusNoneEnvelope
POST/inbox/createCreate inbox notification (draft)InboxCreateRequestInboxEnvelope
POST/inbox/getGet inbox notification (draft)InboxGetRequestInboxEnvelope
POST/inbox/listList inbox notifications (draft)InboxListRequestInboxListEnvelope
POST/inbox/stateUpdate inbox state (draft)InboxStateRequestInboxEnvelope
POST/inbox/statusUpdate inbox status (draft)InboxStatusRequestInboxEnvelope
POST/inference/config/getGet LLM inference configurationNoneEnvelope
POST/inference/config/setSet LLM inference configurationNoneEnvelope
POST/inference/snapshot/createCreate LLM inference snapshot (export to S3)NoneEnvelope
POST/invoice/getGet invoice by ID (draft)InvoiceGetRequestInvoiceEnvelope
POST/invoice/listList invoices (draft)InvoiceListRequestInvoiceListEnvelope
POST/invoice/payment/applyApply payment to invoice (draft)InvoicePaymentApplyRequestArPaymentEnvelope
POST/invoice/payment/listList payments for invoice (draft)InvoicePaymentListRequestArPaymentListEnvelope
POST/invoice/setCreate or update invoice (draft)InvoiceSetRequestInvoiceEnvelope
POST/invoice/status/setSet invoice status (draft)InvoiceStatusSetRequestInvoiceEnvelope
POST/lineage/listList lineage by source reference (draft)LineageListRequestLineageListEnvelope
POST/reconcile/reportReconciliation report (draft)ReconcileReportRequestReconcileReportEnvelope
POST/rollup/financial/exportExport financial rollups to S3 for date rangeNoneEnvelope
POST/rollup/financial/getGet financial rollup (draft)FinancialRollupGetRequestFinancialRollupEnvelope
POST/rollup/financial/listList financial rollups (draft)FinancialRollupListRequestFinancialRollupListEnvelope
GET/statHealth checkNoneEnvelope
POST/storage/usage/getGet storage usage record (draft)StorageUsageGetRequestStorageUsageEnvelope
POST/storage/usage/listList storage usage records (draft)StorageUsageListRequestStorageUsageListEnvelope
POST/storage/usage/reconcileReconcile storage usage window (draft)StorageUsageReconcileRequestStorageUsageReconcileEnvelope
POST/storage/usage/recordRecord storage usage (draft)StorageUsageRecordRequestStorageUsageEnvelope
POST/usage/rollup/getGet daily usage rollup (draft)UsageRollupGetRequestUsageRollupEnvelope
POST/usage/rollup/listList daily usage rollups (draft)UsageRollupListRequestUsageRollupListEnvelope

Call details

POST /ar/aging/report

Purpose: AR aging report (draft)

Notes: AR aging report (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Buckets: current, 1-30, 31-60, 61-90, 91-120, 120+ days past due. Supports optional customer_ref filter. Route class Tier B (p95 400ms).

Request schema: ArAgingReportRequest Response schema: ArAgingReportEnvelope

Sample request (schema-derived)

json
{
  "customer_ref": "string",
  "as_of": "2026-01-01",
  "limit": 8
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "report": {
      "as_of": "2026-01-01",
      "customer_ref": "string",
      "buckets": {}
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /ar/aging/report",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /ar/balance

Purpose: Per-customer AR balance (draft)

Notes: Per-customer AR balance (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Returns outstanding balance by currency for a customer. Route class Tier B (p95 300ms).

Request schema: ArBalanceRequest Response schema: ArBalanceEnvelope

Sample request (schema-derived)

json
{
  "customer_ref": "string"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "customer_ref": "string",
    "balances": {},
    "invoice_count": 0
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /ar/balance",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /ar/credit-hold/check

Purpose: Check active credit/payment holds for a customer

Request schema: None Response schema: Envelope

Sample request (schema-derived)

json
{}

Sample response (shape-only)

json
{
  "success": true,
  "data": {},
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /ar/credit-hold/check",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /ar/statement

Purpose: Customer AR statement (draft)

Notes: Customer AR statement (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Returns invoices and running balance for a customer within a date range. Paginated with limit/next_token. Route class Tier B (p95 400ms).

Request schema: ArStatementRequest Response schema: ArStatementEnvelope

Sample request (schema-derived)

json
{
  "customer_ref": "string",
  "from_utc": "2026-01-01T00:00:00Z",
  "to_utc": "2026-01-01T00:00:00Z"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "statement": {
      "customer_ref": "string",
      "from_utc": "2026-01-01T00:00:00Z",
      "to_utc": "2026-01-01T00:00:00Z"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /ar/statement",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /comment

Purpose: Add comment (draft)

Notes: Add comment (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Route class Tier A (p95 500ms).

Request schema: CommentAddRequest Response schema: CommentEnvelope

Sample request (schema-derived)

json
{
  "target_type": "string",
  "target_id": "string"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "comment": {
      "comment_id": "string",
      "target_type": "string",
      "target_id": "string",
      "status": "current",
      "current_revision": 0,
      "created_at": "2026-01-01T00:00:00Z"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /comment",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /comment/get

Purpose: Get comment (draft)

Notes: Get comment (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Org-scoped reads may return 404 for non-associated callers (anti-enumeration). Route class Tier B (p95 300ms).

Request schema: CommentGetRequest Response schema: CommentEnvelope

Sample request (schema-derived)

json
{
  "comment_id": "string",
  "target_type": "string",
  "target_id": "string"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "comment": {
      "comment_id": "string",
      "target_type": "string",
      "target_id": "string",
      "status": "current",
      "current_revision": 0,
      "created_at": "2026-01-01T00:00:00Z"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /comment/get",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /comment/list

Purpose: List comments (draft)

Notes: List comments (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Paginated with limit/next_token (default 8; clamp 1–256). Route class Tier B (p95 300ms).

Request schema: CommentListRequest Response schema: CommentListEnvelope

Sample request (schema-derived)

json
{
  "target_type": "string",
  "target_id": "string",
  "user_guid": "USER_GUID"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "items": [
      {
        "comment_id": "string",
        "target_type": "string",
        "target_id": "string",
        "status": "current",
        "current_revision": 0,
        "created_at": "2026-01-01T00:00:00Z"
      }
    ]
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /comment/list",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /comment/report

Purpose: Report top-N largest comments (draft)

Notes: Report top-N largest comments (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Route class Tier A (p95 500ms).

Request schema: CommentReportRequest Response schema: CommentReportEnvelope

Sample request (schema-derived)

json
{
  "limit": 8
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "items": [
      {
        "comment_id": "string",
        "target_type": "string",
        "target_id": "string"
      }
    ]
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /comment/report",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /comment/revise

Purpose: Revise comment (draft)

Notes: Revise comment (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Route class Tier A (p95 500ms).

Request schema: CommentReviseRequest Response schema: CommentEnvelope

Sample request (schema-derived)

json
{
  "comment_id": "string",
  "target_type": "string",
  "target_id": "string"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "comment": {
      "comment_id": "string",
      "target_type": "string",
      "target_id": "string",
      "status": "current",
      "current_revision": 0,
      "created_at": "2026-01-01T00:00:00Z"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /comment/revise",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /comment/status

Purpose: Update comment status (draft)

Notes: Update comment status (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. If this updates a revisioned record, expected_revision is required (428 if missing; 409 on mismatch). Route class Tier A (p95 500ms).

Request schema: CommentStatusRequest Response schema: CommentEnvelope

Sample request (schema-derived)

json
{
  "comment_id": "string",
  "target_type": "string",
  "target_id": "string",
  "status": "current"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "comment": {
      "comment_id": "string",
      "target_type": "string",
      "target_id": "string",
      "status": "current",
      "current_revision": 0,
      "created_at": "2026-01-01T00:00:00Z"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /comment/status",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /commission/adjust

Purpose: Record a manual commission adjustment (bonus, chargeback, correction)

Request schema: None Response schema: Envelope

Sample request (schema-derived)

json
{}

Sample response (shape-only)

json
{
  "success": true,
  "data": {},
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /commission/adjust",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /commission/get

Purpose: Get commission record by commission_id

Request schema: None Response schema: Envelope

Sample request (schema-derived)

json
{}

Sample response (shape-only)

json
{
  "success": true,
  "data": {},
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /commission/get",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /commission/list

Purpose: List commissions by org, associate, or order

Notes: Paginated; use limit and next_token.

Request schema: None Response schema: Envelope

Sample request (schema-derived)

json
{}

Sample response (shape-only)

json
{
  "success": true,
  "data": {},
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /commission/list",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /commission/payout/create

Purpose: Create a commission payout for an associate and period

Notes: If this updates a revisioned record, expected_revision is required.

Request schema: None Response schema: Envelope

Sample request (schema-derived)

json
{}

Sample response (shape-only)

json
{
  "success": true,
  "data": {},
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /commission/payout/create",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /commission/payout/get

Purpose: Get commission payout by payout_id

Request schema: None Response schema: Envelope

Sample request (schema-derived)

json
{}

Sample response (shape-only)

json
{
  "success": true,
  "data": {},
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /commission/payout/get",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /commission/payout/list

Purpose: List commission payouts by org or associate

Notes: Paginated; use limit and next_token.

Request schema: None Response schema: Envelope

Sample request (schema-derived)

json
{}

Sample response (shape-only)

json
{
  "success": true,
  "data": {},
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /commission/payout/list",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /commission/payout/status/set

Purpose: Advance commission payout lifecycle (pending → approved → paid)

Notes: If this updates a revisioned record, expected_revision is required.

Request schema: None Response schema: Envelope

Sample request (schema-derived)

json
{}

Sample response (shape-only)

json
{
  "success": true,
  "data": {},
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /commission/payout/status/set",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /commission/split/set

Purpose: Set multi-associate commission splits (must sum to 10000 bps)

Notes: If this updates a revisioned record, expected_revision is required.

Request schema: None Response schema: Envelope

Sample request (schema-derived)

json
{}

Sample response (shape-only)

json
{
  "success": true,
  "data": {},
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /commission/split/set",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /commission/statement

Purpose: Get commission statement for an associate in a given period

Request schema: None Response schema: Envelope

Sample request (schema-derived)

json
{}

Sample response (shape-only)

json
{
  "success": true,
  "data": {},
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /commission/statement",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /consignment/settlement/approve

Purpose: Approve a consignment settlement

Notes: If this updates a revisioned record, expected_revision is required.

Request schema: None Response schema: Envelope

Sample request (schema-derived)

json
{}

Sample response (shape-only)

json
{
  "success": true,
  "data": {},
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /consignment/settlement/approve",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /consignment/settlement/create

Purpose: Create a consignment settlement

Notes: If this updates a revisioned record, expected_revision is required.

Request schema: None Response schema: Envelope

Sample request (schema-derived)

json
{}

Sample response (shape-only)

json
{
  "success": true,
  "data": {},
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /consignment/settlement/create",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /consignment/settlement/get

Purpose: Get a consignment settlement by ID

Notes: If this updates a revisioned record, expected_revision is required.

Request schema: None Response schema: Envelope

Sample request (schema-derived)

json
{}

Sample response (shape-only)

json
{
  "success": true,
  "data": {},
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /consignment/settlement/get",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /consignment/settlement/list

Purpose: List consignment settlements

Notes: Paginated; use limit and next_token. If this updates a revisioned record, expected_revision is required.

Request schema: None Response schema: Envelope

Sample request (schema-derived)

json
{}

Sample response (shape-only)

json
{
  "success": true,
  "data": {},
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /consignment/settlement/list",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /consignment/settlement/status/set

Purpose: Set consignment settlement status

Notes: If this updates a revisioned record, expected_revision is required.

Request schema: None Response schema: Envelope

Sample request (schema-derived)

json
{}

Sample response (shape-only)

json
{
  "success": true,
  "data": {},
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /consignment/settlement/status/set",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /dunning/action/create

Purpose: Record a dunning action on an overdue invoice

Notes: If this updates a revisioned record, expected_revision is required.

Request schema: None Response schema: Envelope

Sample request (schema-derived)

json
{}

Sample response (shape-only)

json
{
  "success": true,
  "data": {},
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /dunning/action/create",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /dunning/action/list

Purpose: List dunning actions for an invoice or customer

Notes: Paginated; use limit and next_token.

Request schema: None Response schema: Envelope

Sample request (schema-derived)

json
{}

Sample response (shape-only)

json
{
  "success": true,
  "data": {},
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /dunning/action/list",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /dunning/evaluate

Purpose: Evaluate overdue invoices against dunning policy (read-only)

Request schema: None Response schema: Envelope

Sample request (schema-derived)

json
{}

Sample response (shape-only)

json
{
  "success": true,
  "data": {},
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /dunning/evaluate",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /dunning/policy/get

Purpose: Get dunning escalation policy for org

Request schema: None Response schema: Envelope

Sample request (schema-derived)

json
{}

Sample response (shape-only)

json
{
  "success": true,
  "data": {},
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /dunning/policy/get",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /dunning/policy/set

Purpose: Set dunning escalation policy for org

Notes: If this updates a revisioned record, expected_revision is required.

Request schema: None Response schema: Envelope

Sample request (schema-derived)

json
{}

Sample response (shape-only)

json
{
  "success": true,
  "data": {},
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /dunning/policy/set",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /event/get

Purpose: Get financial event (draft)

Notes: Get financial event (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Org-scoped reads may return 404 for non-associated callers (anti-enumeration). Route class Tier B (p95 300ms).

Request schema: EventGetRequest Response schema: EventEnvelope

Sample request (schema-derived)

json
{
  "event_id": "string"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "event": {
      "event_id": "string",
      "event_type": "string",
      "orgcode": "ORGCODE",
      "occurred_at": "2026-01-01T00:00:00Z",
      "request_context": {
        "orgcode": "ORGCODE",
        "actor": "string",
        "context_source": "session"
      },
      "reason": "example",
      "source_refs": [
        {
          "kind": null,
          "id": null
        }
      ]
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /event/get",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /event/list

Purpose: List financial events (draft)

Notes: List financial events (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Paginated with limit/next_token (default 8; clamp 1–256). Route class Tier B (p95 300ms).

Request schema: EventListRequest Response schema: EventListEnvelope

Sample request (schema-derived)

json
{
  "event_types": [
    "string"
  ],
  "logical_guid": "LOGICAL_GUID",
  "channel_code": "pos_generic"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "events": [
      {
        "event_id": "string",
        "event_type": "string",
        "orgcode": "ORGCODE",
        "occurred_at": "2026-01-01T00:00:00Z",
        "request_context": {
          "orgcode": null,
          "actor": null,
          "context_source": null
        },
        "reason": "example",
        "source_refs": [
          {}
        ]
      }
    ]
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /event/list",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /event/record

Purpose: Record financial event (draft)

Notes: Record financial event (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. If this updates a revisioned record, expected_revision is required (428 if missing; 409 on mismatch). Route class Tier A (p95 500ms).

Request schema: EventRecordRequest Response schema: EventEnvelope

Sample request (schema-derived)

json
{
  "event_type": "string",
  "occurred_at": "2026-01-01T00:00:00Z",
  "request_context": {
    "orgcode": "ORGCODE",
    "actor": "string",
    "context_source": "session"
  },
  "reason": "example",
  "source_refs": [
    {
      "kind": "string",
      "id": "string"
    }
  ]
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "event": {
      "event_id": "string",
      "event_type": "string",
      "orgcode": "ORGCODE",
      "occurred_at": "2026-01-01T00:00:00Z",
      "request_context": {
        "orgcode": "ORGCODE",
        "actor": "string",
        "context_source": "session"
      },
      "reason": "example",
      "source_refs": [
        {
          "kind": null,
          "id": null
        }
      ]
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /event/record",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /export/batch/create

Purpose: Create export batch (draft)

Notes: Create export batch (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. If this updates a revisioned record, expected_revision is required (428 if missing; 409 on mismatch). Route class Tier B (p95 400ms).

Request schema: ExportBatchCreateRequest Response schema: ExportBatchEnvelope

Sample request (schema-derived)

json
{
  "export_id": "string",
  "request_context": {
    "orgcode": "ORGCODE",
    "actor": "string",
    "context_source": "session"
  },
  "reason": "example",
  "source_refs": [
    {
      "kind": "string",
      "id": "string"
    }
  ]
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "batch": {
      "batch_id": "string",
      "export_id": "string",
      "schedule_id": "string"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /export/batch/create",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /export/batch/get

Purpose: Get export batch (draft)

Notes: Get export batch (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Org-scoped reads may return 404 for non-associated callers (anti-enumeration). Route class Tier B (p95 300ms).

Request schema: ExportBatchGetRequest Response schema: ExportBatchEnvelope

Sample request (schema-derived)

json
{
  "batch_id": "string"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "batch": {
      "batch_id": "string",
      "export_id": "string",
      "schedule_id": "string"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /export/batch/get",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /export/batch/list

Purpose: List export batches (draft)

Notes: List export batches (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Paginated with limit/next_token (default 8; clamp 1–256). Route class Tier B (p95 300ms).

Request schema: ExportBatchListRequest Response schema: ExportBatchListEnvelope

Sample request (schema-derived)

json
{
  "export_id": "string",
  "schedule_id": "string",
  "limit": 8
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "batches": [
      {
        "batch_id": "string",
        "export_id": "string",
        "schedule_id": "string"
      }
    ]
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /export/batch/list",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /export/batch/repair

Purpose: Create export repair batch (draft)

Notes: Create export repair batch (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Route class Tier B (p95 400ms).

Request schema: ExportBatchRepairRequest Response schema: ExportBatchEnvelope

Sample request (schema-derived)

json
{
  "export_id": "string",
  "repair_of_batch_id": "string",
  "request_context": {
    "orgcode": "ORGCODE",
    "actor": "string",
    "context_source": "session"
  },
  "reason": "example",
  "source_refs": [
    {
      "kind": "string",
      "id": "string"
    }
  ]
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "batch": {
      "batch_id": "string",
      "export_id": "string",
      "schedule_id": "string"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /export/batch/repair",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /export/batch/status/set

Purpose: Set export batch status (draft)

Notes: Set export batch status (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. If this updates a revisioned record, expected_revision is required (428 if missing; 409 on mismatch). Route class Tier B (p95 400ms).

Request schema: ExportBatchStatusSetRequest Response schema: ExportBatchEnvelope

Sample request (schema-derived)

json
{
  "batch_id": "string",
  "status": "ready",
  "expected_revision": 0,
  "request_context": {
    "orgcode": "ORGCODE",
    "actor": "string",
    "context_source": "session"
  },
  "reason": "example",
  "source_refs": [
    {
      "kind": "string",
      "id": "string"
    }
  ]
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "batch": {
      "batch_id": "string",
      "export_id": "string",
      "schedule_id": "string"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /export/batch/status/set",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /export/create

Purpose: Create export batch (draft)

Notes: Create export batch (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. If this updates a revisioned record, expected_revision is required (428 if missing; 409 on mismatch). Route class Tier A (p95 500ms).

Request schema: ExportCreateRequest Response schema: ExportEnvelope

Sample request (schema-derived)

json
{
  "from_utc": "2026-01-01T00:00:00Z",
  "to_utc": "2026-01-01T00:00:00Z",
  "request_context": {
    "orgcode": "ORGCODE",
    "actor": "string",
    "context_source": "session"
  },
  "reason": "example",
  "source_refs": [
    {
      "kind": "string",
      "id": "string"
    }
  ]
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "export": {
      "batch_id": "string",
      "export_id": "string",
      "schedule_id": "string"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /export/create",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /export/get

Purpose: Get export batch (draft)

Notes: Get export batch (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Org-scoped reads may return 404 for non-associated callers (anti-enumeration). Route class Tier B (p95 300ms).

Request schema: ExportGetRequest Response schema: ExportEnvelope

Sample request (schema-derived)

json
{
  "export_id": "string"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "export": {
      "batch_id": "string",
      "export_id": "string",
      "schedule_id": "string"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /export/get",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /export/list

Purpose: List export batches (draft)

Notes: List export batches (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Paginated with limit/next_token (default 8; clamp 1–256). Route class Tier B (p95 300ms).

Request schema: ExportListRequest Response schema: ExportListEnvelope

Sample request (schema-derived)

json
{
  "status": "active",
  "from_utc": "2026-01-01T00:00:00Z",
  "to_utc": "2026-01-01T00:00:00Z"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "exports": [
      {
        "batch_id": "string",
        "export_id": "string",
        "schedule_id": "string"
      }
    ]
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /export/list",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /export/schedule/create

Purpose: Create export schedule (draft)

Notes: Create export schedule (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. If this updates a revisioned record, expected_revision is required (428 if missing; 409 on mismatch). Route class Tier B (p95 400ms).

Request schema: ExportScheduleCreateRequest Response schema: ExportScheduleEnvelope

Sample request (schema-derived)

json
{
  "cadence": {
    "type": "interval",
    "timezone": "string"
  },
  "request_context": {
    "orgcode": "ORGCODE",
    "actor": "string",
    "context_source": "session"
  },
  "reason": "example",
  "source_refs": [
    {
      "kind": "string",
      "id": "string"
    }
  ]
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "schedule": {
      "schedule_id": "string",
      "status": "active",
      "cadence": {
        "type": "interval",
        "timezone": "string"
      }
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /export/schedule/create",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /export/schedule/get

Purpose: Get export schedule (draft)

Notes: Get export schedule (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Org-scoped reads may return 404 for non-associated callers (anti-enumeration). Route class Tier B (p95 300ms).

Request schema: ExportScheduleGetRequest Response schema: ExportScheduleEnvelope

Sample request (schema-derived)

json
{
  "schedule_id": "string"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "schedule": {
      "schedule_id": "string",
      "status": "active",
      "cadence": {
        "type": "interval",
        "timezone": "string"
      }
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /export/schedule/get",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /export/schedule/list

Purpose: List export schedules (draft)

Notes: List export schedules (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Paginated with limit/next_token (default 8; clamp 1–256). Route class Tier B (p95 300ms).

Request schema: ExportScheduleListRequest Response schema: ExportScheduleListEnvelope

Sample request (schema-derived)

json
{
  "status": "active",
  "limit": 8,
  "next_token": "string"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "schedules": [
      {
        "schedule_id": "string",
        "status": "active",
        "cadence": {
          "type": null,
          "timezone": null
        }
      }
    ]
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /export/schedule/list",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /export/schedule/status/set

Purpose: Set export schedule status (draft)

Notes: Set export schedule status (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. If this updates a revisioned record, expected_revision is required (428 if missing; 409 on mismatch). Route class Tier B (p95 400ms).

Request schema: ExportScheduleStatusSetRequest Response schema: ExportScheduleEnvelope

Sample request (schema-derived)

json
{
  "schedule_id": "string",
  "status": "active",
  "expected_revision": 0,
  "request_context": {
    "orgcode": "ORGCODE",
    "actor": "string",
    "context_source": "session"
  },
  "reason": "example",
  "source_refs": [
    {
      "kind": "string",
      "id": "string"
    }
  ]
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "schedule": {
      "schedule_id": "string",
      "status": "active",
      "cadence": {
        "type": "interval",
        "timezone": "string"
      }
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /export/schedule/status/set",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /franchise/royalty/calculate

Purpose: Calculate franchise royalty for facility and period

Request schema: None Response schema: Envelope

Sample request (schema-derived)

json
{}

Sample response (shape-only)

json
{
  "success": true,
  "data": {},
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /franchise/royalty/calculate",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /franchise/royalty/get

Purpose: Get a franchise royalty record

Request schema: None Response schema: Envelope

Sample request (schema-derived)

json
{}

Sample response (shape-only)

json
{
  "success": true,
  "data": {},
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /franchise/royalty/get",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /franchise/royalty/list

Purpose: List franchise royalty records

Notes: Paginated; use limit and next_token.

Request schema: None Response schema: Envelope

Sample request (schema-derived)

json
{}

Sample response (shape-only)

json
{
  "success": true,
  "data": {},
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /franchise/royalty/list",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /franchise/royalty/rule/get

Purpose: Get current franchise royalty rule

Request schema: None Response schema: Envelope

Sample request (schema-derived)

json
{}

Sample response (shape-only)

json
{
  "success": true,
  "data": {},
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /franchise/royalty/rule/get",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /franchise/royalty/rule/set

Purpose: Set franchise royalty rule (dual-record)

Notes: If this updates a revisioned record, expected_revision is required.

Request schema: None Response schema: Envelope

Sample request (schema-derived)

json
{}

Sample response (shape-only)

json
{
  "success": true,
  "data": {},
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /franchise/royalty/rule/set",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /franchise/royalty/status/set

Purpose: Set franchise royalty record status

Notes: If this updates a revisioned record, expected_revision is required.

Request schema: None Response schema: Envelope

Sample request (schema-derived)

json
{}

Sample response (shape-only)

json
{
  "success": true,
  "data": {},
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /franchise/royalty/status/set",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /inbox/create

Purpose: Create inbox notification (draft)

Notes: Create inbox notification (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. If this updates a revisioned record, expected_revision is required (428 if missing; 409 on mismatch). Route class Tier A (p95 500ms).

Request schema: InboxCreateRequest Response schema: InboxEnvelope

Sample request (schema-derived)

json
{
  "team_guid": "string",
  "title": "string"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "notification": {
      "notification_id": "string",
      "team_guid": "string",
      "status": "inbox",
      "state": "pending",
      "priority": "low",
      "title": "string"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /inbox/create",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /inbox/get

Purpose: Get inbox notification (draft)

Notes: Get inbox notification (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Org-scoped reads may return 404 for non-associated callers (anti-enumeration). Route class Tier B (p95 300ms).

Request schema: InboxGetRequest Response schema: InboxEnvelope

Sample request (schema-derived)

json
{
  "notification_id": "string"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "notification": {
      "notification_id": "string",
      "team_guid": "string",
      "status": "inbox",
      "state": "pending",
      "priority": "low",
      "title": "string"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /inbox/get",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /inbox/list

Purpose: List inbox notifications (draft)

Notes: List inbox notifications (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Paginated with limit/next_token (default 8; clamp 1–256). Route class Tier B (p95 300ms).

Request schema: InboxListRequest Response schema: InboxListEnvelope

Sample request (schema-derived)

json
{
  "team_guid": "string",
  "org_wide": false,
  "status": "inbox"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "items": [
      {
        "notification_id": "string",
        "team_guid": "string",
        "status": "inbox",
        "state": "pending",
        "priority": "low",
        "title": "string"
      }
    ]
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /inbox/list",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /inbox/state

Purpose: Update inbox state (draft)

Notes: Update inbox state (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Route class Tier A (p95 500ms).

Request schema: InboxStateRequest Response schema: InboxEnvelope

Sample request (schema-derived)

json
{
  "notification_id": "string",
  "state": "pending"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "notification": {
      "notification_id": "string",
      "team_guid": "string",
      "status": "inbox",
      "state": "pending",
      "priority": "low",
      "title": "string"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /inbox/state",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /inbox/status

Purpose: Update inbox status (draft)

Notes: Update inbox status (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. If this updates a revisioned record, expected_revision is required (428 if missing; 409 on mismatch). Route class Tier A (p95 500ms).

Request schema: InboxStatusRequest Response schema: InboxEnvelope

Sample request (schema-derived)

json
{
  "notification_id": "string",
  "status": "inbox"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "notification": {
      "notification_id": "string",
      "team_guid": "string",
      "status": "inbox",
      "state": "pending",
      "priority": "low",
      "title": "string"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /inbox/status",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /inference/config/get

Purpose: Get LLM inference configuration

Request schema: None Response schema: Envelope

Sample request (schema-derived)

json
{}

Sample response (shape-only)

json
{
  "success": true,
  "data": {},
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /inference/config/get",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /inference/config/set

Purpose: Set LLM inference configuration

Notes: If this updates a revisioned record, expected_revision is required.

Request schema: None Response schema: Envelope

Sample request (schema-derived)

json
{}

Sample response (shape-only)

json
{
  "success": true,
  "data": {},
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /inference/config/set",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /inference/snapshot/create

Purpose: Create LLM inference snapshot (export to S3)

Notes: If this updates a revisioned record, expected_revision is required.

Request schema: None Response schema: Envelope

Sample request (schema-derived)

json
{}

Sample response (shape-only)

json
{
  "success": true,
  "data": {},
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /inference/snapshot/create",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /invoice/get

Purpose: Get invoice by ID (draft)

Notes: Get invoice by ID (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Org-scoped reads may return 404 for non-associated callers (anti-enumeration). Route class Tier B (p95 300ms).

Request schema: InvoiceGetRequest Response schema: InvoiceEnvelope

Sample request (schema-derived)

json
{
  "invoice_id": "string"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "invoice": {
      "invoice_id": "string",
      "orgcode": "ORGCODE",
      "customer_ref": "string",
      "currency": "string",
      "amount_minor": 0,
      "due_date": "2026-01-01",
      "status": "open"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /invoice/get",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /invoice/list

Purpose: List invoices (draft)

Notes: List invoices (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Supports filtering by customer_ref, status, and due date range. Paginated with limit/next_token (default 8; clamp 1–256). Route class Tier B (p95 300ms).

Request schema: InvoiceListRequest Response schema: InvoiceListEnvelope

Sample request (schema-derived)

json
{
  "customer_ref": "string",
  "status": "open",
  "from_due_date": "2026-01-01"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "invoices": [
      {
        "invoice_id": "string",
        "orgcode": "ORGCODE",
        "customer_ref": "string",
        "currency": "string",
        "amount_minor": 0,
        "due_date": "2026-01-01",
        "status": "open"
      }
    ]
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /invoice/list",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /invoice/payment/apply

Purpose: Apply payment to invoice (draft)

Notes: Apply payment to invoice (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Atomically creates payment record and updates invoice balance. Route class Tier A (p95 500ms).

Request schema: InvoicePaymentApplyRequest Response schema: ArPaymentEnvelope

Sample request (schema-derived)

json
{
  "payment": {
    "invoice_id": "string",
    "amount_minor": 0,
    "currency": "string"
  },
  "reason": "example",
  "source_refs": [
    {
      "kind": "string",
      "id": "string"
    }
  ]
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "payment": {
      "payment_id": "string",
      "orgcode": "ORGCODE",
      "invoice_id": "string",
      "amount_minor": 0,
      "currency": "string"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /invoice/payment/apply",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /invoice/payment/list

Purpose: List payments for invoice (draft)

Notes: List payments for invoice (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Paginated with limit/next_token (default 8; clamp 1–256). Route class Tier B (p95 300ms).

Request schema: InvoicePaymentListRequest Response schema: ArPaymentListEnvelope

Sample request (schema-derived)

json
{
  "invoice_id": "string"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "payments": [
      {
        "payment_id": "string",
        "orgcode": "ORGCODE",
        "invoice_id": "string",
        "amount_minor": 0,
        "currency": "string"
      }
    ]
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /invoice/payment/list",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /invoice/set

Purpose: Create or update invoice (draft)

Notes: Create or update invoice (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Supports AR tracking for ERP readiness. Route class Tier A (p95 500ms).

Request schema: InvoiceSetRequest Response schema: InvoiceEnvelope

Sample request (schema-derived)

json
{
  "invoice": {
    "customer_ref": "string",
    "currency": "string",
    "amount_minor": 0,
    "due_date": "2026-01-01"
  },
  "reason": "example",
  "source_refs": [
    {
      "kind": "string",
      "id": "string"
    }
  ]
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "invoice": {
      "invoice_id": "string",
      "orgcode": "ORGCODE",
      "customer_ref": "string",
      "currency": "string",
      "amount_minor": 0,
      "due_date": "2026-01-01",
      "status": "open"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /invoice/set",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /invoice/status/set

Purpose: Set invoice status (draft)

Notes: Set invoice status (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Status lifecycle: open → partial → paid | overdue | written_off | cancelled. Route class Tier A (p95 500ms).

Request schema: InvoiceStatusSetRequest Response schema: InvoiceEnvelope

Sample request (schema-derived)

json
{
  "invoice_id": "string",
  "status": "open",
  "reason": "example",
  "source_refs": [
    {
      "kind": "string",
      "id": "string"
    }
  ]
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "invoice": {
      "invoice_id": "string",
      "orgcode": "ORGCODE",
      "customer_ref": "string",
      "currency": "string",
      "amount_minor": 0,
      "due_date": "2026-01-01",
      "status": "open"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /invoice/status/set",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /lineage/list

Purpose: List lineage by source reference (draft)

Notes: List lineage by source reference (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Paginated with limit/next_token (default 8; clamp 1–256). Route class Tier B (p95 300ms).

Request schema: LineageListRequest Response schema: LineageListEnvelope

Sample request (schema-derived)

json
{
  "source_ref": {
    "kind": "string",
    "id": "string"
  }
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "lineage": [
      {
        "event_id": "string",
        "event_type": "string",
        "occurred_at": "2026-01-01T00:00:00Z"
      }
    ]
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /lineage/list",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /reconcile/report

Purpose: Reconciliation report (draft)

Notes: Reconciliation report (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Route class Tier B (p95 400ms).

Request schema: ReconcileReportRequest Response schema: ReconcileReportEnvelope

Sample request (schema-derived)

json
{
  "from_utc": "2026-01-01T00:00:00Z",
  "to_utc": "2026-01-01T00:00:00Z"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "report": {
      "from_utc": "2026-01-01T00:00:00Z",
      "to_utc": "2026-01-01T00:00:00Z",
      "event_count": 0
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /reconcile/report",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /rollup/financial/export

Purpose: Export financial rollups to S3 for date range

Request schema: None Response schema: Envelope

Sample request (schema-derived)

json
{}

Sample response (shape-only)

json
{
  "success": true,
  "data": {},
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /rollup/financial/export",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /rollup/financial/get

Purpose: Get financial rollup (draft)

Notes: Get financial rollup (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Returns a single daily aggregated financial summary by dimension. Org-scoped reads may return 404 for non-associated callers (anti-enumeration). Route class Tier B (p95 300ms).

Request schema: FinancialRollupGetRequest Response schema: FinancialRollupEnvelope

Sample request (schema-derived)

json
{
  "dt": "2026-01-01",
  "dimension": "string"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "rollup": {
      "rollup_id": "string",
      "orgcode": "ORGCODE",
      "dt": "2026-01-01"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /rollup/financial/get",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /rollup/financial/list

Purpose: List financial rollups (draft)

Notes: List financial rollups (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Supports date range and dimension filtering. Paginated with limit/next_token (default 8; clamp 1–256). Route class Tier B (p95 300ms).

Request schema: FinancialRollupListRequest Response schema: FinancialRollupListEnvelope

Sample request (schema-derived)

json
{
  "from_dt": "2026-01-01",
  "to_dt": "2026-01-01",
  "dimension": "string"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "rollups": [
      {
        "rollup_id": "string",
        "orgcode": "ORGCODE",
        "dt": "2026-01-01"
      }
    ],
    "next_token": {}
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /rollup/financial/list",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

GET /stat

Purpose: Health check

Notes: Health check. Tenant routes require x-orgcode; /stat health checks do not. Org-scoped reads may return 404 for non-associated callers (anti-enumeration). Route class Tier A (p95 500ms).

Request schema: None Response schema: Envelope

Sample request (schema-derived)

json
{}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "service": "string",
    "status": "active"
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "GET /stat",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /storage/usage/get

Purpose: Get storage usage record (draft)

Notes: Get storage usage record (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Org-scoped reads may return 404 for non-associated callers (anti-enumeration). Route class Tier B (p95 300ms).

Request schema: StorageUsageGetRequest Response schema: StorageUsageEnvelope

Sample request (schema-derived)

json
{
  "usage_id": "string"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "usage": {
      "usage_id": "string",
      "resource_type": "s3",
      "resource_ref": "string"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /storage/usage/get",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /storage/usage/list

Purpose: List storage usage records (draft)

Notes: List storage usage records (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Paginated with limit/next_token (default 8; clamp 1–256). Route class Tier B (p95 300ms).

Request schema: StorageUsageListRequest Response schema: StorageUsageListEnvelope

Sample request (schema-derived)

json
{
  "resource_type": "s3",
  "service": "string",
  "cccode": "ABCD-1234-EFGH"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "usages": [
      {
        "usage_id": "string",
        "resource_type": "s3",
        "resource_ref": "string"
      }
    ]
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /storage/usage/list",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /storage/usage/reconcile

Purpose: Reconcile storage usage window (draft)

Notes: Reconcile storage usage window (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Route class Tier B (p95 900ms).

Request schema: StorageUsageReconcileRequest Response schema: StorageUsageReconcileEnvelope

Sample request (schema-derived)

json
{
  "from_utc": "2026-01-01T00:00:00Z",
  "to_utc": "2026-01-01T00:00:00Z"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "reconcile": {
      "orgcode": "ORGCODE",
      "window": {
        "from_utc": "2026-01-01T00:00:00Z",
        "to_utc": "2026-01-01T00:00:00Z"
      },
      "scanned_prefixes": 0
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /storage/usage/reconcile",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /storage/usage/record

Purpose: Record storage usage (draft)

Notes: Record storage usage (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. If this updates a revisioned record, expected_revision is required (428 if missing; 409 on mismatch). Route class Tier B (p95 400ms).

Request schema: StorageUsageRecordRequest Response schema: StorageUsageEnvelope

Sample request (schema-derived)

json
{
  "usage": {
    "resource_type": "s3",
    "resource_ref": "string",
    "service": "string",
    "bytes": 0
  },
  "request_context": {
    "orgcode": "ORGCODE",
    "actor": "string",
    "context_source": "session"
  },
  "reason": "example",
  "source_refs": [
    {
      "kind": "string",
      "id": "string"
    }
  ]
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "usage": {
      "usage_id": "string",
      "resource_type": "s3",
      "resource_ref": "string"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /storage/usage/record",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /usage/rollup/get

Purpose: Get daily usage rollup (draft)

Notes: Get daily usage rollup (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Org-scoped reads may return 404 for non-associated callers (anti-enumeration). Route class Tier B (p95 300ms).

Request schema: UsageRollupGetRequest Response schema: UsageRollupEnvelope

Sample request (schema-derived)

json
{
  "dt": "2026-01-01",
  "service": "string"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "rollup": {
      "rollup_id": "string",
      "dt": "2026-01-01",
      "service": "string"
    }
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /usage/rollup/get",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}

POST /usage/rollup/list

Purpose: List daily usage rollups (draft)

Notes: List daily usage rollups (draft). Auth is via headers; org identity uses x-orgcode or body placement as documented. Paginated with limit/next_token (default 8; clamp 1–256). Route class Tier B (p95 300ms).

Request schema: UsageRollupListRequest Response schema: UsageRollupListEnvelope

Sample request (schema-derived)

json
{
  "from_dt": "2026-01-01",
  "to_dt": "2026-01-01",
  "service": "string"
}

Sample response (shape-only)

json
{
  "success": true,
  "data": {
    "rollups": [
      {
        "rollup_id": "string",
        "dt": "2026-01-01",
        "service": "string"
      }
    ],
    "next_token": {}
  },
  "build": {
    "build_id": "MONDAY-0000000000"
  },
  "stats": {
    "call": "POST /usage/rollup/list",
    "service": "accounting",
    "timestamp_utc": "2026-01-01T00:00:00Z"
  }
}