POST /extraction

Create an extraction. This allows you to specify the fields you would like to extract from which files. Multiple file_ids and field_ids can be specified in a single request. Due to the asynchronous nature of processing extractions, the results for each of these fields will be returned independently. Thus the endpoint will return a number of extraction identifiers (request_id) and the status will be set to “queued” which can then be used to retrieve the results for each extraction.


Authorization (required) - Requires the standard authentication header used in the system.


  • file_ids Body Required

    array of file ids to have extraction performed on

  • field_ids Body Required

    array of field IDs to be extracted from the document

Code Sample
curl -X POST -H "Accept: application/json"  
-H "Authorization: Bearer <token>" 
-H "Content-Type: application/json"  
-d "{
"file_ids": ["<file_id>"], 
"field_ids": ["<field_id>", "<field_id>"]
extraction_jobs, _ = zdai.extraction.create(file_ids = ['file_id_1', '...'], field_ids = ['field_id_1', '...'])
Response Codes
  • 202 Accepted
    Extraction has been created successfully.
  • 400 Bad Request
    Malformed request body, or file_ids/field_ids are missing.
  • 403 Forbidden
    Invalid or missing authentication token.
  • 404 Not Found
    Either the file or one or more fields specified do not exist.
  • 409 Conflict
    The Extract result is not ready.
  • 500 Internal Server Error
    Something went wrong unrelated to the users request.

Response Data

  • file_id

    the file identifier for the document being extracted

  • status

    the status of the extraction. A successful extraction will return a “complete” value

  • request_id

    the id that can be used to return the extractions from the document

    "file_ids": [
            "file_id": "<file_id>",
            "field_ids": [
            "status": "queued",
            "request_id": "<request_id>"

Need Help?

Couldn’t find the information you were looking for or need more assistance?

Contact Support