Contract Amendment
Changing the payment amount or date on a scheduled contract can be achieved by using one of the following calls. You will need to select the correct call for the type of contract that you are amending. For example, changing the date on a monthly contract will need a monthly call. We have only shown the responses from one of the calls as all of the calls respond in the same manner. One example of an error is shown, however you should be prepared to accept different errors and handle them as exceptions during the testing stage.
PATCH/client/{clientCode}/contract/{contractId}/amountChanging the Amount#
Amends an existing contract amount in the database.
directDebit/path/client-contract- clientCode
- contractId
- amount
- comment
{} — This call takes no request body — send an empty JSON object.
Responses
200OK
- Message
Example request
PATCH /client/{clientCode}/contract/{contractId}/amount{}curl -L -g -X PATCH 'https://ddcms.accesspaysuite.com/api/v3/client/{clientCode}/contract/{contractId}/amount?amount=9.99&comment=Change contract amount' -H 'apiKey: {apiKey}'HTTP/1.1 200 OK
{
"Message": "Contract updated"
}HTTP/1.1 400 Bad Request
{
"Detail": "Amount should be different than old contract amount",
"ErrorCode": 3,
"Message": "Validation error"
}PATCH/client/{clientCode}/contract/{contractId}/annualChanging the Date (Annual Schedules)#
Amends an existing contract payment date in the database.
directDebit/path/client-contract- clientCode
- contractId
- monthDay
- month
- comment
- nextPaymentPatchAmount
- patchNextPayment
{} — This call takes no request body — send an empty JSON object.
Responses
200OK
- Message
Example request
PATCH /client/{clientCode}/contract/{contractId}/annual{}curl -L -g -X PATCH 'https://ddcms.accesspaysuite.com/api/v3/client/{clientCode}/contract/{contractId}/annual?monthDay=15&month=1&comment=Change day&patchNextPayment=false' -H 'apiKey: {apiKey}'HTTP/1.1 200 OK
{
"Message": "Contract updated"
}HTTP/1.1 400 Bad Request
{
"Message": "Month day is invalid for this contract"
}PATCH/client/{clientCode}/contract/{contractId}/monthlyChanging the Date (Monthly Schedules)#
Amends an existing contract payment date in the database.
directDebit/path/client-contract- clientCode
- contractId
- monthDay
- comment
- nextPaymentPatchAmount
- patchNextPayment
{} — This call takes no request body — send an empty JSON object.
Responses
200OK
- Message
Example request
PATCH /client/{clientCode}/contract/{contractId}/monthly{}curl -L -g -X PATCH 'https://ddcms.accesspaysuite.com/api/v3/client/{clientCode}/contract/{contractId}/monthly?monthDay=15&comment=Change day&patchNextPayment=false' -H 'apiKey: {apiKey}'HTTP/1.1 200 OK
{
"Message": "Contract updated"
}HTTP/1.1 400 Bad Request
{
"Message": "Month day is invalid for this contract"
}PATCH/client/{clientCode}/contract/{contractId}/referenceChanging the Direct Debit Reference (for authorised users only)#
In general, our software will allocate a unique direct debit reference for every contract created within the system. For own SUN and FM SUN clients that have made prior arrangements with us, it is possible to change a reference number after the contract has been set up. Please note that using this facility will incur extra charges as new instructions will need to be sent to the bank via BACS.
directDebit/path/client-contract- clientCode
- contractId
- newDDRef
{} — This call takes no request body — send an empty JSON object.
Responses
200OK
- Message
Example request
PATCH /client/{clientCode}/contract/{contractId}/reference{}curl -L -g -X PATCH 'https://ddcms.accesspaysuite.com/api/v3/client/{clientCode}/contract/{contractId}/reference?newDDRef=TEST-MT012345' -H 'apiKey: {apiKey}'HTTP/1.1 200 OK
{
"Message": "Contract reference updated"
}HTTP/1.1 403 Forbidden
{
"Message": "API not enabled"
}HTTP/1.1 404 Not Found
{
"Message": "Contract not found"
}PATCH/client/{clientCode}/contract/{contractId}/weeklyChanging the Day (Weekly Schedules)#
Amends an existing contract payment date in the database.
directDebit/path/client-contract- clientCode
- contractId
- day
- comment
- nextPaymentPatchAmount
- patchNextPayment
{} — This call takes no request body — send an empty JSON object.
Responses
200OK
- Message
Example request
PATCH /client/{clientCode}/contract/{contractId}/weekly{}curl -L -g -X PATCH 'https://ddcms.accesspaysuite.com/api/v3/client/{clientCode}/contract/{contractId}/weekly?day=5&comment=Change to Friday&patchNextPayment=false' -H 'apiKey: {apiKey}'HTTP/1.1 200 OK
{
"Message": "Contract updated"
}HTTP/1.1 400 Bad Request
{
"Message": "Day is invalid for this contract"
}