> ## Documentation Index
> Fetch the complete documentation index at: https://docs.argyle.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Data APIs

> Retrieve payroll records, uploaded documents, and OCR results.

Use the Data APIs when your application needs payroll records, uploaded documents, or OCR results for its own workflow.

Users connect their payroll accounts through [Link](/link/overview). Your application tracks each account independently, waits for the required data, and retrieves the relevant resources from the API.

<Note>
  The Data APIs workflow on this page does not apply to banking. For bank connections and reports, use [Banking Verifications](/verifications/verification-types/banking). The account connection steps below apply to payroll data; for uploaded documents and OCR results, see [Document uploads](#document-uploads).
</Note>

## Implementation path

<Steps>
  <Step title="Create or reuse a user">
    Reuse the person's existing [user ID](/overview/data-structure/users) if they have already used another product with your organization. Otherwise, [create a user](/api-reference/users/create-a-user) and store the returned ID with your internal record.
  </Step>

  <Step title="Start the connection experience">
    Create a [user token](/api-reference/user-tokens/create-a-user-token), then launch [embedded or hosted Link](/link/initialization/overview).
  </Step>

  <Step title="Track connected accounts">
    Subscribe to the [`accounts.added`](/api-reference/accounts-webhooks/added), [`accounts.updated`](/api-reference/accounts-webhooks/updated), and [`accounts.failed`](/api-reference/accounts-webhooks/failed) webhooks. Treat each connected account as an independent data source.
  </Step>

  <Step title="Wait for the data you need">
    Use resource webhooks and the [`users.fully_synced`](/api-reference/users-webhooks/fully-synced) webhook to determine when the required data is available. See [Data Delivery and Readiness](/overview/data-delivery).
  </Step>

  <Step title="Retrieve data sets">
    Retrieve identities, paystubs, payroll documents, gigs, shifts, vehicles, ratings, and other available resources through the corresponding endpoints.

    When using identities with paystubs or payroll documents, use the `employment` field to [match records for the same employment](/overview/data-structure/employments). An account can contain records from more than one job.
  </Step>
</Steps>

## Data structure

Argyle organizes connected payroll data around [users](/overview/data-structure/users), [accounts](/overview/data-structure/accounts), [employments](/overview/data-structure/employments), [data sets](/overview/data-structure/data-sets), and [Items](/overview/data-structure/items).

<CardGroup cols={2}>
  <Card title="Data Delivery and Readiness" icon="clock" href="/overview/data-delivery">
    Understand when initial data is available and which webhooks indicate progress.
  </Card>

  <Card title="Ongoing Refresh" icon="rotate" href="/overview/ongoing-refresh">
    Monitor connected accounts for new data and required reconnections.
  </Card>
</CardGroup>

## Document uploads

Users can upload documents through [Link](/workflows/document-processing#user-uploads-within-link), or you can [upload files through the API](/api-reference/user-uploads/upload-a-document). A payroll connection is not required.

Retrieve the files through [User Uploads](/api-reference/user-uploads). When OCR is enabled, use [OCR webhooks](/integrations/ocr/ocrolus#ocr-webhooks) to track processing and retrieve the results from `metadata.ocr_documents[]` on the upload object.

See [Document Uploads](/workflows/document-processing) for setup instructions and [OCR and Authenticity](/integrations/ocr/ocrolus) for result fields and errors.

## Verticals

Some verticals use direct Data APIs; others use the Verifications lifecycle. [Explore Verticals](/verticals) to find implementation guidance for your industry or program.

<Note>
  If you need a standardized verification lifecycle and report instead of direct resource retrieval, start with [Verifications](/verifications/overview).
</Note>
