Create a Batch Template
post
/bcws/webresources/v1.0/batchpayments/batchtemplates
Creates a batch template in the BRM database.
Request
There are no request parameters for this operation.
Supported Media Types
- application/xml
- application/json
Root Schema : schema
Type:
Show Source
object
-
batchName(required): string
The batch name, for example Cash Payment Batch or Check Payment Batch.
-
batchTemplateRef: object
ResourceRef
-
batchType: integer
(int32)
The type of the batch. Allowed values: 1 (payment), 2 (refund), or 3 (reversal).
-
columnLink: array
columnLink
Indicates the order of the columns present in the batch.
-
consecutive: integer
(int32)
Whether to treat consecutive delimiters as one (true) or not (false).
-
delimiter: string
The delimiter that is used to separate fields.
- footerEndRow: integer (int32)
- footerStartRow: integer (int32)
-
headerEndRow: integer
(int32)
The row at which the header ends.
-
headerStartRow: integer
(int32)
The row from which the header starts.
-
payType: integer
(int32)
The payment method type. Allowed values:
- 10003 (Credit card)
- 10005 (Direct debit)
- 10011 (Cash)
- 10012 (Check)
- 10013 (Wire Transfer)
- 10014 (Inter-bank payment order)
- 10015 (Postal order)
- Any customized payment methods that have been added for your implementation
-
qualifier(required): string
Ignore delimiters between specific characters. Valid characters are ", ', or none.
-
startRow: integer
(int32)
The row from which import should start.
Nested Schema : ResourceRef
Type:
Show Source
object
-
id(required): string
The ID.
-
uri: string
The Uniform Resource Identifier (URI) associated with the resource.
Nested Schema : columnLink
Type:
array
Indicates the order of the columns present in the batch.
Show Source
-
Array of:
object ColumnLink
Indicates the order of the columns present in the batch.
Nested Schema : ColumnLink
Type:
object
Indicates the order of the columns present in the batch.
Show Source
-
fieldName(required): string
The name of the column.
-
index: integer
(int32)
The position in which the column appears.
-
purpose: integer
(int32)
Whether the field is specific to the batch (1) or not (0).
Root Schema : schema
Type:
Show Source
object
-
batchName(required): string
The batch name, for example Cash Payment Batch or Check Payment Batch.
-
batchTemplateRef: object
ResourceRef
-
batchType: integer
(int32)
The type of the batch. Allowed values: 1 (payment), 2 (refund), or 3 (reversal).
-
columnLink: array
columnLink
Indicates the order of the columns present in the batch.
-
consecutive: integer
(int32)
Whether to treat consecutive delimiters as one (true) or not (false).
-
delimiter: string
The delimiter that is used to separate fields.
- footerEndRow: integer (int32)
- footerStartRow: integer (int32)
-
headerEndRow: integer
(int32)
The row at which the header ends.
-
headerStartRow: integer
(int32)
The row from which the header starts.
-
payType: integer
(int32)
The payment method type. Allowed values:
- 10003 (Credit card)
- 10005 (Direct debit)
- 10011 (Cash)
- 10012 (Check)
- 10013 (Wire Transfer)
- 10014 (Inter-bank payment order)
- 10015 (Postal order)
- Any customized payment methods that have been added for your implementation
-
qualifier(required): string
Ignore delimiters between specific characters. Valid characters are ", ', or none.
-
startRow: integer
(int32)
The row from which import should start.
Nested Schema : ResourceRef
Type:
Show Source
object
-
id(required): string
The ID.
-
uri: string
The Uniform Resource Identifier (URI) associated with the resource.
Nested Schema : columnLink
Type:
array
Indicates the order of the columns present in the batch.
Show Source
-
Array of:
object ColumnLink
Indicates the order of the columns present in the batch.
Nested Schema : ColumnLink
Type:
object
Indicates the order of the columns present in the batch.
Show Source
-
fieldName(required): string
The name of the column.
-
index: integer
(int32)
The position in which the column appears.
-
purpose: integer
(int32)
Whether the field is specific to the batch (1) or not (0).
Response
Supported Media Types
- application/xml
- application/json
201 Response
The batch template was created successfully.
Root Schema : schema
Type:
Show Source
object
-
batchName(required): string
The batch name, for example Cash Payment Batch or Check Payment Batch.
-
batchTemplateRef: object
ResourceRef
-
batchType: integer
(int32)
The type of the batch. Allowed values: 1 (payment), 2 (refund), or 3 (reversal).
-
columnLink: array
columnLink
Indicates the order of the columns present in the batch.
-
consecutive: integer
(int32)
Whether to treat consecutive delimiters as one (true) or not (false).
-
delimiter: string
The delimiter that is used to separate fields.
- footerEndRow: integer (int32)
- footerStartRow: integer (int32)
-
headerEndRow: integer
(int32)
The row at which the header ends.
-
headerStartRow: integer
(int32)
The row from which the header starts.
-
payType: integer
(int32)
The payment method type. Allowed values:
- 10003 (Credit card)
- 10005 (Direct debit)
- 10011 (Cash)
- 10012 (Check)
- 10013 (Wire Transfer)
- 10014 (Inter-bank payment order)
- 10015 (Postal order)
- Any customized payment methods that have been added for your implementation
-
qualifier(required): string
Ignore delimiters between specific characters. Valid characters are ", ', or none.
-
startRow: integer
(int32)
The row from which import should start.
Nested Schema : ResourceRef
Type:
Show Source
object
-
id(required): string
The ID.
-
uri: string
The Uniform Resource Identifier (URI) associated with the resource.
Nested Schema : columnLink
Type:
array
Indicates the order of the columns present in the batch.
Show Source
-
Array of:
object ColumnLink
Indicates the order of the columns present in the batch.
Nested Schema : ColumnLink
Type:
object
Indicates the order of the columns present in the batch.
Show Source
-
fieldName(required): string
The name of the column.
-
index: integer
(int32)
The position in which the column appears.
-
purpose: integer
(int32)
Whether the field is specific to the batch (1) or not (0).
500 Response
An internal server error occurred.
Examples
This example shows how to create a batch template in the BRM database 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/batchtemplates' -H 'content-type: application/json' -d @create.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.
- create.json is the JSON file that specifies the template to create.
Example of Request Body
This example shows the contents of the create.json file sent as the request body.
{
"batchName": "Postal order Reversal Batch",
"batchType": 3,
"payType": 10015,
"startRow": 16,
"delimiter": "\t",
"consecutive": 0,
"qualifier": "none",
"columnLink": [
{
"fieldName": "PIN_FLD_PAYMENT_TRANS_ID",
"index": 2,
"purpose":0
},
{
"fieldName": "PIN_FLD_FIRST_NAME",
"index": 4,
"purpose":0
},
{
"fieldName": "PIN_FLD_LAST_NAME",
"index": 5,
"purpose":0
},
{
"fieldName": "PIN_FLD_DESCR",
"index": 10,
"purpose":0
},
{
"fieldName": "PIN_FLD_ORDER_ID",
"index": 7,
"purpose":1
},
{
"fieldName": "PIN_FLD_REASON_CODE",
"index": 8,
"purpose":1
},
{
"fieldName": "PIN_FLD_EFFECTIVE_T",
"index": 9,
"purpose":1
}
],
"headerStartRow": 4,
"headerEndRow": 13,
"footerStartRow": 0,
"footerEndRow": 0
}
Example of Response Body
This example shows the contents of the response body in JSON format.
{
"id": "0.0.0.1+-config-batch_templates-reversal+599456",
"uri": null
}