Adding Multiple Transactions


Function:
Name: addTransactions
Type: POST
Parameters:


Pass a JSON array of parameters in the single transactions through "transactions" field.  A maximum of 50 transactions can be sent at once.  All transactions without errors will be entered into the system, any transaction with errors will be shown in 'error' field response.


Example:


 "transactions": [

{

 "amount": "50.23",

 "collector": "Company A",

 "date": "12/31/2015",

 "merchantNumber": "1234",

"transactionNumber:"1348192",

"description":"Repayment"

 },

 {

 "amount": "50.23",

 "collector": "Company A",

 "date": "12/30/2015",

 "merchantNumber": "1234"

 }

 ]


Return Response 


Field Name
TypeDescription
success
Booleantrue/false
transactions
Array
This will return an array in response to all transactions sent over.  Included in each will be "errors", "success", "id" if successfully added.  Additionally if "transactionNumber" or "description" is sent over they will be returned.  See example below.
numberUploadedintnumber of transactions that uploaded successfully


{
    "success": true,
    "numberUploaded": 1,
    "transactions": [
        {
            "errors": [
                "Missing one of the required fields for array item"
            ],
            "success": false
        },
        {
            "errors": [
                "There is no deal with a matching merchantNumber and collector."
            ],
            "success": false,
            "transactionNumber": 41231
        },
        {
            "success": true,
            "id": 27127,
            "transactionNumber": 12312
        },
        {
            "errors": [
                "Missing one of the required fields for array item"
            ],
            "success": false,
            "description": "HEY",
            "transactionNumber": "1231"
        }
    ]
}