Batch payments
Creating a new Bulk payment
POST /api/batchpayment
{
"bankAccountId": "MITGBP",
"description": "API 3",
"allocations": [
{
"docId": "PIN1",
"allocAmountCurrency": 100
},
{
"DocId": "PIN2",
"AllocAmountCurrency": 200
}
]
}
This creates a new Bulk Payment for the specified bank account, allocating the specified invoices and amounts for payment.
Reference: POST /api/BatchPayment
Updating Bulk payment reference
Updateable fields of the Bulk payment can be updated by patching:
PATCH /api/batchpayment/(id)
{
"Description": "API 123",
"BankRef": "Payment 123"
}
Reference: PATCH /api/BatchPayment/(id)
Adding allocations to a Bulk payment
Additional allocations can be added via:
POST /api/batchpayment/(io)/allocations
[
{
"DocId": "PIN3",
"AllocAmountCurrency": 300
}
]
Note: If a previous allocation exists on PIN3, the allocated amount will be updated to 300.
Updating all allocations to a Bulk payment
All allocations can be replaced (discarding any current allocations):
PUT /api/batchpayment/(batchPaymentId)/allocations
[
{
"DocId": "PIN3",
"AllocAmountCurrency": 300
}
]
Removing an allocation
An allocation can be deleted by it's ID:
DELETE /api/batchpayment/{batchPaymentId}/allocations/{allocationId}