>  Switch To Link 5 and API v2 Documentation

Retrieve Sample Employment Data

Learn how to retrieve employment data in the sandbox.

Argyle provides you with two ways to access employment data:

Sandbox vs. Production data#

Sample data returned in Sandbox mode is varied and randomized to help with testing purposes. This sample data does not mirror how a specific individual payroll provider would return data for connected accounts in Production mode.

For example, in Sandbox mode, pay data may be available on a monthly basis for a specific payroll provider. However, for real accounts connected to that payroll provider in Production mode, pay data could be available on a bi-weekly basis.

Prerequisites#

Before retrieving employment data, you must:

See sample data in Console#

Accessing user employment data in Console is easy. Follow these steps:

  1. Navigate to the Connections page of Console
  2. Select a user to see their employment data

Retrieve sample data via the API#

After your users connect their payroll accounts, your application can start using the Argyle API to retrieve information in their payroll accounts.

The Argyle API uses basic access authentication. You must specify your credentials with every request you make to the API.

Here's an example API call using curl:

1curl https://api-sandbox.argyle.com/v1/activities?account=account_id \
2-u your_client_id:your_client_secret

Before running the curl command make sure to replace your_client_id and your_client_secret with your own credentials, which you can access in Argyle Console.

The API call returns a JSON object that contains a list of activities performed by your users such as rideshare trips or e-shopping deliveries.

Here's an example response for the example request:

1// Activities API endpoint sample response
2
3{
4    "next": "http://api-sandbox.argyle.com/v1/activities?cursor=YMWjb3...",
5    "previous": null,
6    "results": [
7        {
8            "id": "0018cf02-f8d9-4a7b-9876-2f2167a4c0f5",
9            "account": "f15eec4c-7b39-48ac-8577-7385456591f4",
10            "created_at": "2019-04-19T11:14:13.708Z",
11            "start_date": "2018-04-10T06:46:00Z",
12            "end_date": "2018-04-10T06:46:00Z",
13            "income": {
14                "currency": "USD",
15                "total_charge": "67.93",
16                "fees": "0.00",
17          ...
18            },
19            "income_rates": {
20                "hour": "36.18",
21                "mile": "6.32",
22        ...
23            },
24        },
25     ...
26    ]
27}

This specific API call returns activities for all of your customers who have connected their payroll accounts through Argyle Link.

To learn more about how to filter activities for a specific user, retrieve other data such as user profiles or a list of your customer's vehicles, refer to the API Reference and Argyle Link documentation.

Updating Argyle status...
© 2024 Argyle Systems Inc.argyle.com