REST /api/v1/approval-batches 5 endpoints
GET /api/v1/approval-batches/api/v1/approval-batches

List approval batches

Public

Response Example

{
  "data": [
    {
      "batch_id": "bat_3d4e5f6g",
      "coordinator_id": "usr_coord99",
      "status": "completed",
      "total_claims": 12,
      "approved_count": 10,
      "rejected_count": 2,
      "created_at": "2026-03-25T14:00:00Z",
      "completed_at": "2026-03-25T14:02:30Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 5
  }
}
GET /api/v1/approval-batches/api/v1/approval-batches/:batch_id

Get batch result with per-claim outcomes (getBatchResult)

Public

Response Example

{
  "batch_id": "bat_3d4e5f6g",
  "coordinator_id": "usr_coord99",
  "status": "completed",
  "total_claims": 12,
  "approved_count": 10,
  "rejected_count": 2,
  "results": [
    {
      "claim_id": "clm_9f2a3b4c",
      "decision": "approved",
      "processed_at": "2026-03-25T14:00:35Z"
    },
    {
      "claim_id": "clm_ab5c6d7e",
      "decision": "rejected",
      "error": "Claim already processed",
      "processed_at": "2026-03-25T14:00:38Z"
    }
  ],
  "created_at": "2026-03-25T14:00:00Z",
  "completed_at": "2026-03-25T14:02:30Z"
}
POST /api/v1/approval-batches/api/v1/approval-batches

Start a new bulk approval batch (processBatch)

Public

Request Example

{
  "claim_ids": [
    "clm_9f2a3b4c",
    "clm_ab5c6d7e",
    "clm_cd7e8f9a",
    "clm_ef1a2b3c"
  ],
  "coordinator_id": "usr_coord99",
  "comment": "End-of-month batch approval March 2026"
}

Response Example

{
  "batch_id": "bat_3d4e5f6g",
  "coordinator_id": "usr_coord99",
  "status": "processing",
  "total_claims": 4,
  "created_at": "2026-03-26T08:00:00Z"
}
PUT /api/v1/approval-batches/api/v1/approval-batches/:batch_id

Update batch metadata or add claims before processing

Public

Request Example

{
  "comment": "End-of-month batch — amended to include late submissions",
  "claim_ids": [
    "clm_9f2a3b4c",
    "clm_ab5c6d7e",
    "clm_cd7e8f9a",
    "clm_ef1a2b3c",
    "clm_gh2i3j4k"
  ]
}

Response Example

{
  "batch_id": "bat_3d4e5f6g",
  "status": "pending",
  "total_claims": 5,
  "updated_at": "2026-03-26T08:01:00Z"
}
DELETE /api/v1/approval-batches/api/v1/approval-batches/:batch_id

Cancel a pending or in-progress batch (cancelBatch)

Public

Response Example

{
  "batch_id": "bat_3d4e5f6g",
  "cancelled": true,
  "cancelled_at": "2026-03-26T08:03:00Z",
  "claims_reverted": 3
}

Additional Metadata

{
  "contract_summary": {
    "total_contracts": 410,
    "total_endpoints": 2416,
    "api_styles_used": [
      "rest"
    ]
  },
  "generated_at": "2026-03-26T06:55:53.316Z"
}