Activities

Learn about the /activities endpoint.

An activity is a single unit of work performed by a user at a company.

An activity object may represent a single task, as a shift, a job, or a batch of tasks depending on the company.

structure of the activities object

General attributes


ATTRIBUTETYPEDESCRIPTION
idstring uuidUnique ID of the activity associated with a user's payroll account.
accountstring uuidID of the payroll account associated with the activity.
employerstringThe name of the company or entity that employs the user.
link_itemstringID of the Link item (employer or payroll provider), that the user selected when connecting their account via Argyle Link. This value will oftentimes be human-readable.
data_partner
*deprecated
stringDeprecated in favor of link-item.
complete_data_available
*deprecated
booleanDeprecated field for a specific link-item.
statusstringThe current state of this activity.

Possible values: scheduled, in_progress, completed, cancelled.
typestringThe type of activity that the worker undertook.

Possible values: delivery, rideshare, hourly, services.
circumstancesobjectActivity-specific data attributes (metadata) provided by the Link item.
num_tasksintegerThe number of tasks performed. Will contain 1 if the activity object represents a single job (for example, a shift or trip). Will be 2 or more if the object represents an aggregate of tasks performed between start_datetime and end_datetime. It will contain null if the number of tasks performed is not known. This will be the case for companies that only provide aggregate data.
created_atstring
timestamp
Time at which the activity object was created. Timestamps follow the ISO 8601 standard.
updated_atstring
timestamp
Time at which the activity object was last updated. Timestamps follow the ISO 8601 standard.

Duration attributes


ATTRIBUTESTYPEDESCRIPTION
start_datestringTimestamp representing the start of the activity. Timestamps follow the ISO 8601 standard and are displayed in the UTC timezone.
end_datestringTimestamp representing the end of the activity. Timestamps follow the ISO 8601 standard and are displayed in the UTC timezone.
all_timestampsobjectThe various timestamps of events inside of the activity. These include:
shift_start
shift_end
break_start
break_end
breaks
request_at
accept_at
pickup_at
dropoff_at
cancel_at

Note that break_start and break_end return values for the first object in the breaks array.

The formatting of all_timestamps can vary depending on the payroll provider. See all_datetimes below for values formatted according to the ISO 8601 standard.
all_datetimesobjectSame attributes as in all_timestamps but all timestamps are converted to the ISO 8601 standard.
durationstring decimalDuration time for the activity displayed in seconds.
timezonetimezoneThe timezone of the activity. A list of possible time zone values is maintained at the IANA Time Zone Database.

Earnings attributes


ATTRIBUTESTYPEDESCRIPTION
earning_typestringThe reason for specific earning. Not all earnings are due to activities. Some are just bonuses after the fact, some are incentives to work on peak hours, etc. Possible values:

offer - not yet completed earning, but a promise to get money when work is completed.

work - earning for completed work.

incentive - incentive to work odd hours, etc.

adjustment - additional earning after the work (for example, to meet minimum wage).

other - any other value that doesn't fit in the above (for example, might be a work-related product purchase provided to the user by the company that is subtracted from the user's earnings).
incomeobjectAn object that contains information about the amount earned for an activity.
income.currencystringCurrency the income was received in—for example USD, EUR. Currencies follow the ISO 4217 format.
income.total_chargestring decimalThe amount the company associated with the Link Item has charged for an activity (inclusive of any fees).

income.total_charge = income.fees + income.total
income.feesstring decimalFees charged by the company associated with the Link Item (for example, Udre) for an activity assigned to the user.
income.totalstring decimalTotal amount received for this activity by a user: the sum of pay, tips, and bonus.
income.paystring decimalThe amount received for the job excluding tips, bonus, and fees.
income.tipsstring decimalThe amount of tips received for the activity.
income.bonusstring decimalThe amount of bonus payment received for the activity.
income_ratesobjectThis object contains income earned at a per hour and per mile rate. This value is not calculated, and is only returned if directly available from the payroll provider.

Start Location attributes


ATTRIBUTESTYPEDESCRIPTION
start_locationobjectThe geographical location of where the activity has started.
start_location.latstring decimalThe geographic latitude of where the activity started.
start_location.lngstring decimalThe geographic longitude of where the activity started.
start_location.formatted_addressstringFull address of where the activity started.

End Location attributes


ATTRIBUTESTYPEDESCRIPTION
end_locationobjectLocation of where the activity has ended.
end_location.latstring decimalThe geographic latitude of where the activity ended.
end_location.lngstring decimalThe geographic longitude of where the activity ended.
end_location.formatted_addressstringFull address of where the activity ended.

Travel attributes


ATTRIBUTESTYPEDESCRIPTION
routestringURL to the payroll provider page that contains the route of the activity.
distancestring decimalDistance traveled during the activity.
distance_unitstringDistance measurement unit for the activity.

Possible options: miles, km.
metadataobjectHolds additional available, often unstructured, information about this data resource.

Endpoints


These are the endpoints available for activities.

Endpoints
Retrieve an activity - GET /activities/:id
List activities - GET /activities

Example objects

{
    "id": "za332989-2315-48k1-b67y-36ec2d5481a1",
    "account": "1ee3ec90-0431-4fqa-a56e-8f9k74a2f707",
    "employer": "wellmart",
    "link_item": "wellmart",
    "created_at": "2020-04-01T14:13:47.804149Z",
    "updated_at": "2020-04-02T08:15:15.635636Z",
    "status": "completed",
    "type": "hourly",
    "circumstances": {
        "outside_of_prefered_hours": true
    },
    "num_tasks": 1,
    "start_date": "2020-04-01T08:05:12Z",
    "end_date": "2020-04-01T17:05:56Z",
    "all_timestamps": {
        "request_at": null,
        "accept_at": null,
        "pickup_at": null,
        "dropoff_at": null,
        "cancel_at": null,
        "shift_start": 1585728312,
        "break_start": 1585744704,
        "break_end": 1585746322,
        "breaks": [
            {
                "break_start": 1585744704,
                "break_end": 1585746322
            },
            {
                "break_start": 1585744714,
                "break_end": 1585746332
            }
        ],
        "shift_end": 1585760756
    },
    "all_datetimes": {
        "request_at": null,
        "accept_at": null,
        "pickup_at": null,
        "dropoff_at": null,
        "cancel_at": null,
        "shift_start": "2020-04-01T08:05:12Z",
        "break_start": "2020-04-01T12:38:24Z",
        "break_end": "2020-04-01T13:05:22Z",
        "breaks": [
            {
                "break_start": "2020-04-01T12:38:24Z",
                "break_end": "2020-04-01T13:05:22Z"
            },
            {
                "break_start": "2020-04-01T15:22:13Z",
                "break_end": "2020-04-01T15:51:59Z"
            }
        ],
        "shift_end": "2020-04-01T17:05:56Z"
    },
    "duration": 32444,
    "timezone": "America/Chicago",
    "earning_type": "work",
    "income": {
        "currency": "USD",
        "total_charge": null,
        "fees": null,
        "total": "180.00",
        "pay": "180.00",
        "tips": null,
        "bonus": null
    },
    "income_rates": {
        "hour": null,
        "mile": null
    },
    "start_location": null,
    "end_location": null,
    "route": null,
    "distance": null,
    "distance_unit": null,
    "metadata": {}
}
{
    "id": "da332189-a115-484e-b60b-36ec2d5481d5",
    "account": "9bb0ec90-03b1-4f8a-a72e-8f9f44a2f707",
    "employer": "udre",
    "link_item": "udre",
    "created_at": "2022-10-20T15:54:07.360Z",
    "updated_at": "2022-10-20T15:54:07.360Z",
    "status": "completed",
    "type": "rideshare",
    "circumstances": {
        "is_pool": false,
        "is_rush": false,
        "is_surge": false,
        "service_type": "UdreX"
    },
    "num_tasks": 1,
    "start_date": "2022-10-20T12:35:11Z",
    "end_date": "2022-10-20T13:15:56Z",
    "all_timestamps": {
        "request_at": 1666269311,
        "accept_at": 1666269315,
        "pickup_at": 1666269776,
        "dropoff_at": 1666271756,
        "cancel_at": null,
        "shift_start": null,
        "shift_end": null,
        "break_start": null,
        "break_end": null,
        "breaks": []
    },
    "all_datetimes": {
        "request_at": "2022-10-20T12:35:11Z",
        "accept_at": "2022-10-20T12:35:15Z",
        "pickup_at": "2022-10-20T12:42:56Z",
        "dropoff_at": "2022-10-20T13:15:56Z",
        "cancel_at": null,
        "shift_start": null,
        "shift_end": null,
        "break_start": null,
        "break_end": null,
        "breaks": []
    },
    "duration": 1618,
    "timezone": "America/Chicago",
    "earning_type": "work",
    "income": {
        "currency": "USD",
        "total_charge": "18.27",
        "fees": "0.00",
        "total": "18.27",
        "pay": "18.27",
        "tips": "0.00",
        "bonus": "0.00"
    },
    "income_rates": {
        "hour": "56.75",
        "mile": "8.32"
    },
    "start_location": {
        "lat": "42.58294677734375",
        "lng": "-77.70906829833984",
        "formatted_address": "10th St, Country Club Hills, IL 60478, USA"
    },
    "end_location": {
        "lat": "42.809085845947266",
        "lng": "-77.82435607910156",
        "formatted_address": "Clay Terrace, Lyons, IL 60534, USA"
    },
    "route": "https://partners.udre.com/p3/payments/trips/dde4c587-ffcf-4245-b414-781dcef483a1?in_app=true",
    "distance": "25.95",
    "distance_unit": "miles",
    "metadata": {
        "totalActualMileage": 25.95,
        "totalPlannedMileage": 26.33
    }
}