> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://paylocity.ferndocs.com/time-labor/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://paylocity.ferndocs.com/time-labor/_mcp/server.

# Get Employee Shifts

GET https://api.paylocity.com/apiHub/scheduling/v1/companies/{companyId}/employees/{employeeId}/shifts

This resource is in closed beta.  Paylocity Technology Partners interested may contact the marketplace team to explore early adopter opportunities at [marketplaceapisupport@paylocity.com](mailto:marketplaceapisupport@paylocity.com)

**Summary Description**

The GET Employee Shifts API endpoint detailed information about the shifts assigned to an individual employee. This endpoint is essential for tracking, analyzing, and managing an employee's schedule. The detailed shift information includes start and end times, roles, required skills, and location details.

**The use cases:**

* Employees can use this endpoint to view their upcoming shifts, including start and end times, roles, and locations. Enhances employee awareness of their schedule, reducing missed shifts and improving punctuality
* Managers can access the shifts of individual employees to ensure adequate staffing and workload distribution. Facilitates effective shift management and helps avoid over-scheduling or under-utilization of staff
* When scheduling new shifts, managers can use this endpoint to check for conflicts with an employee's existing shifts. Prevents scheduling overlaps, ensuring that employees are not double-booked.

Reference: https://paylocity.ferndocs.com/time-labor/api-reference/paylocity-ap-is/scheduling/get-employee-shifts

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `companyId` (string, required)
- `employeeId` (string, required)

### Query parameters

- `include` (string, optional) — The sub-resources to include in the response. - sub-resources: breaks, segments, note
- `filter` (string, optional) — A parseable filter expression involving fields, operators, and values to filter the result list by. - fields: startDateTime, positionKey - operators: eq, in, lt, gt, le, ge, and, or
- `includeTotalCount` (string, optional) — When provided and set to true will cause the API to return the X-Pcty-Total-Count header in the response which will be set to the total number of resources available even if only a subset of those were returned. The default is false.
- `limit` (string, optional) — The maximum number of resources to include in the response. The default is 25.
- `offset` (string, optional) — The number of resources to skip when returning paginated results. The default is 0.
- `sort` (string, optional) — A comma-separated, xpath-like formatting string that identifies the fields that you want the API to use for sorting the resources when they are returned. The default value can vary from API to API.

### Headers

- `Accept` (string, optional)

## Response

### 200

Successful response

## Examples

**Response**

```json
{}
```

**SDK Code**

```python
import requests

url = "https://api.paylocity.com/apiHub/scheduling/v1/companies/companyId/employees/employeeId/shifts"

querystring = {"include":"<string>","filter":"<string>","includeTotalCount":"<boolean>","limit":"<integer>","offset":"<integer>","sort":"<string>"}

headers = {
    "Accept": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://api.paylocity.com/apiHub/scheduling/v1/companies/companyId/employees/employeeId/shifts?include=%3Cstring%3E&filter=%3Cstring%3E&includeTotalCount=%3Cboolean%3E&limit=%3Cinteger%3E&offset=%3Cinteger%3E&sort=%3Cstring%3E';
const options = {
  method: 'GET',
  headers: {Accept: 'application/json', Authorization: 'Bearer <token>'}
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.paylocity.com/apiHub/scheduling/v1/companies/companyId/employees/employeeId/shifts?include=%3Cstring%3E&filter=%3Cstring%3E&includeTotalCount=%3Cboolean%3E&limit=%3Cinteger%3E&offset=%3Cinteger%3E&sort=%3Cstring%3E"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Accept", "application/json")
	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.paylocity.com/apiHub/scheduling/v1/companies/companyId/employees/employeeId/shifts?include=%3Cstring%3E&filter=%3Cstring%3E&includeTotalCount=%3Cboolean%3E&limit=%3Cinteger%3E&offset=%3Cinteger%3E&sort=%3Cstring%3E")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.paylocity.com/apiHub/scheduling/v1/companies/companyId/employees/employeeId/shifts?include=%3Cstring%3E&filter=%3Cstring%3E&includeTotalCount=%3Cboolean%3E&limit=%3Cinteger%3E&offset=%3Cinteger%3E&sort=%3Cstring%3E")
  .header("Accept", "application/json")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.paylocity.com/apiHub/scheduling/v1/companies/companyId/employees/employeeId/shifts?include=%3Cstring%3E&filter=%3Cstring%3E&includeTotalCount=%3Cboolean%3E&limit=%3Cinteger%3E&offset=%3Cinteger%3E&sort=%3Cstring%3E', [
  'headers' => [
    'Accept' => 'application/json',
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.paylocity.com/apiHub/scheduling/v1/companies/companyId/employees/employeeId/shifts?include=%3Cstring%3E&filter=%3Cstring%3E&includeTotalCount=%3Cboolean%3E&limit=%3Cinteger%3E&offset=%3Cinteger%3E&sort=%3Cstring%3E");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Accept": "application/json",
  "Authorization": "Bearer <token>"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.paylocity.com/apiHub/scheduling/v1/companies/companyId/employees/employeeId/shifts?include=%3Cstring%3E&filter=%3Cstring%3E&includeTotalCount=%3Cboolean%3E&limit=%3Cinteger%3E&offset=%3Cinteger%3E&sort=%3Cstring%3E")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```