Update a Disbursement Status
PATCH/disbursements/:id/status
Updates the status of a disbursement according to the state machine. The disbursement must move from draft
to ready
in order to start the disbursement and trigger payments. Payments will start as soon as this endpoint is hit. A disbursement can also be moved into paused
state by an SDP user to prevent further payments from going out and restarted when they are ready.
Request
Path Parameters
id stringrequired
ID of the disbursement
Responses
- 200
- 400
- 401
- 403
- 404
Message Response
- application/json
- Schema
- Example (from schema)
- Example
Schema
message stringrequired
{
"message": "string"
}
{
"message": "Disbursement started"
}
Bad Request
- application/json
- Schema
- Example (from schema)
- Example
Schema
error string
extras
object
status number
message string
{
"error": "Bad request",
"extras": {
"status": 400,
"message": "Disbursement is not ready to be started"
}
}
{
"error": "Bad request",
"extras": {
"status": 400,
"message": "Disbursement is not ready to be started"
}
}
Unauthorized
- application/json
- Schema
- Example (from schema)
- Example
Schema
error string
extras
object
status number
message string
{
"error": "Not authorized",
"extras": {
"status": 401,
"message": "Not authorized"
}
}
{
"error": "Not authorized",
"extras": {
"status": 401,
"message": "Not authorized"
}
}
Forbidden
- application/json
- Schema
- Example (from schema)
- Example
Schema
error string
{
"error": "Forbidden"
}
{
"error": "Forbidden"
}
Not Found
- application/json
- Schema
- Example (from schema)
- Example
Schema
error string
extras
object
status number
message string
{
"error": "Not found",
"extras": {
"status": 404,
"message": "Disbursement not found"
}
}
{
"error": "Not found",
"extras": {
"status": 404,
"message": "Disbursement not found"
}
}
Loading...