Upload a Batch Payment File
post
/bcws/webresources/v1.0/batchpayments/upload
Imports a payment batch file, validates its content, and then uploads it to a directory.
Request
Query Parameters
-
override(required): boolean
Whether to override an older version of the batch payment file (true) or not (false).
Supported Media Types
- multipart/form-data
Response
Supported Media Types
- application/xml
- application/json
200 Response
The batch payment file was uploaded successfully.
Root Schema : paymentBatchFileHeader
Type:
Show Source
object
-
currency(required): string
The currency of all payments in the batch payment file.
-
extension: object
extension
The extended attributes.
-
fileCreationDate(required): string
(date-time)
The date and time the batch payment file was created.
-
fileName(required): string
The file name for the batch payment file.
-
fileSize: number
(double)
The size of the batch payment file.
-
institutionName(required): string
The name of the institution that created the batch payment file.
-
lockBoxId(required): string
The lockbox's ID.
-
lockBoxName: string
The lockbox's name.
-
noOfPayments: integer
(int64)
The number of payments in the batch payment file.
-
status: integer
(int32)
The status of the batch payment file. Can be one of the following:
- 1: New
- 2: Format error
- 3: Unknown template
- 4: Processing error
- 5: Threshold exceeded
- 6: Processing
-
templateName(required): string
The template name.
Nested Schema : extension
Type:
object
The extended attributes.
201 Response
The batch payment file was uploaded successfully. The batch payment file header details such as the file name, file creation date, number of payments, and institution name are returned.
500 Response
An internal server error occurred.
Examples
This example shows how to upload a batch payment file by submitting a POST request on the REST resource using cURL. For more information about cURL, see "Use cURL".
cURL Command
curl -X POST 'http://hostname:port/bcws/webresources/v1.0/batchpayments/upload' -F @batchPaymentData.json
where:
- hostname is the URL for the Billing Care REST server.
- port is the port for the Billing Care REST server.
- version is the version of the API you're using, such as v1.0.
- batchPaymentData.json is the JSON file that specifies the batch payment file to upload.
Example of Request Body
This example shows the contents of the batchPaymentData.json form file sent as the request body to specify the details of the batch file to be uploaded. The cashPayment.pmt file contains the actual payment details.
{
"fileName': "cashPayment.pmt",
"name": "Cash Batch Payment",
"currency": "840",
"institutionName": "Cash Payment Batch",
"lockBoxName": "Cash Payment Batch",
"lockBoxId": "10011",
"fileCreationDate": 1612442456000,
"fileSize": 0.7109375,
"noOfPayments": 2,
"status": 1,
"templateName": null
}
Example of Response Body
This example shows the contents of the response body in JSON format.
{
"extension": null,
"lockBoxName": "Cash Payment Batch",
"lockBoxId": "10011",
"institutionName": "Cash Payment Batch",
"templateName": null,
"currency": "840",
"fileName": "cashPayment.pmt",
"fileCreationDate": 1612442456000,
"fileSize": 0.7109375,
"noOfPayments": 2,
"status": 1
}