Archiving and Unarchiving Flows Using the API

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.

Archiving a Flow

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: Screenshot_2022-01-06_at_12.59.59.png

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": []    } }
Unarchiving a Flow

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
}
The flow is then put back in the concluded state and the assessment end date is automatically prolonged to the current date.
If you are trying to unarchive a flow that has not been archived, the response will return:
{
  "success": false,
  "data": null,
  "error": {
    "code": "400",
    "message": "Only flows in the archived state (5) can be unarchived",
    "errors": []
    }
}
Was this article helpful?
0 out of 0 found this helpful

Articles in this section

See more