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

# The Shifts object

> Learn more about information related to ongoing and completed work shifts.

The Shifts endpoint includes time entries such as clock in and clock out, the type of work, and earnings. Shifts is related to the `link_id` from Truv's Income and Employment API.

## Attributes

The values in the table below cover attributes of Shifts.

| Attribute                     | Type                   | Description                                                                                        |
| :---------------------------- | :--------------------- | :------------------------------------------------------------------------------------------------- |
| count                         | integer                | Total number of results                                                                            |
| next                          | string, null           | Link to next page                                                                                  |
| previous                      | string, null           | Link to previous page                                                                              |
| results                       | array of objects       | List of shifts                                                                                     |
| id                            | string                 | Unique ID of shifts                                                                                |
| external\_id                  | string                 | External ID of selected shifts                                                                     |
| created\_at                   | string                 | Shift creation timestamp                                                                           |
| updated\_at                   | string                 | Shift update timestamp                                                                             |
| start\_date                   | string                 | Shift start date                                                                                   |
| end\_date                     | string                 | Shift end date                                                                                     |
| time\_entries                 | array of objects       | List of shift-related time entries                                                                 |
| time\_entries\[].id           | string                 | Unique time entry ID                                                                               |
| time\_entries\[].external\_id | string                 | Time entry external ID                                                                             |
| time\_entries\[].created\_at  | string                 | Time entry creation timestamp                                                                      |
| time\_entries\[].updated\_at  | string                 | Time entry update timestamp                                                                        |
| time\_entries\[].entry\_date  | string                 | Entry date of event in time tracking system                                                        |
| time\_entries\[].start        | string                 | Date and time when work shift started                                                              |
| time\_entries\[].end          | string                 | Date and time when work shift ended                                                                |
| earnings                      | array of objects       | Aggregated earnings for shift                                                                      |
| earnings\[].name              | string                 | Name of earnings (required)                                                                        |
| earnings\[].amount            | string (decimal)       | Amount of earnings (required)                                                                      |
| earnings\[].category          | string                 | Category of earnings (required), one of: `regular`, `overtime`, `bonus`, `commission`, `other_pay` |
| earnings\[].rate              | string (decimal), null | Rate of earnings                                                                                   |
| earnings\[].units             | string (decimal), null | Units of earnings                                                                                  |
| type                          | string                 | Type of shift, four types of shifts available: `other`, `delivery`, `rideshare`, `shift`           |

***

## Endpoint

The item below is the available endpoint for Shifts.

* [List all shifts](/api-reference/shifts/link-shifts)

***

## Example response

The response object below is the returned JSON value.

```json theme={null}
{
  "count": 0,
  "next": null,
  "previous": null,
  "results": []
}
```
