### Scenario 2: Process document – get result using polling method
Prerequisite for this process is to have a published preset with which we want to process the document.
1. To start document processing use one of methods from the *idp-import* group, depending on the input document type (pdf, png, tiff, jpeg)
In a response to any of these methods, if document upload is successful, system will respond with process UUID assigned to uploaded document. Subsequently, obtained UUID can be used as an input parameter in the next step.
2. Get-status from the *idp-process* group
Provides document processing status. Get-status method returns a JSON payload with the status and last activity timestamp. Possible statuses are available in the method description.
Both EXPORTED and REJECTED status are final statues and once process reaches one of those two states, no more processing is performed.
If a process ended up in the EXPORTED state, processing result is available and one can proceed with the next step.
3. Get-xml-result from the *idp-process* group can be used to download XML file with the results of processing.
To fetch the resulting XML, the client needs to provide IDP process UUID.
In this scenario it is expected of client to store process UUID within its own datastore and use it to periodically check processing status. (polling get-status method)

