Skip to main content
Learn about the /documents endpoint. The document object contains information from payroll documents that are retrieved and processed by Argyle after a user connects a payroll account. The contents of each specific document can be found in the document object’s metadata. High level structure of the documents object.

The document object

Attributes

  • id (string (uuid), optional): Unique ID of the document associated with a user’s payroll account.
  • account (string (uuid), optional): ID of the payroll account associated with the document.
  • employer (string, optional): The name of the company or entity that employs the user.
  • document_number (string, optional): The identification number on the document.
  • document_type_description (string, optional): A free-form text describing the document’s type—for example, W-2 Form 2019.
  • ocr_data (object, optional)
  • (note, optional)
  • form_type (note, optional)
  • omb_no (string, optional): OMB reference number.
  • year (string, optional): Calendar year.
  • form (object, optional): Information scanned from the payroll document.
  • recipient (object, optional)
  • name (string, optional): Recipient name, as it appears on the form.
  • address (note, optional)
  • payer (object, optional)
  • name (string, optional): Payer name, as it appears on the form.
  • address (note, optional)
  • warnings (array of objects, optional): Information on scan quality and missing fields.
  • field_name (string, optional): Which field encountered the error.
  • message (note, optional)
  • severity (note, optional)
  • confidence (note, optional)
  • ocr_page_count (integer, optional): Number of pages scanned.
  • error (note, optional)

{
"id": "110a6cd9-2cd5-3a8e-b8db-3fae4e96b58a",
"account": "e0c16ace-0628-25da-8928-5dffd7a7b1d1",
"employer": "walmart",
"created_at": "2020-11-18T12:27:30.478Z",
"updated_at": "2020-11-29T08:33:41.525Z",
"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": {}
},
null,
2
  

{
"id": "110a6cd9-2cd5-3a8e-b8db-3fae4e96b58a",
"account": "e0c16ace-0628-25da-8928-5dffd7a7b1d1",
"employer": "walmart",
"created_at": "2020-11-18T12:27:30.478Z",
"updated_at": "2020-11-29T08:33:41.525Z",
"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": {
  "ocr_data": {
"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
},
{
"field_name": "tips_8",
"message": "tips_8 value empty/bad format",
"severity": 0.0
},
{
"field_name": "benefits_10",
"message": "benefits_10 value empty/bad format",
"severity": 0.0
},
{
"field_name": "nonqualified_11",
"message": "nonqualified_11 value empty/bad format",
"severity": 0.0
},
{
"field_name": "uncollected_ss_RRTA_12a",
"message": "uncollected_ss_RRTA_12a value empty/bad format",
"severity": 0.0
},
{
"field_name": "uncollected_med_tax_12b",
"message": "uncollected_med_tax_12b value empty/bad format",
"severity": 0.0
},
{
"field_name": "insurance_12c",
"message": "insurance_12c value empty/bad format",
"severity": 0.0
},
{
"field_name": "plan_401k_12d",
"message": "plan_401k_12d value empty/bad format",
"severity": 0.0
},
{
"field_name": "employers_state_15",
"message": "employers_state_15 not found",
"severity": 0.0
},
{
"field_name": "state_wages_16",
"message": "state_wages_16 not found",
"severity": 0.0
},
{
"field_name": "state_income_tax_17",
"message": "state_income_tax_17 not found",
"severity": 0.0
},
{
"field_name": "other_14",
"message": "other_14 value empty/bad format",
"severity": 0.0
},
{
"field_name": "verification_9",
"message": "verification_9 value empty/bad format",
"severity": 0.0
},
{
"field_name": "omb_no",
"message": "omb_no not found",
"severity": 1.0
}
],
"confidence": "HIGH",
"ocr_page_count": 1
  }
}
},
null,
2
  

Retrieve a document

GET /v1/documents/{id}
  • Retrieve a document with the supplied ID.
  • This request returns a document object if you provided a valid identifier.

Path parameters

  • id (string (uuid), required): The identifier of the document to be retrieved.
curl --request GET \\
--url https://api.argyle.com/v1/documents/{id} \\
--header 'accept: application/json' \\
--header 'content-type: application/json'
  

{
  "id": "0180519e-71f0-14ed-72d6-e31cfc8ef22a",
  "account": "0180519e-64f5-0107-603a-a460f85c2c50",
  "document_number": "aa9d80be-dade-4b04-8017-665806691cc0",
  "document_type": "1099",
  "document_type_description": "1099 Form 2020",
  "expiration_date": null,
  "file_url": "www.documents-upload-holder.com",
  "employer": "amazin",
  "available_date": "2020-01-31T00:00:00Z",
  "metadata": {},
  "created_at": "2022-04-22T14:13:00.017Z",
  "updated_at": "2022-04-22T14:13:10.326Z"
},
null,
2
  

List documents

GET /v1/documents
  • List all documents.
  • This request returns an object with a results property that contains an array of up to limit document objects.

Query parameters

curl --request GET \\
--url https://api.argyle.com/v1/documents?limit=2 \\
--header 'accept: application/json' \\
--header 'content-type: application/json'
  

[
  {
"id": "0180519e-71f0-14ed-72d6-e31cfc8ef22a",
"account": "0180519e-64f5-0107-603a-a460f85c2c50",
"document_number": "aa9d80be-dade-4b04-8017-665806691cc0",
"document_type": "1099",
"document_type_description": "1099 Form 2020",
"expiration_date": null,
"file_url": "https://storage.googleapis.com/argyle-prod-storage-clean/scanner/sandbox/1099-misc-sarah.pdf?GoogleAccessId=argyle-storage-service-prod@argyle-api.iam.gserviceaccount.com&Expires=1650646843&Signature=ZdwjkQBuBfa17X62oYvLO5%2Bda%2F6oAPpHSWQLST1knNRBEoqONPfz0ErtDa2yQs9AclIcF9bu3JMrRLWw%2FWNTULtZo8P83G%2FkMFAW9dj1Xi8Y8eFLxhnp19OaNUpGwaSoZHij2Keu5KX7appE9iutfdLM30cGBvN992XHcSmh94bwXs0iPuWeWMlNZcDHL1q3tKZoLIdb8clxhU0c3q%2B3SBzdacwhMPem5%2FM7sLRLP5JxaCPu70n95FLU2rA7c72VefvOHvZyaUP%2BuJKU2oI%2FKNUfuO3wGocbCe6sQ2qNDJF0iHsJ%2Fepz%2FJ0sBSNMSX9u4yz8wWGuD2EnFWVKe5z%2FdA%3D%3D",
"employer": "amazin",
"available_date": "2020-01-31T00:00:00Z",
"metadata": {},
"created_at": "2022-04-22T14:13:00.017Z",
"updated_at": "2022-04-22T14:13:10.326Z"
  },
  {
"id": "0180519e-719d-2d39-ac17-e3750b386932",
"account": "0180519e-64f5-0107-603a-a460f85c2c50",
"document_number": "ef856a8a-f2a0-4804-a6fa-f36e89bfdf02",
"document_type": "W-2",
"document_type_description": "W-2 Form 2021",
"expiration_date": null,
"file_url": "https://storage.googleapis.com/argyle-prod-storage-clean/scanner/sandbox/w2-sarah.pdf?GoogleAccessId=argyle-storage-service-prod@argyle-api.iam.gserviceaccount.com&Expires=1650646843&Signature=qhCDnSd1CeTg70sOHOjWSEXaMoalNWCptEyRlN6KN4wBbtjwoxSKiMrmrqPq6zDs5WjtQhBckrtnejhL1YGKHK5KhC8uJT6DMuZuYypubaegXk2QBGL0CNR%2BgPAWGoGtn9O6ckwYmNrcdLHlCcgifByF19GQKJuxPHFSsNn%2BDmnOahxrH%2BJd2Nzf8%2Bq%2FZ1ajXf7B3xDbt7RGlPSTdhL1iQwErO1TXzE1l4r%2B1WP2oi%2BWgXSDR1eX5ZI99mf5ZdSz70gXMJbwntbcHIekUD69DrDhbX7KzVpRsYVkyzdqIFIl78vgGtFBRZLGQNFMj9m8aiIRAeq0bla2VernoCQZlA%3D%3D",
"employer": "amazon",
"available_date": "2021-01-31T00:00:00Z",
"metadata": {},
"created_at": "2022-04-22T14:12:59.933Z",
"updated_at": "2022-04-22T14:13:10.331Z"
  }
],
null,
2