Close payable

Request Information
URL POST {{basepath}}/api/:project/payable/:payable-id/close
CategoryPayable

Description

If the payable has been sent to a dunning provider it can only be closed by the dunning provider.

If it has not been sent there yet you can close it by sending a "reason" for closing it.

Requires as PayableCloseRequest in the body.

Returns a PayableCloseResponse

Url variables
:project{{project}}
:payable-id{{payable_id}}
Header
Content-Typeapplication/json
JSON
{
    "reason": "Your reason for closing it at least 10 characters long"
}

Example responses

Close payable that had not been kicked off yet
Request Method & URL
POST {{basepath}}/api/:project/payable/:payable-id/close
Request Body:
{
    "reason": "Your reason for closing it at least 10 characters long"
}
Url variables
:project{{project}}
:payable-id{{payable_id}}
Response Code:
200 OK
Response Body:
{
    "responseId": "2_2d4ee2566b51ceaa335a2180a104892f5946258c",
    "message": "Requested payable is now closed",
    "identifier": "8_2_dc5bb598507c5ddf3b6221ebb22fb8c635c5cf7d1637851090"
}
Close payable - queued for closing
Request Method & URL
POST {{basepath}}/api/:project/payable/:payable-id/close
Request Body:
{
    "reason": "Your reason for closing it at least 10 characters long"
}
Url variables
:project{{project}}
:payable-id{{payable_id}}
Response Code:
202 Accepted
Response Body:
{
    "responseId": "2_bc0bde086462eddb7d21711432acc5775b8516fa",
    "message": "Requested payable to be closed",
    "identifier": "1_2_e4a857a90c92a8b9d24bca61f74cb01c46697e951637851867"
}