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

# Gig and Workforce

> Process gig, shift, vehicle, rating, and pay data from connected accounts.

Use the Data APIs to retrieve gig, shift, and pay records from accounts workers connect. Decide which records and how much history you need before choosing the webhooks to subscribe to.

## Define the data you need

Choose only the resources your application needs:

* [Gigs](/api-reference/gigs) and [Shifts](/api-reference/shifts) for work completed, payments, and scheduled shifts.
* [Identities](/api-reference/identities), [Paystubs](/api-reference/paystubs), [Payroll Documents](/api-reference/payroll-documents), and [Deposit Destinations](/api-reference/deposit-destinations) for worker and payment records.
* [Vehicles](/api-reference/vehicles) and [Ratings](/api-reference/ratings) when those resources are available from the connected source.

Resource availability and history vary by source. Check [Items](/api-reference/items) for the supported data sets and refresh behavior instead of assuming every connected account returns the same records.

## Connect worker accounts

1. Create a [user](/api-reference/users/create-a-user) and retain the ID in your system.
2. Launch [Link](/link/initialization/overview). Use [direct login](/workflows/account-connections#direct-login) when the application already knows the platform the worker needs to connect.
3. Let the worker connect every account required by the workflow.
4. Store and monitor each [account](/api-reference/accounts) independently.

## Choose a readiness window

Do not wait for complete account history when a recent window is sufficient:

* The [`gigs.partially_synced`](/api-reference/gigs-webhooks/partially-synced) webhook indicates that Gigs are available through the configured number of days for one newly connected account.
* The [`shifts.partially_synced`](/api-reference/shifts-webhooks/partially-synced) webhook provides the same control for Shifts.
* Use the corresponding fully-synced event when all available records for that resource are required.
* Use the [`users.fully_synced`](/api-reference/users-webhooks/fully-synced) webhook only when processing must wait for initial delivery from every newly connected payroll account.

Partial- and fully-synced events apply to initial delivery. Reconnection and ongoing updates use account and resource events instead.

## Process the event stream

Retrieve records through paginated list endpoints and process `.added`, `.updated`, and, where available, `.removed` events for the resources your application stores. Keep resource IDs so later events update or remove the correct record.

Subscribe to the [`accounts.updated`](/api-reference/accounts-webhooks/updated) webhook with `config.include_resource = true` and the [`accounts.removed`](/api-reference/accounts-webhooks/removed) webhook to track the connection lifecycle. Return the existing user to [Reconnect an Account](/workflows/reconnecting-accounts) when the worker needs to reauthenticate.

See [Data Delivery and Readiness](/overview/data-delivery) for initial synchronization and [Ongoing Refresh](/overview/ongoing-refresh) for new records after the initial delivery.
