API Documentation
Documents
Document Conversion
Personal Earnings Statement
Certificate Of Origin
Dangerous Goods Declaration
International Consignment Note
US Form W2
Get US Form W2 Fields
This endpoint returns an object representing the extracted us-form-w2 model fields from a document.
GET
/
v1-preview
/
models
/
us-form-w2
/
{documentId}
using ABBYY.DocumentAI;
using ABBYY.DocumentAI.Schemas.Components;
var sdk = new DocumentAI(apiKeyAuth: "<YOUR_BEARER_TOKEN_HERE>");
var res = await sdk.Models.UsFormW2.GetExtractedFieldsAsync(documentId: "wh23anb5xjf0ntw5taase5qz");
// handle response
{
"meta": {
"id": "wh23anb5xjf0ntw5taase5qz",
"name": "document.jpg",
"createdAt": "2025-02-07T17:44:06.949Z",
"model": "us-form-w2",
"status": "Processed",
"pageCount": 10,
"errors": [
{
"message": "Total is required"
}
]
},
"fields": {
"year": "2023",
"boxAEmployeesSocialSecurityNumber": "123-45-6789",
"boxBEmployerIdentificationNumberEin": "12-3456789",
"boxCEmployersName": "ACME Corporation",
"boxCEmployersAddress": "123 Business Ave, Suite 100",
"boxDControlNumber": "123456",
"boxEEmployeesName": "John A. Smith",
"boxFEmployeesAddress": "456 Home Street",
"box1WagesTipsOtherCompensation": 75000,
"box2FederalIncomeTaxWithheld": 15000,
"box3SocialSecurityWages": 75000,
"box4SocialSecurityTaxWithheld": 4650,
"box5MedicareWagesAndTips": 75000,
"box6MedicareTaxWithheld": 1087.5,
"box7SocialSecurityTips": 5000,
"box8AllocatedTips": 0,
"box9VerificationCode": "123456",
"box10DependentCareBenefits": 5000,
"box11NonqualifiedPlans": 0,
"box12aCode": "D",
"box12aAmount": 5000,
"box12bCode": "E",
"box12bAmount": 3000,
"box12cCode": "F",
"box12cAmount": 2000,
"box12dCode": "G",
"box12dAmount": 1000,
"box13StatutoryEmployee": true,
"box13RetirementPlan": true,
"box13ThirdPartySickPay": false,
"box14Other": "Additional information",
"boxes1520": [
{
"box15EmployersStateIDNumber": "123456789",
"box15State": "CA",
"box16StateWagesTips": 75000,
"box17StateIncomeTax": 5000,
"box18LocalWagesTips": 75000,
"box19LocalIncomeTax": 1000,
"box20LocalityName": "San Francisco"
}
]
}
}
Authorizations
Our API offers authentication via API keys. You can obtain an API key from https://developer.abbyy.com
Path Parameters
The id of the document
Response
200
application/json
Extracted US Form W2 Data Response
Was this page helpful?
using ABBYY.DocumentAI;
using ABBYY.DocumentAI.Schemas.Components;
var sdk = new DocumentAI(apiKeyAuth: "<YOUR_BEARER_TOKEN_HERE>");
var res = await sdk.Models.UsFormW2.GetExtractedFieldsAsync(documentId: "wh23anb5xjf0ntw5taase5qz");
// handle response
{
"meta": {
"id": "wh23anb5xjf0ntw5taase5qz",
"name": "document.jpg",
"createdAt": "2025-02-07T17:44:06.949Z",
"model": "us-form-w2",
"status": "Processed",
"pageCount": 10,
"errors": [
{
"message": "Total is required"
}
]
},
"fields": {
"year": "2023",
"boxAEmployeesSocialSecurityNumber": "123-45-6789",
"boxBEmployerIdentificationNumberEin": "12-3456789",
"boxCEmployersName": "ACME Corporation",
"boxCEmployersAddress": "123 Business Ave, Suite 100",
"boxDControlNumber": "123456",
"boxEEmployeesName": "John A. Smith",
"boxFEmployeesAddress": "456 Home Street",
"box1WagesTipsOtherCompensation": 75000,
"box2FederalIncomeTaxWithheld": 15000,
"box3SocialSecurityWages": 75000,
"box4SocialSecurityTaxWithheld": 4650,
"box5MedicareWagesAndTips": 75000,
"box6MedicareTaxWithheld": 1087.5,
"box7SocialSecurityTips": 5000,
"box8AllocatedTips": 0,
"box9VerificationCode": "123456",
"box10DependentCareBenefits": 5000,
"box11NonqualifiedPlans": 0,
"box12aCode": "D",
"box12aAmount": 5000,
"box12bCode": "E",
"box12bAmount": 3000,
"box12cCode": "F",
"box12cAmount": 2000,
"box12dCode": "G",
"box12dAmount": 1000,
"box13StatutoryEmployee": true,
"box13RetirementPlan": true,
"box13ThirdPartySickPay": false,
"box14Other": "Additional information",
"boxes1520": [
{
"box15EmployersStateIDNumber": "123456789",
"box15State": "CA",
"box16StateWagesTips": 75000,
"box17StateIncomeTax": 5000,
"box18LocalWagesTips": 75000,
"box19LocalIncomeTax": 1000,
"box20LocalityName": "San Francisco"
}
]
}
}
Assistant
Responses are generated using AI and may contain mistakes.