Skip to main content

Split and process a PDF with multiple W-2s

POST 

/api/v8/partner/w2s-set

Veryfi's W-2 Splitter allows you to split a multi page PDF with different W-2s inside into multiple Documents. This API supports .pdf,.zip. The max pdf file size is 50mb. The max number of pages to process is limited to 100. Returns the response with the document set id immediately and starts processing asynchronously. When processing is finished successfully, you should expect a request to your configured webhook with this payload:

{'event': 'w2_set.created', 'data': {'parent_id': 42000, 'id': [690001, 690003, 690004], 'created': '2025-08-02 06:06:04'}}

If processing fails, the payload will be: {'event': 'w2_set.failed', 'data': {'parent_id': 42000, 'id': [], 'created': '2025-08-02 06:06:04'}}

Request

Body

    external_id string

    Possible values: non-empty

    A custom identification value. Use this if you would like to assign your own ID to documents. This parameter is useful when mapping this document to a service or resource outside Veryfi.

    meta.tags string[]

    Possible values: non-empty

    Default value: ``

    Tags you want to associate with the document.

    package_path string

    Possible values: non-empty

    A path to a file in an S3 bucket, e.g. 'some/receipt.jpg

    bucket string

    Possible values: non-empty

    An S3 bucket for 'package_path', e.g. 'documents'.

    file_data string

    Possible values: non-empty

    Used to upload a document via base64 encoded string, could be raw or data URI scheme. This is the least effective way to upload a document for processing. See file_urls or uploading zip files.

    file_url string

    Possible values: non-empty

    A URL to a publicly accessible document to be sent to Veryfi for processing.

    file_urls string[]

    Possible values: non-empty

    An array of URLs to publicly accessible documents to be sent to Veryfi for processing.

    file_name string

    Possible values: non-empty

    An optional filename. Useful to determine file type.

    max_pages_to_process integer

    Possible values: >= 1 and <= 100

    Default value: 100

    Limit processing to number of pages. A page is a pdf page or an image

Responses

The unique identifier of a document set.

Schema
    id integerrequired

    The unique identifier of the W-2 set.

    document_ids integer[]

    The ID of documents created from the set.

    status stringrequired

    Possible values: [processed, in_progress, deleted, failed]

Loading...