v4

OpenAPI 3.0.12026-07-3189233676.2 KB
Document Collections

Finalize a collection

The endpoint finalizes a document collection by creating or updating links for all matched documents and users. Optionally accepts a subset of document IDs to finalize. If no document_ids provided, all recognized documents in the collection will be finalized.

post/v1/documents/collections/{collection_id}/finalize/

Request body

document_idsstring[]

Optional list of document IDs to finalize. If not provided, all recognized documents in the collection will be finalized.

product_type'income' | 'employment'

Product type for finalization. Defaults to 'income' if not provided.

Example request

{
  "document_ids": [
    "d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6",
    "a9b8c7d6e5f4a3b2c1d0e9f8a7b6c5d4"
  ],
  "product_type": "income"
}

Response

Example response

{
  "users": [
    {
      "id": "a1b2c3d4e5f6478899aabbccddeeff00",
      "external_user_id": "ext_user_789",
      "links": [
        {
          "link_id": "c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9",
          "status": "done",
          "documents": [
            {
              "id": "d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6",
              "document_type": "PAYSTUB"
            }
          ]
        }
      ]
    }
  ]
}