Batch Create
POST
https://api.mpay.com.au/receivables/v1/batchCreate
Form Parameters
- filestring<binary>requiredExampleDescriptionDefaultaccounts_batch_20260921.csvFormatbinaryPattern^.+\.(csv|txt)$
Responses
200
- cuscalBatchResponse_V1Example
{ "numberOfRecords": 250, "batchUrl": "https://api.mpay.com.au/receivables/v1/batchReport/9f2c1a8e-5f1a-4d6e-b7c2-3a9d5e8b1c40", "durationMs": 42, "status": "Ok", "statusDescription": "Operation completed successfully" }Description- numberOfRecordsinteger<int32>ExampleDescriptionDefault250Formatint32Minimum0Maximum50000Pattern^[0-9]{1,5}$
- batchUrlstring<uri>ExampleDescriptionDefaulthttps://api.mpay.com.au/receivables/v1/batchReport/9f2c1a8e-5f1a-4d6e-b7c2-3a9d5e8b1c40FormaturiPattern^https://.+$
- durationMsinteger<int64>ExampleDescriptionDefault42Formatint64Minimum0Pattern^[0-9]+$
- statusstringExampleDescriptionDefaultOkPattern^(Ok|Error)$
- statusDescriptionstringExampleDescriptionDefaultOperation completed successfullyMin Length1Max Length255Pattern^.{1,255}$
400
- errorResponse_V1Example
{ "status": "Error", "statusDescription": "One or more validation errors occurred", "errorCode": "InvalidBankAccountNumber", "errorMessage": "The supplied bankAccountNumber is not a valid Automatcher account number for this mAccount.", "durationMs": 12 }Description- statusstringExampleDescriptionDefaultErrorPattern^(Ok|Error)$
- statusDescriptionstringExampleDescriptionDefaultOne or more validation errors occurredMin Length1Max Length255Pattern^.{1,255}$
- errorCodestringExampleDescriptionDefaultInvalidBankAccountNumberMin Length1Max Length50Pattern^[A-Za-z0-9_.-]{1,50}$
- errorMessagestringExampleDescriptionDefaultThe supplied bankAccountNumber is not a valid Automatcher account number for this mAccount.Min Length1Max Length500Pattern^.{1,500}$
- durationMsinteger<int64>ExampleDescriptionDefault12Formatint64Minimum0Pattern^[0-9]+$
401
- errorResponse_V1Example
{ "status": "Error", "statusDescription": "Authentication failed", "errorCode": "Unauthorized", "errorMessage": "The API key is missing or invalid. Pass your API key as the basic authentication username.", "durationMs": 8 }Description- statusstringExampleDescriptionDefaultErrorPattern^(Ok|Error)$
- statusDescriptionstringExampleDescriptionDefaultOne or more validation errors occurredMin Length1Max Length255Pattern^.{1,255}$
- errorCodestringExampleDescriptionDefaultInvalidBankAccountNumberMin Length1Max Length50Pattern^[A-Za-z0-9_.-]{1,50}$
- errorMessagestringExampleDescriptionDefaultThe supplied bankAccountNumber is not a valid Automatcher account number for this mAccount.Min Length1Max Length500Pattern^.{1,500}$
- durationMsinteger<int64>ExampleDescriptionDefault12Formatint64Minimum0Pattern^[0-9]+$
500
- errorResponse_V1Example
{ "status": "Error", "statusDescription": "An unexpected error occurred", "errorCode": "InternalServerError", "errorMessage": "An unexpected error occurred while processing the request. Please retry, and contact [email protected] if the problem persists.", "durationMs": 30 }Description- statusstringExampleDescriptionDefaultErrorPattern^(Ok|Error)$
- statusDescriptionstringExampleDescriptionDefaultOne or more validation errors occurredMin Length1Max Length255Pattern^.{1,255}$
- errorCodestringExampleDescriptionDefaultInvalidBankAccountNumberMin Length1Max Length50Pattern^[A-Za-z0-9_.-]{1,50}$
- errorMessagestringExampleDescriptionDefaultThe supplied bankAccountNumber is not a valid Automatcher account number for this mAccount.Min Length1Max Length500Pattern^.{1,500}$
- durationMsinteger<int64>ExampleDescriptionDefault12Formatint64Minimum0Pattern^[0-9]+$
curl
curl --request POST \
--url https://api.mpay.com.au/receivables/v1/batchCreate \
--header 'accept: application/json' \
--header 'content-type: multipart/form-data' \
--form 'file=@"/path/to/file"'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "multipart/form-data");
var formdata = new FormData();
formdata.append("file", fileInput.files[0], "file");
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: formdata,
redirect: 'follow'
};
fetch("https://api.mpay.com.au/receivables/v1/batchCreate", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "net/http"
url = URI("https://api.mpay.com.au/receivables/v1/batchCreate")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "multipart/form-data"
form_data = [['file', File.open('/path/to/file')]]
request.set_form form_data, 'multipart/form-data'
response = https.request(request)
puts response.read_body
python
import requests
url = "https://api.mpay.com.au/receivables/v1/batchCreate"
payload = {}
files=[
('file',('file',open('/path/to/file','rb'),'application/octet-stream'))
]
headers = {
'accept': 'application/json',
'content-type': 'multipart/form-data'
}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
200
// successful validation
{
"numberOfRecords": 250,
"batchUrl": "https://api.mpay.com.au/receivables/v1/batchReport/9f2c1a8e-5f1a-4d6e-b7c2-3a9d5e8b1c40",
"durationMs": 42,
"status": "Ok",
"statusDescription": "Operation completed successfully"
}400
// Bad Request — the request was malformed or contained invalid parameters.
{
"status": "Error",
"statusDescription": "One or more validation errors occurred",
"errorCode": "InvalidBankAccountNumber",
"errorMessage": "The supplied bankAccountNumber is not a valid Automatcher account number for this mAccount.",
"durationMs": 12
}401
// Unauthorized — authentication failed, or the API key was missing or invalid.
{
"status": "Error",
"statusDescription": "One or more validation errors occurred",
"errorCode": "InvalidBankAccountNumber",
"errorMessage": "The supplied bankAccountNumber is not a valid Automatcher account number for this mAccount.",
"durationMs": 12
}500
// Internal Server Error — an unexpected error occurred while processing the request.
{
"status": "Error",
"statusDescription": "One or more validation errors occurred",
"errorCode": "InvalidBankAccountNumber",
"errorMessage": "The supplied bankAccountNumber is not a valid Automatcher account number for this mAccount.",
"durationMs": 12
}