OCR API Reference

Learn about endpoints specific to OCR for Documents.

OCR for Documents enhances the existing documents endpoint, as well as the forms endpoint by providing data retrieved through the OCR process as an optional ocr_data object within the metadata field.

📘

You can find example ocr_data objects for each supported form type in the Type-specific Reference page.


Documents

Document objects contain information related to a user's identifying documents scanned by Argyle from a connected account.

Only ocr_data attributes are described on this reference page. For a more detailed description of the documents endpoint, please check the API Reference.


Attributes


documents.metadata.ocr_data object optional

The ocr_data object describes the contents of the document retrieved through the OCR process.

The object will be null if the document was not scanned with OCR.


W-2 form example
{
   "form_type":"W-2",
   "omb_no":null,
   "year":"2019",
   "form":{
      "recipient":{
         "name":"John Smith",
         "address":{
            "city":"Norton",
            "country":null,
            "line1":"4 Jackson St",
            "line2":null,
            "postal_code":"75211",
            "state":"MA"
         }
      },
      "recipient_tin":"123-12-1234",
      "payer":{
         "name":"EAST COAST ASSEMBLERS INC",
         "address":{
            "city":"Lake Worth",
            "country":null,
            "line1":"6586 Hypolouxo Road",
            "line2":"Suite 145",
            "postal_code":"33467",
            "state":"FL"
         }
      },
      "payer_tin":"20-0388460",
      "control_no_d":"86O78 6805",
      "comp_1":"1540.83",
      "fed_income_tax_2":"147.41",
      "ss_wages_3":"1540.83",
      "ss_tax_4":"95.53",
      "med_wages_5":"1540.83",
      "med_tax_6":"22.34",
      "ss_tips_7":null,
      "tips_8":null,
      "verification_9":null,
      "benefits_10":null,
      "nonqualified_11":null,
      "uncollected_ss_RRTA_12a":null,
      "uncollected_med_tax_12b":null,
      "insurance_12c":null,
      "plan_401k_12d":null,
      "other_14":null,
      "employers_state_15":null,
      "state_wages_16":null,
      "state_income_tax_17":null,
      "local_wages_18":"N/A",
      "local_income_tax_19":"N/A",
      "locality_name_20":"N/A"
   },
   "warnings":[
      {
         "field_name":"ss_tips_7",
         "message":"ss_tips_7 value empty/bad format",
         "severity":0.0
      }
   ],
   "confidence":"HIGH",
   "ocr_page_count":1
}


Forms

Form objects contain information related to a user's identifying documents that were uploaded by your user through the document upload flow. Refer to the Document Upload guide for more details.

Only ocr_data attributes are described on this reference page. For a more detailed description of the forms endpoint, please check the API Reference.


Attributes


forms.data.form_1099.metadata.ocr_data object optional

The ocr_data object describes the contents of a 1099 form retrieved through the OCR process.

The object will be null if the document was not scanned with OCR.


forms.data.form_w2.metadata.ocr_data object optional

The ocr_data object describes the contents of a W-2 form retrieved through the OCR process.

The object will be null if the document was not scanned with OCR.


1099-NEC form example
{
   "form_type":"1099-NEC",
   "omb_no":"1545-0116",
   "year":"2020",
   "form":{
      "recipient":{
         "name":"John Smith",
         "address":{
            "city":"Norton",
            "country":null,
            "line1":"4321 S. Jackson St Apt 987C",
            "line2":null,
            "postal_code":"45678",
            "state":"MA"
         }
      },
      "recipient_tin":"***-**-0193",
      "payer":{
         "name":"Peak Performance Publishing LLC",
         "address":{
            "city":"Ambler",
            "country":null,
            "line1":"118 Mary Ambler Way",
            "line2":null,
            "postal_code":"19002",
            "state":"PA"
         }
      },
      "payer_tin":"46-5237939",
      "account_no":"zeno000046945",
      "comp_1":"22796.50",
      "fed_inc_tax_4":"0.00",
      "state_tax_5":null,
      "state_no_6":null,
      "state_inc_7":null
   },
   "warnings":[
      {
         "field_name":"state_inc_7",
         "message":"state_inc_7 value empty/bad format",
         "severity":0.0
      }
   ],
   "confidence":"EXACT_MATCH",
   "ocr_page_count":1
}