### Get Company Business Units Example Source: https://developer.paylocity.com/integrations/reference/compliancebusinessunitsget This example demonstrates how to retrieve a paginated list of business units for a given company ID. Ensure you include the Authorization header with your Bearer token. ```json { "openapi": "3.0.4", "info": { "title": "Background Check API", "version": "v1" }, "servers": [ { "url": "dc1demogwext.paylocity.com" } ], "paths": { "/compliance/v1/companies/{companyId}/businessUnits": { "get": { "tags": [ "Business Unit" ], "summary": "Get Company Business Units", "description": "> 🚧 Partner Restricted > All background check API endpoints are restricted to background check providers that have signed a Paylocity technology partnership agreement. Please reach out to Techpartnerships@paylocity.com if you would like to discuss partnership opportunities. **Summary Description** This endpoint returns all businessUnits for the companyId querying **Use Cases** - Partner needs to confirm all businessUnits have been added into Paylocity for a client - Partner needs to confirm the status of businessUnits that have been added for a client", "x-explorer-enabled": false, "operationId": "ComplianceBusinessUnitsGet", "parameters": [ { "name": "companyId", "in": "path", "description": "The Paylocity Company Identifier. This is the unique value provided by Paylocity to each specific Payroll Entity.\r\n **Allowable Values:**\r\n 9 char max", "required": true, "schema": { "type": "string" }, "example": "A12345" }, { "name": "testMode", "in": "header", "description": "If true all responses are mocked and generated randomly.", "schema": { "type": "boolean" }, "example": false }, { "name": "includeTotalCount", "in": "query", "description": "If true it will add X-Pcty-Total-Count header with total count for this specific query.", "schema": { "type": "boolean" }, "example": true }, { "name": "offset", "in": "query", "description": "Pagination offset.", "schema": { "type": "integer", "format": "int32", "default": 0 }, "example": 0 }, { "name": "limit", "in": "query", "description": "Pagination limit. Max value 100.", "schema": { "type": "integer", "format": "int32", "default": 50 }, "example": 50 }, { "name": "Authorization", "in": "header", "description": "Authorization token. Ex. Bearer ...", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Returns the business units for the companyId", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PartnerBusinessUnitResponseDtoPaginatedResult" }, "examples": { "TwoUnitsPage": { "summary": "Page with two partner business units.", "value": { "count": 2, "offset": 0, "limit": 100, "items": [ { "businessUnitId": "BU-001", "businessUnitName": "Finance", "isActive": true, "description": "Finance department", "createdAt": "2025-11-11T10:00:00Z", "updatedAt": "2025-11-12T10:00:00Z" }, { "businessUnitId": "BU-002", "businessUnitName": "HR", "isActive": true, "description": "Human Resources", "createdAt": "2025-11-11T10:00:00Z", "updatedAt": "2025-11-13T10:00:00Z" } ] } } } } } }, "400": { "description": "Bad Request Error - Returns the details of the error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GenericErrorResponse" }, "examples": { "MissingRequiredField": { "summary": "A required field is missing in the request payload.", "value": { "code": "400", "message": "Missing required field: companyId" } } } } } } } } } } } ``` -------------------------------- ### Get Training Content [Batch] Response Structure (JSON) Source: https://developer.paylocity.com/integrations/reference/lms-api-overview This is an example of the JSON response structure when retrieving details about a client's media content library by company ID. ```json { "models": [ { "contentId": "string", "title": "string", "description": "string", "url": "string", "fileId": "string", "duration": 0 } ] } ``` -------------------------------- ### Example Date Range Parameters Source: https://developer.paylocity.com/integrations/reference/get_apihub_time_v2_companies_companyid_employees_employeeid_punchdetails Illustrates the format for specifying the start and end of a date range for filtering punch details. Ensure the date-time format is ISO 8601 compliant. ```JSON "relativeStart": "2024-03-05T00:00:00" ``` ```JSON "relativeEnd": "2024-03-05T23:59:00" ``` -------------------------------- ### Get Employee Earnings Source: https://developer.paylocity.com/integrations/reference/get_apihub-payroll-v1-companies-companyid-employees-employeeid-earnings This example demonstrates how to retrieve a list of active earnings for a specific employee. It includes parameters for company ID, employee ID, and optional query parameters for filtering and pagination. ```json { "openapi": "3.0.4", "info": { "title": "Pay Setup API", "version": "v1" }, "servers": [ { "url": "dc1demogwext.paylocity.com" } ], "paths": { "/apiHub/payroll/v1/companies/{companyId}/employees/{employeeId}/earnings": { "get": { "tags": [ "Recurring Earnings" ], "summary": "Get Employee Earnings [Batch]", "description": "**Summary Description**\n\nThis function will allow the API user to GET a list of all active earnings associated with the employee record.", "x-explorer-enabled": false, "parameters": [ { "name": "companyId", "in": "path", "description": "The Paylocity Company Identifier. This is the unique value provided by Paylocity to each specific Payroll Entity.\r\n **Allowable Values:**\r\n 9 char max", "required": true, "schema": { "type": "string" }, "example": "A12345" }, { "name": "employeeId", "in": "path", "description": "A filter to use to limit results to a specific employee.\r\n **Allowable Values:**\r\n 255 char max", "required": true, "schema": { "type": "string" } }, { "name": "testMode", "in": "header", "description": "If true all responses are mocked and generated randomly", "schema": { "type": "boolean" } }, { "name": "filter", "in": "query", "description": "The API Filter, by defining specific conditions, enables developers to fine-tune data from API calls for more precise results, enhancing application efficiency and user-friendliness. For more information review the Filtering page", "schema": { "type": "string" } }, { "name": "limit", "in": "query", "description": "Number of results per page.\r\n **Default Value:** 250\r\n **Maximum Value:** 250", "schema": { "type": "integer", "format": "int32", "default": 20 }, "example": 5 }, { "name": "offset", "in": "query", "description": "Pagination offset", "schema": { "type": "integer", "format": "int32", "default": 0 } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/GetEarningDto" } }, "examples": { "Multiple Active Earnings": { "value": [ { "id": "1fa85f64-5717-4562-b3fc-2c963f66afa6", "companyId": "A12345", "employeeId": "EMP12345", "code": "OT", "frequency": "PerPayPeriod", "selfInsured": false, "recordType": "Current", "rate": 45, "calculationCode": "HOURLY", "units": 10, "rateCode": "OT1.5", "effectiveDate": "2024-01-01T00:00:00", "beginCheckDate": "2024-01-15T00:00:00", "endCheckDate": "2024-12-31T00:00:00" }, { "id": "2fb85f64-5717-4562-b3fc-2c963f66afa7", "companyId": "A12345", "employeeId": "EMP12345", "code": "BONUS", "frequency": "OneTime", "selfInsured": false, "recordType": "Current", "amount": 5000, "calculationCode": "FLAT", "effectiveDate": "2024-03-01T00:00:00", "beginCheckDate": "2024-03-15T00:00:00" }, { "id": "3fc85f64-5717-4562-b3fc-2c963f66afa8", "companyId": "A12345", "employeeId": "EMP12345", "code": "COMM", "frequency": "Monthly", "selfInsured": false, "recordType": "Current", "amount": 2500, "calculationCode": "FLAT", "effectiveDate": "2024-03-01T00:00:00", "beginCheckDate": "2024-03-15T00:00:00" } ] } } } } } } } } } } ``` -------------------------------- ### Get Client Onboardings - OpenAPI Definition Source: https://developer.paylocity.com/integrations/reference/get_apihub-security-v1-companies-b6001-clientonboardings This is the OpenAPI 3.0.4 definition for the Partner Onboarding API, detailing the GET endpoint for client onboardings. ```json { "openapi": "3.0.4", "info": { "title": "Partner Onboarding API", "version": "v1" }, "servers": [ { "url": "dc1demogwext.paylocity.com" } ], "paths": { "/apiHub/security/v1/companies/b6001/clientOnboardings": { "get": { "tags": [ "Client Onboarding" ], "summary": "Get Onboarding Status", "description": "> 🚧 Partner Restricted\n> \n> The Partner Onboarding API is only available to approved partners who have signed a Paylocity Technology Partnership Agreement. If you are not yet a partner and are interested in exploring partnership opportunities, please contact us at [Techpartnerships@paylocity.com](mailto:Techpartnerships@paylocity.com) \n\n**Summary Description**\n\nThe new Partner Onboarding API is designed to enable our partners to onboard customers through our Paylocity Marketplace-initiated workflow. Approved partners will utilize the API to provision a client onto a specific integration. This endpoint allows partners to get their onboardings with an option of filtering by companyId and status.\n", "parameters": [ { "name": "filter", "in": "query", "description": "The filtering expression ( e.g. companyId eq b6001, status eq Approved ).", "schema": { "type": "string" } }, { "name": "limit", "in": "query", "description": "Limit.", "schema": { "type": "integer", "format": "int32", "default": 50 } }, { "name": "offset", "in": "query", "description": "Offset.", "schema": { "type": "integer", "format": "int32", "default": 0 } }, { "name": "includeTotalCount", "in": "query", "description": "Include total items count into response as a header.", "schema": { "type": "boolean", "default": false } }, { "name": "testMode", "in": "header", "description": "If true all responses are mocked and generated randomly.", "schema": { "type": "boolean", "default": false } } ], "responses": { "200": { "description": "OK - Returns client onboardings.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ClientOnboardingDtoDtoPage" }, "examples": { "Multiple Onboardings": { "value": { "items": [ { "companyId": "A00123", "status": "Approved" }, { "companyId": "B00456", "status": "InProgress" }, { "companyId": "C00789", "status": "Rejected" } ], "totalCount": 3 } }, "Filtered by Status - Approved": { "value": { "items": [ { "companyId": "A00123", "status": "Approved" }, { "companyId": "A00124", "status": "Approved" } ], "totalCount": 2 } }, "Empty Result": { "value": { "items": [], "totalCount": 0 } } } } } }, "400": { "description": "Bad Request - Returns the details of the error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GenericErrorResponse" }, "examples": { "Invalid CompanyId Format": { "value": { "correlationId": "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3g4h5i6", "values": [ { "code": "BadRequest", "message": "Invalid companyId format. CompanyId must be alphanumeric with maximum 9 characters." } ] } } } } } } } } } } } ``` -------------------------------- ### Get Earning by Earning Code and Start Date Source: https://developer.paylocity.com/integrations/reference/get-earning-by-earning-code-and-start-date Retrieves the single earning with the provided earning code and start date for the selected employee. ```APIDOC ## GET /v2/companies/{companyId}/employees/{employeeId}/earnings/{earningCode}/{startDate} ### Description Get Earnings returns the single earning with the provided earning code and start date for the selected employee. ### Method GET ### Endpoint /v2/companies/{companyId}/employees/{employeeId}/earnings/{earningCode}/{startDate} ### Parameters #### Path Parameters - **companyId** (string) - Required - The Paylocity Company Identifier. This is the unique value provided by Paylocity to each specific Payroll Entity. 9 char max - **employeeId** (string) - Required - The Paylocity Employee ID. This is a unique value per Paylocity Company ID. 10 char max - **earningCode** (string) - Required - Earning Code - **startDate** (string) - Required - Start Date #### Response #### Success Response (200) - **earningCode** (string) - Description - **startDate** (string) - Description - **agency** (string) - Description #### Error Response - **401** - Unauthorized - **403** - Forbidden - **404** - The employee does not exist, or the specified earningCode-startDate combination does not exist - **429** - Too Many Requests - **500** - Internal Server Error ``` -------------------------------- ### Create Training Content (Single) Source: https://developer.paylocity.com/integrations/reference/lms-api-overview Use this endpoint to add external media content directly to a customer's LMS library. Ensure 'fileDetails.length' matches the exact file size for preview functionality. The 'training' object can be included to add content to on-demand trainings. ```json { "title": "test", "description": "my test", "url": " "contentType": 3, "fileDetails": { "name": "myFile.zip", "length": 1024, "contentType": "zip" } }, "training"{ "name": "my training content" } ``` -------------------------------- ### Get Earning by Earning Code and Start Date Source: https://developer.paylocity.com/integrations/reference/get-earning-by-earning-code-and-start-date This operation retrieves a single earning record for an employee, identified by their earning code and a specific start date. ```APIDOC ## Get Earning by Earning Code and Start Date ### Description Get Earnings returns the single earning with the provided earning code and start date for the selected employee. ### Method GET ### Endpoint /api/v1/employees/{employeeId}/earnings?earningCode={earningCode}&startDate={startDate} ### Parameters #### Query Parameters - **earningCode** (string) - Required - The earning code to filter by. - **startDate** (string) - Required - The start date to filter by (format: YYYY-MM-DD). #### Path Parameters - **employeeId** (string) - Required - The ID of the employee. ### Response #### Success Response (200) - **earningCode** (string) - The code for the earning. - **startDate** (string) - The start date of the earning. - **amount** (number) - The amount of the earning. - **description** (string) - A description of the earning. ``` -------------------------------- ### Upload Training Content using Signed URL (C#) Source: https://developer.paylocity.com/integrations/reference/lms-api-overview Uploads the physical file to the customer content library using a signed URL generated in a previous step. Ensure the Content-Type header matches the one in the payload. ```csharp // Retrieve the signed upload URL from the creation response. var fileUploadUrl = createResponse.FileUploadDetails.Strategies.Signed.Url; // Create a PUT request to the signed URL using the file content. // The Content-Type header is set using the value from the payload's FileDetails. using (var httpClient = new HttpClient()) { var fileUploadRequest = new HttpRequestMessage(HttpMethod.Put, fileUploadUrl) { Content = new ByteArrayContent(fileContent) }; fileUploadRequest.Content.Headers.ContentType = new MediaTypeHeaderValue(payload.FileDetails.ContentType); // Execute the file upload. var fileUploadResponse = await httpClient.SendAsync(fileUploadRequest); // The file upload response is expected to return an HTTP 200 (OK) status. } ``` -------------------------------- ### Get Client Onboardings Source: https://developer.paylocity.com/integrations/reference/get_apihub-security-v1-companies-b6001-clientonboardings Retrieves a list of client onboardings. Supports filtering by company ID and status. ```APIDOC ## GET /companies/{b6001}/clientonboardings ### Description Retrieves a list of client onboardings. Supports filtering by company ID and status. ### Method GET ### Endpoint /companies/{b6001}/clientonboardings ### Query Parameters - **companyId** (string) - Optional - Filters the results by company ID. - **status** (string) - Optional - Filters the results by onboarding status. Allowed values: InProgress, Approved, Rejected, Suspended. ### Response #### Success Response (200) - **items** (array) - A list of ClientOnboardingDto objects. - **totalCount** (integer) - The total number of client onboardings matching the filter criteria. #### Response Example { "items": [ { "companyId": "string", "status": "InProgress" } ], "totalCount": 10 } #### Error Response (400) - **correlationId** (string) - Unique identifier for the request. - **values** (array) - A list of ErrorDto objects detailing the errors. #### Error Response Example { "correlationId": "b2c3d4e5-f6g7-48h9-i0j1-k2l3m4n5o6p7", "values": [ { "code": "BadRequest", "message": "OnboardingStatus must be one of: InProgress, Approved, Rejected, Suspended" } ] } ``` -------------------------------- ### Get Employee Shifts Source: https://developer.paylocity.com/integrations/reference/get_apihub_scheduling_v1_companies_companyid_employees_employeeid_shifts Fetches all shifts for a given employee within a company. Supports filtering by start date and position. ```APIDOC ## GET /companies/{companyId}/employees/{employeeId}/shifts ### Description Retrieves a list of shifts for a specific employee. ### Method GET ### Endpoint /companies/{companyId}/employees/{employeeId}/shifts ### Parameters #### Path Parameters - **companyId** (string) - Required - The unique identifier for the company. - **employeeId** (string) - Required - The unique identifier for the employee. #### Query Parameters - **startDateTime** (string) - Optional - Filter shifts by start date and time. Accepts date-time in ISO 8601 format. Supports operators: gt, ge, lt, le. - **positionKey** (integer) - Optional - Filter shifts by position. Accepts numeric key. Supports operators: eq, in. ### Response #### Success Response (200) - **stackId** (string) - Unique identifier for the stack. - **assignedTo** (object) - Details of the employee assigned to the shift. - **employeeId** (string) - Unique identifier for the employee. - **firstName** (string) - The first name of the employee. - **lastName** (string) - The last name of the employee. - **middleName** (string) - The middle name of the employee. - **displayName** (string) - The display name of the employee. - **suffix** (string) - The suffix of the employee's name. - **startDateTime** (string) - The scheduled start date and time for the shift, in ISO 8601 format. - **duration** (integer) - The length of time the shift is scheduled to take, measured in minutes. - **hasNote** (boolean) - Indicates whether there is an additional note attached to the shift. - **note** (string) - The content of the additional note, if any. - **isEmployeeNote** (boolean) - Indicates whether the note is made by the employee. - **costCenters** (array) - A list of identifiers for cost centers associated with the shift. - items (string) - UUID of the cost center. - **positionKey** (integer) - Numeric key representing the position associated with the shift. - **breaks** (array) - A list of breaks associated with the shift. - items (object) - Details of a shift break. - **breakId** (string) - Unique identifier for the break. - **templateAssignmentId** (string) - Unique identifier for a template assignment associated with the break. - **segments** (array) - A list of segments associated with the shift. - items (object) - Details of a shift segment. - **payType** (string) - Type of pay for the segment (e.g., unknown, break, meal, work). - **actualTimeIn** (string) - The actual start time for the segment. - **actualTimeOut** (string) - The actual end time for the segment. - **regDuration** (integer) - Duration of regular time worked during the segment. - **ot1Duration** (integer) - Duration of the first overtime period worked during the segment. - **ot2Duration** (integer) - Duration of the second overtime period worked during the segment. - **nonWorkDuration** (integer) - Duration of non-work time during the segment. - **unpaidDuration** (integer) - Duration of unpaid time during the segment. - **cost** (number) - The cost associated with the segment. - **applyToDate** (string) - The date to which the segment's details apply. - **legacyAssignmentId** (string) - The legacy identifier for the assignment. #### Response Example { "example": "{\"stackId\": \"a1b2c3d4-e5f6-7890-1234-567890abcdef\", \"assignedTo\": {\"employeeId\": \"emp123\", \"firstName\": \"John\", \"lastName\": \"Doe\", \"displayName\": \"John Doe\"}, \"startDateTime\": \"2023-10-27T08:00:00Z\", \"duration\": 480, \"hasNote\": false, \"note\": null, \"isEmployeeNote\": false, \"costCenters\": [\"cc-123\"], \"positionKey\": 101, \"breaks\": [], \"segments\": [{\"payType\": \"work\", \"actualTimeIn\": \"2023-10-27T08:05:00Z\", \"actualTimeOut\": \"2023-10-27T16:00:00Z\", \"regDuration\": 475, \"ot1Duration\": 0, \"ot2Duration\": 0, \"nonWorkDuration\": 0, \"unpaidDuration\": 0, \"cost\": 20.50, \"applyToDate\": \"2023-10-27\"}], \"legacyAssignmentId\": \"legacy-abc\"}" } ``` -------------------------------- ### Get Onboarding Information Source: https://developer.paylocity.com/integrations/reference/complianceclientonboardingsget Retrieves a paginated list of onboarding records. Supports filtering by company ID and status. ```APIDOC ## GET /compliance/client/onboarding ### Description Retrieves a paginated list of onboarding records. Supports filtering by company ID and status. ### Method GET ### Endpoint /compliance/client/onboarding ### Query Parameters - **companyId** (string) - Optional - Filters results by company ID. - **status** (string) - Optional - Filters results by onboarding status (InProgress, Approved, Rejected, Suspended). ### Response #### Success Response (200) - **count** (integer) - Optional total number of items available across all pages. - **offset** (integer) - Zero-based index of the first item returned in the current page. - **limit** (integer) - Maximum number of items requested per page. - **items** (array) - An array of OnboardingDto objects. - **companyId** (string) - The ID of the company. - **status** (string) - The current status of the onboarding process (InProgress, Approved, Rejected, Suspended). #### Response Example ```json { "count": 100, "offset": 0, "limit": 10, "items": [ { "companyId": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "status": "InProgress" } ] } ``` #### Error Response (400, 401, 403, 404, 500) - **correlationId** (string) - A unique identifier used for tracing and correlation purposes. - **value** (object) - Contains detailed error information. - **code** (string) - Error code associated with the error. - **message** (string) - Descriptive message detailing the error. - **count** (integer) - Gets the count of items in the Values list. - **values** (array) - A list of validation errors. - **code** (string) - Error code associated with the error. - **message** (string) - Descriptive message detailing the error. - **fields** (string) - A string detailing the fields involved in the validation error. ``` -------------------------------- ### Get Earning Details Source: https://developer.paylocity.com/integrations/reference/get-earning-by-earning-code-and-start-date This endpoint retrieves specific earning details for an employee, identified by the earning code and start date. ```APIDOC ## GET /api/v2/companies/{companyId}/employees/{employeeId}/earnings ### Description Retrieves a specific earning for an employee. ### Method GET ### Endpoint /api/v2/companies/{companyId}/employees/{employeeId}/earnings ### Parameters #### Query Parameters - **earningCode** (string) - Required - The earning code for which to retrieve details. - **startDate** (string) - Required - The start date of the earning. Format: MM-DD-CCYY or CCYY-MM-DD. ``` -------------------------------- ### Step 1: POST Authentication Source: https://developer.paylocity.com/integrations/reference/assessments-overview Obtain an access token by sending your Client ID and Client Secret. This token is required for subsequent API requests. ```APIDOC ## POST Authentication ### Description Obtain an access token using your Client ID and Client Secret. ### Method POST ### Endpoint https://gwext.paylocity.com/public/security/v1/token ### Parameters #### Request Body - **client_id** (string) - Required - Your client ID - **client_secret** (string) - Required - Your client secret - **grant_type** (string) - Required - Should be 'client_credentials' ### Request Example ```curl curl --location --request POST https://gwext.paylocity.com/public/security/v1/token \ --header Content-Type: application/x-www-form-urlencoded \ --data-urlencode client_id= \ --data-urlencode client_secret= \ --data-urlencode grant_type=client_credentials ``` ### Response #### Success Response (200) - **access_token** (string) - The obtained access token - **token_type** (string) - The type of token (e.g., Bearer) - **expires_in** (integer) - The token's expiration time in seconds ``` -------------------------------- ### Get Shifts for a Company Source: https://developer.paylocity.com/integrations/reference/get_apihub_scheduling_v1_companies_companyid_shifts Fetches a list of all shifts for a given company ID. Supports filtering by start date and position key. ```APIDOC ## GET /companies/{companyId}/shifts ### Description Retrieves a list of shifts for a specified company. This API allows you to fetch shift data, including details about assigned employees, scheduled times, durations, and associated cost centers. ### Method GET ### Endpoint /companies/{companyId}/shifts ### Parameters #### Path Parameters - **companyId** (string) - Required - The unique identifier for the company. #### Query Parameters - **startDateTime** (string) - Optional - Filters shifts starting on or after the specified date and time (ISO 8601 format). - **positionKey** (integer) - Optional - Filters shifts associated with a specific position key. ### Response #### Success Response (200) - **shifts** (array) - A list of shift objects. - **stackId** (string) - Unique identifier for the stack. - **assignedTo** (object) - Details of the employee assigned to the shift. - **employeeId** (string) - The employee's unique identifier. - **firstName** (string) - The employee's first name. - **lastName** (string) - The employee's last name. - **middleName** (string) - The employee's middle name. - **startDateTime** (string) - The scheduled start date and time for the shift (ISO 8601 format). - **duration** (integer) - The length of time the shift is scheduled to take, measured in minutes. - **hasNote** (boolean) - Indicates whether there is an additional note attached to the shift. - **note** (string) - The content of the additional note, if any. - **isEmployeeNote** (boolean) - Indicates whether the note is made by the employee. - **costCenters** (array) - A list of identifiers for cost centers associated with the shift. - (string) - Identifier for a cost center. - **positionKey** (integer) - Numeric key representing the position associated with the shift. - **breaks** (array) - A list of breaks associated with the shift. - **breakId** (string) - Unique identifier for the break. - **startDateTime** (string) - The scheduled start date and time for the break (ISO 8601 format). - **duration** (integer) - The length of the break in minutes. - **segments** (array) - A list of segments associated with the shift. - **payType** (string) - The type of pay for the segment (e.g., "work", "break", "meal"). - **actualTimeIn** (string) - The actual start time for the segment (ISO 8601 format). - **actualTimeOut** (string) - The actual end time for the segment (ISO 8601 format). - **regDuration** (integer) - Duration of regular time worked during the segment. - **ot1Duration** (integer) - Duration of the first overtime period worked during the segment. - **ot2Duration** (integer) - Duration of the second overtime period worked during the segment. - **nonWorkDuration** (integer) - Duration of non-work time during the segment. - **unpaidDuration** (integer) - Duration of unpaid time during the segment. - **cost** (number) - The cost associated with the segment. - **applyToDate** (string) - The date to which the segment's details apply. - **legacyAssignmentId** (integer) - Numeric identifier for a legacy assignment linked to the shift. - **templateAssignmentId** (string) - Unique identifier for a template assignment linked to the shift. #### Response Example { "shifts": [ { "stackId": "a1b2c3d4-e5f6-7890-1234-567890abcdef", "assignedTo": { "employeeId": "emp123", "firstName": "John", "lastName": "Doe", "middleName": "" }, "startDateTime": "2023-10-27T09:00:00Z", "duration": 480, "hasNote": true, "note": "Please arrive on time.", "isEmployeeNote": false, "costCenters": ["cc1", "cc2"], "positionKey": 101, "breaks": [ { "breakId": "brk1", "startDateTime": "2023-10-27T12:00:00Z", "duration": 30 } ], "segments": [ { "payType": "work", "actualTimeIn": "2023-10-27T09:05:00Z", "actualTimeOut": "2023-10-27T11:55:00Z", "regDuration": 170, "ot1Duration": 0, "ot2Duration": 0, "nonWorkDuration": 0, "unpaidDuration": 0, "cost": 25.50, "applyToDate": "2023-10-27" }, { "payType": "break", "actualTimeIn": "2023-10-27T12:00:00Z", "actualTimeOut": "2023-10-27T12:30:00Z", "regDuration": 0, "ot1Duration": 0, "ot2Duration": 0, "nonWorkDuration": 30, "unpaidDuration": 0, "cost": 0.00, "applyToDate": "2023-10-27" } ], "legacyAssignmentId": 5001, "templateAssignmentId": "tmpl-abcde" } ] } ``` -------------------------------- ### Get Client Onboardings Source: https://developer.paylocity.com/integrations/reference/complianceclientonboardingsget Retrieves a list of onboarded companies for a partner. Filtering by company ID and status is supported. ```APIDOC ## GET /onboarding/v1/clientonboardings ### Description Retrieves a list of onboarded companies for a partner. Filtering by company ID and status is supported. ### Method GET ### Endpoint /onboarding/v1/clientonboardings ### Query Parameters - **companyId** (string) - Optional - The ID of the company to filter by. - **status** (string) - Optional - The status of the onboarding to filter by. Possible values include 'Pending', 'Active', 'Completed', 'Failed'. ``` -------------------------------- ### Get Company Shifts Source: https://developer.paylocity.com/integrations/reference/get_apihub_scheduling_v1_companies_companyid_shifts Retrieves information about shifts at a company level. This endpoint allows for filtering by start time and position, inclusion of sub-resources like breaks and notes, and pagination. ```APIDOC ## GET /apiHub/scheduling/v1/companies/{companyId}/shifts ### Description The GET Company Shifts endpoint returns information about the shifts at a company level. The response includes data such as start and end times, tasks associated with the shift, and any recorded overtime. **Use cases:** - Managers can review current shifts for the entire company and make adjustments based on staffing needs. - Users can view shift details such as start and end times, duration, cost centers, and pay type. - The endpoint allows retrieval of shift attributes such as timing, assigned tasks, and overtime. This information can be used to analyze work patterns and identify trends. ### Method GET ### Endpoint /apiHub/scheduling/v1/companies/{companyId}/shifts ### Parameters #### Path Parameters - **companyId** (string) - Required - The Paylocity Company ID. This is the unique value provided by Paylocity to each specific Payroll Entity. #### Query Parameters - **include** (string) - Optional - The sub-resources to include in the response. Supported sub-resources: breaks, draft, segments, note. - **filter** (string) - Optional - A parseable filter expression involving fields, operators, and values to filter the result list by. Supported fields: startDateTime, positionKey. Supported operators: eq, in, lt, gt, le, ge, and, or. - **includeTotalCount** (boolean) - 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** (integer) - Optional - The maximum number of resources to include in the response. The default is 25. - **offset** (integer) - 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 - **Authorization** (string) - Required - Authorization token. Ex. Bearer ... (Default: Bearer JWT_GOES_HERE) ### Response #### Success Response (200) - The response will be an array of shift objects. Each shift object contains details such as shift ID, start and end times, associated tasks, and overtime information. ``` -------------------------------- ### Create Employee Onboarding Request (cURL) Source: https://developer.paylocity.com/integrations/reference/onboarding Use this cURL request to initiate the employee onboarding process via the Paylocity API. Ensure you have the correct company ID and authentication headers. ```shell curl --request POST \ --url https://dc1demogw.paylocity.com/api/v1/companies/companyId/onboarding/employees \ --header 'accept: application/json' \ --header 'content-type: application/json' ``` -------------------------------- ### Get Client Onboardings Source: https://developer.paylocity.com/integrations/reference/complianceclientonboardingsget Retrieves a list of client onboardings for a company. This endpoint is restricted to approved partners and requires specific authorization. ```APIDOC ## GET /compliance/v1/companies/b6001/clientOnboardings ### Description This endpoint allows partners to get their onboarded companies with an option of filtering by companyId and status. ### Method GET ### Endpoint /compliance/v1/companies/b6001/clientOnboardings ### Parameters #### Query Parameters - **filter** (string) - Optional - The filtering expression ( e.g. companyId eq b6001, status eq Approved ). - **limit** (integer) - Optional - Limit. Defaults to 50. - **offset** (integer) - Optional - Offset. Defaults to 0. #### Header Parameters - **testMode** (boolean) - Optional - If true, all responses are mocked and generated randomly. Defaults to false. - **Authorization** (string) - Required - Authorization token. Ex. Bearer ... ### Responses #### Success Response (200) - **OnboardingDtoPaginatedResult** - Returns client onboardings. #### Error Response (400) - **GenericErrorResponse** - Returns the details of the error. #### Error Response (401) - Unauthorized ``` -------------------------------- ### GET Punch Detail Data Source: https://developer.paylocity.com/integrations/reference/get_apihub_time_v2_companies_companyid_punchdetails_resourceid Retrieves punch detail results for all employees in a company using a resource ID. Supports filtering by relative start and end dates, and uses pagination. ```APIDOC ## GET /apiHub/time/v2/companies/{companyId}/punchDetails/{resourceId} ### Description The Get Punch Detail Data endpoint retrieves punch detail results for all employees in a company using the resourceId generated in a previous step. It supports filtering by relative start and end dates and uses pagination. ### Method GET ### Endpoint /apiHub/time/v2/companies/{companyId}/punchDetails/{resourceId} ### Parameters #### Path Parameters - **companyId** (string) - Required - The Paylocity Company ID. This is the unique value provided by Paylocity to each specific Payroll Entity. - **resourceId** (string) - Required - The resource ID. This is a unique value attached to each generated company punch detail data set. #### Query Parameters - **includeTotalCount** (boolean) - 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** (integer) - Optional - The maximum number of resources to include in the response. The default is 25. - **offset** (integer) - 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. Supported sort fields are relativeStart and relativeEnd. - **testFlag** (boolean) - Optional - A Boolean value that, when set to "true", returns mock data. #### Request Body None ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ```