Examples of Put, Get & Quote for Batch

Table - Examples - PUT Batch

Request:
PUT /customers/MPCTEST1/batches/B3
Response:
201 Created
{
}
Request:
PUT /customers/MPCTEST1/batches/B3
Response:
200 OK
{
}
Request:
PUT /customers/MPCTEST1/batches/B4
{"reference":"test batch 4"}
Response:
201 Created
{
}

Table - Examples - GET Batch

Request:
GET /customers/MPCTEST1/batches/B3
Response:
200 OK
{
"id":"B3","createdOn":"2016-07-27T22:45:58Z",
"lastUpdatedOn":"2016-07-27T22:45:58Z","numberOfReceivedPayments":2,
"numberOfAcceptedPayments":2,"aggregateAmounts":
[
{
"isFixedOnSettlement":false,"currency":"CAD","settlementCurrency":
"USD","amount":153},{"isFixedOnSettlement":false,"currency":"USD",
"settlementCurrency":"USD","amount":250
}
]
}
Request:
GET /customers/MPCTEST1/batches/B4
Response:
200 OK
{
"id":"B4","reference":"test batch 4","createdOn":"2016-07-28T00:19:16Z",
"lastUpdatedOn":"2016-07-28T00:21:28Z","numberOfReceivedPayments":0,
"numberOfAcceptedPayments":0,"aggregateAmounts":
[
]
}

Table - Examples - Quote a Batch (POST)

Request:
POST /customers/MPCTEST1/batches/B3/quote
Response:
201 Created
{
"expirationIntervalInSec":60,","createdOn":"2016-07-28T00:14:40Z",
"status":"Created","lastUpdatedOn":"2016-07-28T00:14:40Z","quotedItems":
[
{
"isDirectRate":false,"rate":1.2213,"rateInverted":0.8188,"decimalsDirect":4,
"decimalsIndirect":4,"tradeAmount":153,"settlementAmount":125,
"tradeCurrency":"CAD","settlementCurrency":"USD"
},
{
"isDirectRate":true,"rate":1,"rateInverted":1,"decimalsDirect":4,
"decimalsIndirect":4,"tradeAmount":250,"settlementAmount":250,
"tradeCurrency":"USD","settlementCurrency":"USD"
}
]
}
Request:
POST /customers/MPCTEST1/batches/B4/quote
Response:
400 Bad Request
{
"errorCode":1206
}
Request:
POST /customers/MPCTEST1/batches/B4/quote
Response:
201 Created                              
{
"expirationIntervalInSec":60,"createdOn":"2016-07-28T00:34:32Z",
"status":"Created","lastUpdatedOn":"2016-07-28T00:34:32Z",
"quotedItems":
[
{
"isDirectRate":false,"rate":1.2213,"rateInverted":0.8188,
"decimalsDirect":4,"decimalsIndirect":4,"tradeAmount":299,
"settlementAmount":245,"tradeCurrency":"CAD","settlementCurrency":"USD"
},
{
"isDirectRate":true,"rate":1.4413,"rateInverted":0.6938,"decimalsDirect":4,
"decimalsIndirect":4,"tradeAmount":123,"settlementAmount":177,
"tradeCurrency":"EUR","settlementCurrency":"CAD"
}
]
}