POST
/
disbursements
/
batch
/
addFile
cURL
curl -X POST "https://api.onekhusa.com/sandbox/v1/disbursements/batch/addFile" \
      --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 '{
        "merchantAccountNumber": 35253486,
        "isBatchScheduled": true,
        "scheduledDate": "2024-01-15T14:00:00Z",
        "contentType": "XLSX",
        "capturedBy": "johndoe@example.com",
        "fileContent": "UEsDBBQAAAAIAA..."
      }'
"Batch has been queued for processing"

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

Request payload for uploading batch disbursement files

merchantAccountNumber
integer
required

Required string length: 8

Required range: 10000000 <= x <= 99999999
isBatchScheduled
boolean
required

Whether the batch should be scheduled for later processing

contentType
string
required

The content type of the file (e.g., "XLSX", "CSV")

Maximum length: 4
capturedBy
string<email>
required

Email address of the user uploading the batch file

Maximum length: 60
Example:

"johndoe@example.com"

fileContent
string
required

Base64-encoded content of the Excel or CSV file

Minimum length: 1
scheduledDate
string<date> | null

Scheduled date for processing (required if isBatchScheduled is true)

Response

200 - application/json

Success Response (200 OK)

The response is of type string.

Example:

"Batch has been queued for processing"