> ## 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.

See [Verifications vs. Data APIs](https://docs.argyle.com/overview/verifications-vs-data-apis.md) to compare individual records with completed reports and choose your implementation path.

Users connect their payroll accounts through [Link](https://docs.argyle.com/link/overview.md). 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](https://docs.argyle.com/verifications/verification-types/banking.md). The account connection steps below apply to payroll data; for uploaded documents and OCR results, see [Document uploads](#document-uploads).

## Implementation path

**1. Create or reuse a user**

Reuse the person's existing [user ID](https://docs.argyle.com/overview/data-structure/users.md) if they have already used another product with your organization. Otherwise, [create a user](https://docs.argyle.com/api-reference/users/create-a-user.md) and store the returned ID with your internal record.

**2. Start the connection experience**

Create a [user token](https://docs.argyle.com/api-reference/user-tokens/create-a-user-token.md), then launch [embedded or hosted Link](https://docs.argyle.com/link/initialization/overview.md).

**3. Track connected accounts**

Subscribe to the [`accounts.added`](https://docs.argyle.com/api-reference/accounts-webhooks/added), [`accounts.updated`](https://docs.argyle.com/api-reference/accounts-webhooks/updated), and [`accounts.failed`](https://docs.argyle.com/api-reference/accounts-webhooks/failed) webhooks. Treat each connected account as an independent data source.

**4. Wait for the data you need**

Use resource webhooks and the [`users.fully_synced`](https://docs.argyle.com/api-reference/users-webhooks/fully-synced) webhook to determine when the required data is available. See [Data Delivery and Readiness](https://docs.argyle.com/overview/data-delivery.md).

**5. 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](https://docs.argyle.com/overview/data-structure/employments.md). An account can contain records from more than one job.

## Data structure

Argyle organizes connected payroll data around [users](https://docs.argyle.com/overview/data-structure/users.md), [accounts](https://docs.argyle.com/overview/data-structure/accounts.md), [employments](https://docs.argyle.com/overview/data-structure/employments.md), [data sets](https://docs.argyle.com/overview/data-structure/data-sets.md), and [Items](https://docs.argyle.com/overview/data-structure/items.md).

> [card] [Data Delivery and Readiness](https://docs.argyle.com/overview/data-delivery.md)
>
> Understand when initial data is available and which webhooks indicate progress.

> [card] [Ongoing Refresh](https://docs.argyle.com/overview/ongoing-refresh.md)
>
> Monitor connected accounts for new data and required reconnections.

## Document uploads

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

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

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

## Verticals

Some verticals use direct Data APIs; others use the Verifications lifecycle. [Explore Verticals](https://docs.argyle.com/verticals.md) 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](https://docs.argyle.com/verifications/overview.md).
