Skip to navigation
APIW-2s

The W-2 object

An extracted Form W-2, uploaded on its own.

The retrieve endpoint returns this object on its own. The list endpoint returns one per document, wrapped as { "borrower_id": …, "forms": [ { "extracted_document_id", "document_category", "report_data" } ] }.

data carries the boxes of the first statement in the file and data.forms_w2 every statement, one per employer. The employee’s Social Security number is only ever its last four digits, and an employer identification number reads masked to its last four.

The documents behind this object carry document_category w2 or form_w2. Money keys are JSON strings with exactly two decimals ("9200000.00", "-1250.50"). The object carries no date keys.

Fields

KeyTypePresent whenDescription
formalways w2AlwaysAlways w2.
dataobjectAlwaysThe boxes of the first statement in the file, with every statement of the file under forms_w2.
metadataobjectAlwaysHow the file was read.
k1_partnersarrayAlwaysAlways empty on a Form W-2.
statementsarrayAlwaysAlways empty on a Form W-2.
depreciation_reportsobject, nullableWhen the document states itAlways null on a Form W-2.

data

The boxes of the first statement in the file, with every statement of the file under forms_w2.

KeyTypePresent whenDescription
copystring, nullableAlwaysThe copy letter printed on the form (A, B, C, D, 1 or 2), when the print carries one.
tax_yearinteger, nullableAlwaysThe tax year printed beside the form title.
control_numberstring, nullableAlwaysBox d, control number, as printed.
employer_einstring, nullableAlwaysBox b, employer identification number, masked to the last four digits.
employer_namestring, nullableAlwaysBox c, the employer’s name.
employer_addressstring, nullableAlwaysBox c, the employer’s address below the name, on one line.
employee_namestring, nullableAlwaysBox e, the employee’s first name, initial and last name, as printed.
employee_ssn_last4string, nullableAlwaysBox a, the last four digits of the employee’s social security number; the rest of the number is never served.
box_1_wagesstring (money), nullableAlwaysBox 1, wages, tips, other compensation.
box_2_federal_tax_withheldstring (money), nullableAlwaysBox 2, federal income tax withheld.
box_3_ss_wagesstring (money), nullableAlwaysBox 3, social security wages.
box_4_ss_tax_withheldstring (money), nullableAlwaysBox 4, social security tax withheld.
box_5_medicare_wagesstring (money), nullableAlwaysBox 5, Medicare wages and tips.
box_6_medicare_tax_withheldstring (money), nullableAlwaysBox 6, Medicare tax withheld.
box_7_ss_tipsstring (money), nullableAlwaysBox 7, social security tips.
box_8_allocated_tipsstring (money), nullableAlwaysBox 8, allocated tips.
box_10_dependent_care_benefitsstring (money), nullableAlwaysBox 10, dependent care benefits.
box_11_nonqualified_plansstring (money), nullableAlwaysBox 11, nonqualified plans.
box_12array of W2Box12ItemAlwaysBox 12, one entry per printed code and amount, 12a through 12d.
box_13_statutory_employeeboolean, nullableAlwaysBox 13, the statutory employee box, true when checked.
box_13_retirement_planboolean, nullableAlwaysBox 13, the retirement plan box, true when checked.
box_13_third_party_sick_payboolean, nullableAlwaysBox 13, the third-party sick pay box, true when checked.
box_14_otherarray of W2Box14ItemAlwaysBox 14, other, one entry per printed label and amount.
box_14b_tipped_occupation_codesarray of stringAlwaysBox 14b, Treasury tipped occupation codes, on a form that prints the box.
state_rowsarray of W2StateRowAlwaysBoxes 15 through 17, one row per state.
local_rowsarray of W2LocalRowAlwaysBoxes 18 through 20, one row per locality.
omb_numberstring, nullableAlwaysThe OMB number printed on the form, 1545-0008 or 1545-0029.
layoutstring, one of irs_1up, irs_4up, substitute, nullableAlwaysThe printing of the statement: irs_1up, the IRS form with one statement per page; irs_4up, the four-per-page sheet; substitute, a payroll or preparer print.
source_pagesarray of integerAlwaysThe pages of the uploaded file the statement is printed on, counting from one; several when the upload repeats it.
rescued_fieldsarray of stringAlwaysThe boxes whose figure was read from the page as a whole rather than from the box itself; empty when every figure was read from its box.
forms_w2array of objectsAlwaysEvery distinct statement the upload prints, one per employer, in document order; the first is the one at the top level.
taxpayer_namestring, nullableAlwaysThe employee’s name printed in box e of the first statement.
ssn_last4string, nullableAlwaysThe last four digits of the employee’s social security number printed in box a of the first statement.

data.forms_w2[]

Form W-2, Wage and Tax Statement, one employer’s statement of one employee’s wages and withholding for one year.

KeyTypePresent whenDescription
copystring, nullableAlwaysThe copy letter printed on the form (A, B, C, D, 1 or 2), when the print carries one.
tax_yearinteger, nullableAlwaysThe tax year printed beside the form title.
control_numberstring, nullableAlwaysBox d, control number, as printed.
employer_einstring, nullableAlwaysBox b, employer identification number, masked to the last four digits.
employer_namestring, nullableAlwaysBox c, the employer’s name.
employer_addressstring, nullableAlwaysBox c, the employer’s address below the name, on one line.
employee_namestring, nullableAlwaysBox e, the employee’s first name, initial and last name, as printed.
employee_ssn_last4string, nullableAlwaysBox a, the last four digits of the employee’s social security number; the rest of the number is never served.
box_1_wagesstring (money), nullableAlwaysBox 1, wages, tips, other compensation.
box_2_federal_tax_withheldstring (money), nullableAlwaysBox 2, federal income tax withheld.
box_3_ss_wagesstring (money), nullableAlwaysBox 3, social security wages.
box_4_ss_tax_withheldstring (money), nullableAlwaysBox 4, social security tax withheld.
box_5_medicare_wagesstring (money), nullableAlwaysBox 5, Medicare wages and tips.
box_6_medicare_tax_withheldstring (money), nullableAlwaysBox 6, Medicare tax withheld.
box_7_ss_tipsstring (money), nullableAlwaysBox 7, social security tips.
box_8_allocated_tipsstring (money), nullableAlwaysBox 8, allocated tips.
box_10_dependent_care_benefitsstring (money), nullableAlwaysBox 10, dependent care benefits.
box_11_nonqualified_plansstring (money), nullableAlwaysBox 11, nonqualified plans.
box_12array of W2Box12ItemAlwaysBox 12, one entry per printed code and amount, 12a through 12d.
box_13_statutory_employeeboolean, nullableAlwaysBox 13, the statutory employee box, true when checked.
box_13_retirement_planboolean, nullableAlwaysBox 13, the retirement plan box, true when checked.
box_13_third_party_sick_payboolean, nullableAlwaysBox 13, the third-party sick pay box, true when checked.
box_14_otherarray of W2Box14ItemAlwaysBox 14, other, one entry per printed label and amount.
box_14b_tipped_occupation_codesarray of stringAlwaysBox 14b, Treasury tipped occupation codes, on a form that prints the box.
state_rowsarray of W2StateRowAlwaysBoxes 15 through 17, one row per state.
local_rowsarray of W2LocalRowAlwaysBoxes 18 through 20, one row per locality.
omb_numberstring, nullableAlwaysThe OMB number printed on the form, 1545-0008 or 1545-0029.
layoutstring, one of irs_1up, irs_4up, substitute, nullableAlwaysThe printing of the statement: irs_1up, the IRS form with one statement per page; irs_4up, the four-per-page sheet; substitute, a payroll or preparer print.
source_pagesarray of integerAlwaysThe pages of the uploaded file the statement is printed on, counting from one; several when the upload repeats it.
rescued_fieldsarray of stringAlwaysThe boxes whose figure was read from the page as a whole rather than from the box itself; empty when every figure was read from its box.

metadata

How the file was read.

KeyTypePresent whenDescription
form_keystringAlwaysThe form’s key, w2.
detected_yearinteger, nullableAlwaysThe tax year the form was printed for.
parent_formstring, nullableAlwaysNull on a form uploaded on its own.
base_pageintegerOn a document where a Form W-2 was read; absent when none was.The page of the uploaded file the form starts on, counting from zero.
faces_readintegerAlwaysThe number of statement faces printed across the upload, every copy counted, on a Form W-2.
copies_collapsedintegerAlwaysThe number of printed faces that repeat another face of the same statement, on a Form W-2.
layoutstring, one of irs_1up, irs_4up, substitute, nullableOn a document where a Form W-2 was read; absent when none was.The printing of the first statement on a Form W-2: irs_1up, the IRS form with one statement per page; irs_4up, the four-per-page sheet; substitute, a payroll or preparer print.
w2_countintegerAlwaysThe number of distinct statements the upload prints, one per employer, on a Form W-2.
rescued_fieldsarray of stringWhen the document states itThe boxes whose figure the page-level read supplied rather than the box itself, on a Form W-2; absent when every figure was read from its box.
standalonebooleanWhen the document states itTrue on a form uploaded on its own.

Shared objects

Object types that several keys above carry. The Type column names them.

W2Box12Item

One box 12 entry of a Form W-2.

KeyTypePresent whenDescription
codestring, nullableAlwaysThe one or two letter code printed beside the amount.
amountstring (money), nullableAlwaysThe amount printed for the code.
slotstring, nullableWhen the document states itThe letter of the box 12 line the entry is printed on, a through d, when the form letters its box 12 lines; null when the form prints one box 12 caption.

W2Box14Item

One box 14 entry of a Form W-2.

KeyTypePresent whenDescription
labelstring, nullableAlwaysThe label the employer printed.
amountstring (money), nullableAlwaysThe amount printed beside the label.

W2LocalRow

One local row of a Form W-2, boxes 18 through 20.

KeyTypePresent whenDescription
box_18_local_wagesstring (money), nullableAlwaysBox 18, local wages, tips, etc.
box_19_local_taxstring (money), nullableAlwaysBox 19, local income tax.
box_20_localitystring, nullableAlwaysBox 20, locality name.

W2StateRow

One state row of a Form W-2, boxes 15 through 17.

KeyTypePresent whenDescription
statestring, nullableAlwaysBox 15, the state.
employer_state_idstring, nullableAlwaysBox 15, employer’s state ID number.
box_16_state_wagesstring (money), nullableAlwaysBox 16, state wages, tips, etc.
box_17_state_taxstring (money), nullableAlwaysBox 17, state income tax.