Skip to main content

Endpoint

GET /reconciliation/:id
Retrieves the status and results of a reconciliation process by its ID.

Path Parameters

id
string
required
The unique identifier of the reconciliation process

Response

reconciliation_id
string
The unique identifier for the reconciliation process
upload_id
string
The ID of the uploaded external data (not present for instant reconciliation)
status
string
Current status of the reconciliation. Possible values:
  • pending: Reconciliation is queued but not started
  • in_progress: Reconciliation is currently running
  • completed: Reconciliation finished successfully
  • failed: Reconciliation encountered an error
matched_transactions
integer
Number of successfully matched transactions
unmatched_transactions
integer
Number of transactions that could not be matched
is_dry_run
boolean
Whether this was a dry run reconciliation
started_at
string
Timestamp when the reconciliation started (ISO 8601 format)
completed_at
string
Timestamp when the reconciliation completed (ISO 8601 format). Null if still in progress

Example Request

curl -X GET "https://api.blnk.io/reconciliation/rec_123abc456def" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example Response (In Progress)

{
  "reconciliation_id": "rec_123abc456def",
  "upload_id": "upl_abc123def456",
  "status": "in_progress",
  "matched_transactions": 45,
  "unmatched_transactions": 5,
  "is_dry_run": false,
  "started_at": "2024-03-04T12:00:00Z",
  "completed_at": null
}

Example Response (Completed)

{
  "reconciliation_id": "rec_123abc456def",
  "upload_id": "upl_abc123def456",
  "status": "completed",
  "matched_transactions": 142,
  "unmatched_transactions": 8,
  "is_dry_run": false,
  "started_at": "2024-03-04T12:00:00Z",
  "completed_at": "2024-03-04T12:15:30Z"
}

Example Response (Failed)

{
  "reconciliation_id": "rec_123abc456def",
  "upload_id": "upl_abc123def456",
  "status": "failed",
  "matched_transactions": 0,
  "unmatched_transactions": 0,
  "is_dry_run": false,
  "started_at": "2024-03-04T12:00:00Z",
  "completed_at": "2024-03-04T12:01:15Z"
}

Polling for Completion

For long-running reconciliation processes, poll this endpoint to check the status:
const checkReconciliationStatus = async (reconciliationId) => {
  const maxAttempts = 60; // 5 minutes with 5-second intervals
  const interval = 5000; // 5 seconds
  
  for (let i = 0; i < maxAttempts; i++) {
    const response = await fetch(
      `https://api.blnk.io/reconciliation/${reconciliationId}`,
      {
        headers: {
          'Authorization': 'Bearer YOUR_API_KEY'
        }
      }
    );
    
    const data = await response.json();
    
    if (data.status === 'completed' || data.status === 'failed') {
      return data;
    }
    
    await new Promise(resolve => setTimeout(resolve, interval));
  }
  
  throw new Error('Reconciliation timeout');
};

Error Responses

error
string
Error message describing what went wrong

Common Errors

  • 400 Bad Request: Reconciliation ID is missing or invalid
  • 404 Not Found: Reconciliation not found
  • 500 Internal Server Error: Failed to retrieve reconciliation

Understanding Results

Matched Transactions

Transactions that were successfully matched according to your matching rules. These represent reconciled items where external and internal records align.

Unmatched Transactions

Transactions that could not be matched. Reasons may include:
  • No internal transaction with matching criteria
  • Timing differences (transaction not yet recorded in Blnk)
  • Data discrepancies (amount differences, reference mismatches)
  • Missing or incomplete transaction data

Dry Run Results

When is_dry_run is true, the results show what would happen without making permanent changes. Use this to:
  • Test matching rules
  • Validate data quality
  • Estimate reconciliation accuracy
  • Identify potential issues before committing

Next Steps

After reviewing reconciliation results:
  1. For successful matches: Review matched transactions in your transaction history
  2. For unmatched transactions: Investigate discrepancies and adjust matching rules if needed
  3. For failed reconciliations: Check error logs and verify input data
  4. For dry runs: If results look good, run again with dry_run: false

Build docs developers (and LLMs) love