This use case covers using the WISEflow API to archive and unarchive flows. It does not cover how to find the flowId which is described in this article.
This use case is ideal for institutions relying on the WISEflow API and has built their own middleware to control key aspects of WISEflow.
This article describes in detail how WISEflow handles archived flows.
The PATCH /flows/{flowId}/archive endpoint is used to archive flows. With the flowId as the parameter, it is possible to archive a flow from the concluded state; this state is automatically reached after the assessment period has ended, as seen below:
After successfully archiving a flow, the response will return:
{
"success": true,
"data": null,
"error": null
}
If you are trying to archive a flow, not in the correct state, the response will return:
{
"success": false,
"data": null,
"error": {
"code": "400",
"message": "Only flows in the concluded state (4) where the
assessment period has ended can be archived",
"errors": []
}
}
Using PATCH /flows/{flowId}/unarchive you can unarchive an already archived flow using the flowId as the parameter.
On successfully unarchiving a flow, the response will return:
{
"success": true,
"data": null,
"error": null
}
{
"success": false,
"data": null,
"error": {
"code": "400",
"message": "Only flows in the archived state (5) can be unarchived",
"errors": []
}
}