When using Rossum's rejection workflow as a developer, you might be looking for how to:
- Get rejected documents over the API.
- Disable the rejection state over the API.
- Customize the rejection email template.
- Reject documents automatically.
- Get notifications about rejected documents.
Below, you can read about how to perform such operations over the API.
To get all documents in the rejected tab, you should list all the annotations on a specific queue in "rejected" status. Moreover, if you want to get the rejection notes' content, you should sideload the relevant notes. See the Postman request example below.
As you can see in the image above, the response returns a list of annotations and a list of related notes for each annotation. In this case, you are looking at the "rejection" type of notes.
To enable/disable the rejected state over the API, you should look at the settings of a specific queue, which contains attribute rejection_config.
Suppose you would like to reject the documents automatically. In that case, you can use the reject endpoint to switch a document to the "rejected" status.
The usual workflow is to get initially captured data, and based on the captured values, you can reject the document automatically.
To get real-time notifications about rejected documents, you should implement a webhook or custom function listening to annotation_status.changed event action. You could then filter only the events where the annotation status event data has status rejected.
Updated 10 months ago