Start a query of elements belonging to a specific process in specific state (optional) within a certain date range (dates optional). First batch of documents arrive in response of the query with a token id usable to retrieve further elements.

It's possible to query elements belonging to a specific process in a certain state within a specified date range. Here's a quick guide on how to do this:

Parameters

You will need to use the following parameters:

status: This is a string used to filter results based on the document status. Possible values include LOADED, EXTRACTED, PROCESSED, INVERIFICATION, FINALIZED, and DISCARDED.

ignoreExported: This is a boolean used to filter results by exporting status. If set to true, the query will ignore documents that have been already flagged as exported from the KAPTO platform.

notBefore and notAfter: These are date parameters. Use notBefore to filter documents loaded not before a certain date and notAfter to filter documents loaded not after a certain date.

communicationId: This string parameter is used to retrieve a specific batch of documents.

batchSize: This integer parameter determines the number of elements to return in a batch response. The default value is 1024 elements.

Process

Initiate the Query: Start by initiating a query using the parameters above. The status parameter is mandatory while others are optional. If you don't specify the batchSize, the query will return the default 1024 elements.

Receive the First Batch: Once the query is initiated, KAPTO will return the first batch of documents. The response will also include a token ID.

Retrieve Further Elements: You can use the token ID received in the first batch to retrieve further elements in the next batch. You can determine if further results are waiting to be retrieved looking to the value of nextToken variable. If it's null or "" means no further results are waiting to be retrieved, otherwise it contains the value of the token you should use with the Query Continuation API to retrieve further results.

Remember, you can fine-tune your query by using different combinations of parameters. For instance, you can specify a date range using notBefore and notAfter, or filter documents based on their export status using ignoreExported.

Language
Credentials
Header
Click Try It! to start a request and see the response here!