Documents

Learn about the /documents endpoint.

Document objects contain information related to a user's identifying documents associated with a particular Link item.

Attributes

id string uuid

Unique ID of the document associated with a user's data partner account.


account string uuid

ID of the account associated with the document.


employer string

The name of the company or entity that employs the user.


document_number string

The identification number on the document.


document_type string

Describes the document type.

Possible values: W-2, payout-statement, W-4, W-9, 1099, 1095, profile-picture, drivers-licence, vehicle-insurance, vehicle-registration, vehicle-inspection, other.


document_type_description string

A free-form text describing the document's type—for example, W-2 Form 2019.


expiration_date string

The expiration date of the document. Timestamps follow the ISO 8601 standard.


available_date string

Represents the timestamp when the document was made available to the employee.


file_url string optional

If available, file_url contains a direct link to the file. This link is valid for 15 minutes. When it expires, you can call the documents endpoint again to generate another valid URL.


metadata string

Metadata holds additional available, often unstructured, information about this data resource.


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.


ocr_data example object for W-2 form
{
   "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
}


Endpoints

Endpoints

Retrieve a document - GET /documents/:id

List documents - GET /documents

Example object

{
   "id":"110a6cd9-2cd5-3a8e-b8db-3fae4e96b58a",
   "account":"e0c16ace-0628-25da-8928-5dffd7a7b1d1",
   "employer":"walmart",
   "created_at":"2020-11-18T12:27:30.478199Z",
   "updated_at":"2020-11-29T08:33:41.525392Z",
   "document_number":"T1234567",
   "document_type":"W-2",
   "document_type_description":"W-2 Form 2019",
   "expiration_date":"null",
   "available_date":"2020-02-15T00:00:00Z",
   "file_url":"https://argyle-api-prod-uploads.storage.googleapis.com/e0c16ace-0628-25da-8928-5dffd7a7b1d1-20200016",
   "metadata":{}
}