For the complete documentation index, see llms.txt. This page is also available as Markdown.

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_promised or amount_paid must be supplied.

  • Unlike Update Note, which can also add new promise-to-pay entries, this endpoint only updates an existing one.

This endpoint is not enabled for every subscription. If your integration is not permitted to update promise-to-pay records the request will fail with a 401 Unauthorized. Contact d6 if you need it enabled.

Path Parameters

Name
Type
Description

{id}*

Integer

The promise-to-pay ID of the record to update

Request Headers

Name
Type
Description

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

Name
Type
Description

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.

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.

Condition
Resulting value

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

Description: When your subscription is not permitted to update promise-to-pay records

Status: 401 Unauthorized

Code Samples

Last updated