POST
/
disbursements
/
batch
/
getBatch
cURL
curl -X POST "https://api.onekhusa.com/sandbox/v1/disbursements/batch/getBatch" \
      --header "Authorization: Bearer your-jwt-token" \
      --header "Content-Type: application/json" \
      --header "X-Organisation-Id: FYH0NTVW0DXK" \
      --header "X-Merchant-Account-Number: 35253486" \
      --header "Accept-Language: en" \
      -d '{
        "batchNumber": 2024001,
        "merchantAccountNumber": 35253486
      }'
{
  "merchantAccountNumber": 35253486,
  "batchNumber": 2024001,
  "contentType": "Microsoft Excel File",
  "dataSource": "File",
  "capturedBy": "johndoe@example.com",
  "dateCaptured": "2024-01-15",
  "reviewedBy": "johndoe@example.com",
  "dateReviewed": "2024-01-15",
  "approvedBy": "johndoe@example.com",
  "dateApproved": "2024-01-15",
  "batchStatusCode": "A",
  "batchStatusDescription": "Approved",
  "processDate": "2024-01-15",
  "isBatchScheduled": false,
  "scheduledDate": null,
  "authorisationLevel": "Initiator -> Reviewer -> Approver",
  "rejectionReason": null,
  "errorFileName": null,
  "errorMessage": null,
  "actionedBy": "johndoe@example.com",
  "dateActioned": "2024-01-15",
  "numberOfEntries": 100,
  "numberOfFailedEntries": 5,
  "numberOfSuccessfulEntries": 95,
  "totalAmountOfSuccessfulEntries": 450000,
  "currencyCode": "MWK"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <Token>, where <Token> is your access token.

Headers

X-Organisation-Id
string
required

The organization identifier

X-Merchant-Account-Number
string
required

The merchant account number

Accept-Language
string
default:en

Preferred language for the response

Body

application/json
batchNumber
integer
required

A unique integer identifier that represents a batch of disbursement transactions in the system.

Required range: x > 0

merchantAccountNumber
integer
required

Required string length: 8

Required range: 10000000 <= x <= 99999999

Response

Success Response (200)

merchantAccountNumber
integer

Required string length: 8

Required range: 10000000 <= x <= 99999999
batchNumber
integer

A unique integer identifier for the disbursement batch. 8-digit numbers (10,000,000 to 99,999,999).

contentType
string

The format/type of the file or data source used to create the batch. Common values: "XLSX" - Excel file format, "CSV" - Comma-separated values, "JSON" - JSON data format.

dataSource
string

The method or system from which the batch data originated. Common values: "File Upload" - Uploaded via file, "JSON Integration" - Created via JSON API.

capturedBy
string<email>

Email address of the user who created the batch.

Example:

"johndoe@example.com"

dateCaptured
string<date>

Date when the batch was created and submitted.

reviewedBy
string

The email address of the user who reviewed the batch for approval. Examples: "admin@example.com", "reviewer_user".

dateReviewed
string<date>

Date when the batch was reviewed by an authorized user.

approvedBy
string

The email address of the user who gave final approval for the batch. Examples: "admin@example.com", "approver_user". Used for final approval tracking.

dateApproved
string<date>

Date when the batch received final approval.

batchStatusCode
string

Single-character code for batch status. Values: "A" - Approved, "P" - Pending, "E" - Error, "F" - Failed, "N" - Cancelled, "X" - Rejected, "C" - Completed.

batchStatusDescription
string

Human-readable description of the batch status. Examples: "Approved", "Processed", "Pending Review".

processDate
string<date>

Date when the batch was processed for disbursement.

isBatchScheduled
boolean

Boolean flag indicating if the batch is scheduled for future processing. Values: true (scheduled) or false (immediate).

scheduledDate
string<date>

Scheduled date for processing

authorisationLevel
string

Authorization level required

rejectionReason
string

Reason for rejection if applicable

errorFileName
string

Error file name if applicable

errorMessage
string

Error message if applicable

actionedBy
string

The email address of the user who actioned the batch

dateActioned
string<date>

Date when the batch was actioned

numberOfEntries
integer

Total number of entries in the batch

numberOfFailedEntries
integer

Number of failed entries

numberOfSuccessfulEntries
integer

Number of successful entries

totalAmountOfSuccessfulEntries
number

Total amount of successful entries

currencyCode
string

A three-letter ISO 4217 code that identifies the currency used in the transaction

Example:

"MWK"