Update Promise To Pay
PATCH v2/finplus/debtmanagement/debtornotes/promisetopays/{id}
Use this endpoint to update a single promise-to-pay record for the specified school, without having to send the debtor note it belongs to.
The promise-to-pay ID must be included in the URL and can be found using the Get Promise To Pay(s) or Get Note(s) call.
Send only the fields you want to change. Any field you leave out keeps its current value.
At least one of
date_promised,amount_promisedoramount_paidmust be supplied.Unlike Update Note, which can also add new promise-to-pay entries, this endpoint only updates an existing one.
Path Parameters
{id}*
Integer
The promise-to-pay ID of the record to update
Request Headers
HTTP-X-USERNAME*
String
As provided by d6
HTTP-X-PASSWORD*
String
As provided by d6
HTTP-X-SCHOOLID*
Integer
The unique identifier of the school for which the data is being queried.
Request Body
date_promised
String
The date the payment is promised for, in "yyyy-mm-dd" format. Must fall between the start of the current year and the end of next year.
amount_promised
String
The amount promised. At most 2 decimal places, and at least 1.00.
amount_paid
String
The amount paid against the promise. At most 2 decimal places, and may not exceed amount_promised.
promise_completed is derived by d6 from the amounts and cannot be set directly. Sending it returns a 400 Bad Request.
How promise_completed is derived
The flag is recalculated on every update, using the values the record will hold once the update is applied, so it can never disagree with the amounts.
amount_paid is zero or not yet set
"No"
amount_paid is less than amount_promised
"Partial"
amount_paid equals or exceeds amount_promised
"Yes"
Request Examples
Response Examples
Status: 200 OK
Description: When no promise-to-pay ID was provided
Status: 400 Bad Request
Description: When the request body contains none of the updatable fields
Status: 400 Bad Request
Description: When amount_paid is greater than amount_promised. Increase amount_promised in the same request if the arrangement itself has changed.
Status: 400 Bad Request
Description: When promise_completed is supplied. It is derived from the amounts.
Status: 400 Bad Request
Description: When validation failed for one or more fields
Status: 400 Bad Request
Description: When the promise-to-pay ID does not exist
Status: 404 Not Found
Code Samples
Last updated