openapi-directory
Version:
Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS
1 lines • 150 kB
JSON
{"openapi":"3.0.0","servers":[{"url":"https://api.paylocity.com/api"}],"info":{"contact":{"email":"webservices@paylocity.com"},"description":"For general questions and support of the API, contact: webservices@paylocity.com\r\n# Overview\r\n\r\nPaylocity Web Services API is an externally facing RESTful Internet protocol. The Paylocity API uses HTTP verbs and a RESTful endpoint structure. OAuth 2.0 is used as the API Authorization framework. Request and response payloads are formatted as JSON.\r\nPaylocity supports v1 and v2 versions of its API endpoints. v1, while supported, won't be enhanced with additional functionality. For direct link to v1 documentation, please click [here](https://docs.paylocity.com/weblink/guides/Paylocity_Web_Services_API/v1/Paylocity_Web_Services_API.htm). For additional resources regarding v1/v2 differences and conversion path, please contact webservices@paylocity.com.\r\n\r\n##### Setup\r\n\r\nPaylocity will provide the secure client credentials and set up the scope (type of requests and allowed company numbers). You will receive the unique client id, secret, and Paylocity public key for the data encryption. The secret will expire in 365 days. \r\n* Paylocity will send you an e-mail 10 days prior to the expiration date for the current secret. If not renewed, the second e-mail notification will be sent 5 days prior to secret's expiration. Each email will contain the code necessary to renew the client secret. \r\n* You can obtain the new secret by calling API endpoint using your current not yet expired credentials and the code that was sent with the notification email. For details on API endpoint, please see Client Credentials section. \r\n* Both the current secret value and the new secret value will be recognized during the transition period. After the current secret expires, you must use the new secret. \r\n* If you were unable to renew the secret via API endpoint, you can still contact Service and they will email you new secret via secure email.\r\n\r\n\r\nWhen validating the request, Paylocity API will honor the defaults and required fields set up for the company default New Hire Template as defined in Web Pay.\r\n\r\n\r\n# Authorization\r\n\r\nPaylocity Web Services API uses OAuth2.0 Authentication with JSON Message Format.\r\n\r\n\r\nAll requests of the Paylocity Web Services API require a bearer token which can be obtained by authenticating the client with the Paylocity Web Services API via OAuth 2.0.\r\n\r\n\r\nThe client must request a bearer token from the authorization endpoint:\r\n\r\n\r\nauth-server for production: https://api.paylocity.com/IdentityServer/connect/token\r\n\r\n\r\nauth-server for testing: https://apisandbox.paylocity.com/IdentityServer/connect/token\r\n\r\nPaylocity reserves the right to impose rate limits on the number of calls made to our APIs. Changes to API features/functionality may be made at anytime with or without prior notice.\r\n\r\n##### Authorization Header\r\n\r\nThe request is expected to be in the form of a basic authentication request, with the \"Authorization\" header containing the client-id and client-secret. This means the standard base-64 encoded user:password, prefixed with \"Basic\" as the value for the Authorization header, where user is the client-id and password is the client-secret.\r\n\r\n##### Content-Type Header\r\n\r\nThe \"Content-Type\" header is required to be \"application/x-www-form-urlencoded\".\r\n\r\n##### Additional Values\r\n\r\nThe request must post the following form encoded values within the request body:\r\n\r\n grant_type = client_credentials\r\n scope = WebLinkAPI\r\n\r\n##### Responses\r\n\r\nSuccess will return HTTP 200 OK with JSON content:\r\n\r\n {\r\n \"access_token\": \"xxx\",\r\n \"expires_in\": 3600,\r\n \"token_type\": \"Bearer\"\r\n }\r\n\r\n# Encryption\r\n\r\nPaylocity uses a combination of RSA and AES cryptography. As part of the setup, each client is issued a public RSA key.\r\n\r\nPaylocity recommends the encryption of the incoming requests as additional protection of the sensitive data. Clients can opt-out of the encryption during the initial setup process. Opt-out will allow Paylocity to process unencrypted requests.\r\n\r\nThe Paylocity Public Key has the following properties:\r\n\r\n* 2048 bit key size\r\n\r\n* PKCS1 key format\r\n\r\n* PEM encoding\r\n\r\n##### Properties\r\n\r\n* key (base 64 encoded): The AES symmetric key encrypted with the Paylocity Public Key. It is the key used to encrypt the content. Paylocity will decrypt the AES key using RSA decryption and use it to decrypt the content.\r\n\r\n* iv (base 64 encoded): The AES IV (Initialization Vector) used when encrypting the content.\r\n\r\n* content (base 64 encoded): The AES encrypted request. The key and iv provided in the secureContent request are used by Paylocity for decryption of the content.\r\n\r\nWe suggest using the following for the AES:\r\n\r\n* CBC cipher mode\r\n\r\n* PKCS7 padding\r\n\r\n* 128 bit block size\r\n\r\n* 256 bit key size\r\n\r\n##### Encryption Flow\r\n\r\n* Generate the unencrypted JSON payload to POST/PUT\r\n* Encrypt this JSON payload using your _own key and IV_ (NOT with the Paylocity public key)\r\n* RSA encrypt the _key_ you used in step 2 with the Paylocity Public Key, then, base64 encode the result\r\n* Base64 encode the IV used to encrypt the JSON payload in step 2\r\n* Put together a \"securecontent\" JSON object:\r\n \r\n{\r\n 'secureContent' : {\r\n 'key' : -- RSA-encrypted & base64 encoded key from step 3,\r\n 'iv' : -- base64 encoded iv from step 4\r\n 'content' -- content encrypted with your own key from step 2, base64 encoded\r\n }\r\n}\r\n\r\n##### Sample Example\r\n\r\n {\r\n \"secureContent\": {\r\n \"key\": \"eS3aw6H/qzHMJ00gSi6gQ3xa08DPMazk8BFY96Pd99ODA==\",\r\n \"iv\": \"NLyXMGq9svw0XO5aI9BzWw==\",\r\n \"content\": \"gAEOiQltO1w+LzGUoIK8FiYbU42hug94EasSl7N+Q1w=\"\r\n }\r\n }\r\n\r\n##### Sample C# Code\r\n\r\n using Newtonsoft.Json;\r\n using System;\r\n using System.IO;\r\n using System.Security.Cryptography;\r\n using System.Text;\r\n\r\n public class SecuredContent\r\n {\r\n [JsonProperty(\"key\")]\r\n public string Key { get; set; }\r\n\r\n [JsonProperty(\"iv\")]\r\n public string Iv { get; set; }\r\n\r\n [JsonProperty(\"content\")]\r\n public string Content { get; set; }\r\n\r\n }\r\n\r\n public class EndUserSecureRequestExample\r\n {\r\n public string CreateSecuredRequest(FileInfo paylocityPublicKey, string unsecuredJsonRequest)\r\n {\r\n string publicKeyXml = File.ReadAllText(paylocityPublicKey.FullName, Encoding.UTF8);\r\n\r\n SecuredContent secureContent = this.CreateSecuredContent(publicKeyXml, unsecuredJsonRequest);\r\n\r\n string secureRequest = JsonConvert.SerializeObject(new { secureContent });\r\n\r\n return secureRequest;\r\n }\r\n\r\n private SecuredContent CreateSecuredContent(string publicKeyXml, string request)\r\n {\r\n using (AesCryptoServiceProvider aesCsp = new AesCryptoServiceProvider())\r\n {\r\n aesCsp.Mode = CipherMode.CBC;\r\n aesCsp.Padding = PaddingMode.PKCS7;\r\n aesCsp.BlockSize = 128;\r\n aesCsp.KeySize = 256;\r\n\r\n using (ICryptoTransform crt = aesCsp.CreateEncryptor(aesCsp.Key, aesCsp.IV))\r\n {\r\n using (MemoryStream outputStream = new MemoryStream())\r\n {\r\n using (CryptoStream encryptStream = new CryptoStream(outputStream, crt, CryptoStreamMode.Write))\r\n {\r\n byte[] encodedRequest = Encoding.UTF8.GetBytes(request);\r\n encryptStream.Write(encodedRequest, 0, encodedRequest.Length);\r\n encryptStream.FlushFinalBlock();\r\n byte[] encryptedRequest = outputStream.ToArray();\r\n\r\n using (RSACryptoServiceProvider crp = new RSACryptoServiceProvider())\r\n {\r\n crp.FromXmlstring(publicKeyXml);\r\n byte[] encryptedKey = crp.Encrypt(aesCsp.Key, false);\r\n\r\n return new SecuredContent()\r\n {\r\n Key = Convert.ToBase64string(encryptedKey),\r\n Iv = Convert.ToBase64string(aesCsp.IV),\r\n Content = Convert.ToBase64string(encryptedRequest)\r\n };\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n## Support\r\n\r\nQuestions about using the Paylocity API? Please contact webservices@paylocity.com.\r\n\r\n# Deductions (v1)\r\n\r\nDeductions API provides endpoints to retrieve, add, update and delete deductions for a company's employees. For schema details, click <a href=\"https://docs.paylocity.com/weblink/guides/Paylocity_Web_Services_API/v1/Paylocity_Web_Services_API.htm\" target=\"_blank\">here</a>.\r\n\r\n# OnBoarding (v1)\r\n\r\nOnboarding API sends employee data into Paylocity Onboarding to help ensure an easy and accurate hiring process for subsequent completion into Web Pay. For schema details, click <a href=\"https://docs.paylocity.com/weblink/guides/Paylocity_Web_Services_API/v1/Paylocity_Web_Services_API.htm\" target=\"_blank\">here</a>.","title":"Paylocity API","version":"2","x-apisguru-categories":["financial"],"x-logo":{"url":"https://twitter.com/paylocity/profile_image?size=original"},"x-origin":[{"format":"openapi","url":"https://api.paylocity.com/api/v2/openapi","version":"3.0"}],"x-providerName":"paylocity.com"},"paths":{"/v2/companies/{companyId}/codes/{codeResource}":{"get":{"description":"Get All Company Codes for the selected company and resource","operationId":"Get All Company Codes and Descriptions by Resource","parameters":[{"description":"Company Id","in":"path","name":"companyId","required":true,"schema":{"type":"string"}},{"description":"Type of Company Code. Common values costcenter1, costcenter2, costcenter3, deductions, earnings, taxes, paygrade, positions.","in":"path","name":"codeResource","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/companyCodes"},"type":"array"}}},"description":"Successfully retrieved"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"Invalid Code Resource"},"429":{"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"Internal Server Error"}},"security":[{"paylocity_auth":["WebLinkAPI"]}],"summary":"Get All Company Codes","tags":["Company Codes"]}},"/v2/companies/{companyId}/customfields/{category}":{"get":{"description":"Get All Custom Fields for the selected company","operationId":"Get All Custom Fields by category","parameters":[{"description":"Company Id","in":"path","name":"companyId","required":true,"schema":{"type":"string"}},{"description":"Custom Fields Category","in":"path","name":"category","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/customFieldDefinition"},"type":"array"}}},"description":"Successfully retrieved"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"Invalid Category"},"429":{"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"Internal Server Error"}},"security":[{"paylocity_auth":["WebLinkAPI"]}],"summary":"Get All Custom Fields","tags":["Custom Fields"]}},"/v2/companies/{companyId}/employees":{"post":{"description":"New Employee API sends new employee data directly to Web Pay. Companies who use the New Hire Template in Web Pay may require additional fields when hiring employees. New Employee API Requests will honor these required fields.","operationId":"Add employee","parameters":[{"description":"Company Id","in":"path","name":"companyId","required":true,"schema":{"type":"string"}}],"requestBody":{"$ref":"#/components/requestBodies/employee"},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/employeeIdResponse"}}},"description":"Successfully added"},"400":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"429":{"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"Internal Server Error"}},"security":[{"paylocity_auth":["WebLinkAPI"]}],"summary":"Add new employee","tags":["Employee"]}},"/v2/companies/{companyId}/employees/":{"get":{"description":"Get All Employees API will return employee data currently available in Web Pay.","operationId":"Get all employees","parameters":[{"description":"Company Id","in":"path","name":"companyId","required":true,"schema":{"type":"string"}},{"description":"Number of records per page. Default value is 25.","in":"query","name":"pagesize","required":false,"schema":{"type":"integer"}},{"description":"Page number to retrieve; page numbers are 0-based (so to get the first page of results, pass pagenumber=0). Default value is 0.","in":"query","name":"pagenumber","required":false,"schema":{"type":"integer"}},{"description":"Whether to include the total record count in the header's X-Pcty-Total-Count property. Default value is true.","in":"query","name":"includetotalcount","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/employeeInfo"},"type":"array"}}},"description":"Successfully Retrieved"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"The company does not exist"},"429":{"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"Internal Server Error"}},"security":[{"paylocity_auth":["WebLinkAPI"]}],"summary":"Get all employees","tags":["Employee"]}},"/v2/companies/{companyId}/employees/{employeeId}":{"get":{"description":"Get Employee API will return employee data currently available in Web Pay.","operationId":"Get employee","parameters":[{"description":"Company Id","in":"path","name":"companyId","required":true,"schema":{"type":"string"}},{"description":"Employee Id","in":"path","name":"employeeId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/employee"}}},"description":"Successfully Retrieved"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"The employee does not exist"},"429":{"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"Internal Server Error"}},"security":[{"paylocity_auth":["WebLinkAPI"]}],"summary":"Get employee","tags":["Employee"]},"patch":{"description":"Update Employee API will update existing employee data in WebPay.","operationId":"Update employee","parameters":[{"description":"Company Id","in":"path","name":"companyId","required":true,"schema":{"type":"string"}},{"description":"Employee Id","in":"path","name":"employeeId","required":true,"schema":{"type":"string"}}],"requestBody":{"$ref":"#/components/requestBodies/employee"},"responses":{"200":{"description":"Successfully Updated"},"400":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"429":{"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"Internal Server Error"}},"security":[{"paylocity_auth":["WebLinkAPI"]}],"summary":"Update employee","tags":["Employee"]}},"/v2/companies/{companyId}/employees/{employeeId}/additionalRates":{"put":{"description":"Sends new or updated employee additional rates information directly to Web Pay.","operationId":"Add or update additional rates","parameters":[{"description":"Company Id","in":"path","name":"companyId","required":true,"schema":{"type":"string"}},{"description":"Employee Id","in":"path","name":"employeeId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/additionalRate"}}},"description":"Additional Rate Model","required":true},"responses":{"200":{"description":"Successfully added or updated"},"400":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"429":{"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"Internal Server Error"}},"security":[{"paylocity_auth":["WebLinkAPI"]}],"summary":"Add/update additional rates","tags":["Additional Rates"]}},"/v2/companies/{companyId}/employees/{employeeId}/benefitSetup":{"put":{"description":"Sends new or updated employee benefit setup information directly to Web Pay.","operationId":"Update or add employee benefit setup","parameters":[{"description":"Company Id","in":"path","name":"companyId","required":true,"schema":{"type":"string"}},{"description":"Employee Id","in":"path","name":"employeeId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/benefitSetup"}}},"description":"BenefitSetup Model","required":true},"responses":{"200":{"description":"Successfully added or updated"},"400":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"429":{"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"Internal Server Error"}},"security":[{"paylocity_auth":["WebLinkAPI"]}],"summary":"Add/update employee's benefit setup","tags":["Employee Benefit Setup"]}},"/v2/companies/{companyId}/employees/{employeeId}/directDeposit":{"get":{"description":"Get All Direct Deposit returns main direct deposit and all additional direct depositsfor the selected employee.","operationId":"Get All Direct Deposit","parameters":[{"description":"Company Id","in":"path","name":"companyId","required":true,"schema":{"type":"string"}},{"description":"Employee Id","in":"path","name":"employeeId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/directDeposit"},"type":"array"}}},"description":"Successfully Retrieved"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"The employee, or direct deposit does not exist"},"429":{"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"Internal Server Error"}},"security":[{"paylocity_auth":["WebLinkAPI"]}],"summary":"Get All Direct Deposit","tags":["Direct Deposit"]}},"/v2/companies/{companyId}/employees/{employeeId}/earnings":{"get":{"description":"Get All Earnings returns all earnings for the selected employee.","operationId":"Get All Earnings","parameters":[{"description":"Company Id","in":"path","name":"companyId","required":true,"schema":{"type":"string"}},{"description":"Employee Id","in":"path","name":"employeeId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/earning"},"type":"array"}}},"description":"Successfully retrieved"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"The employee does not exist"},"429":{"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"Internal Server Error"}},"security":[{"paylocity_auth":["WebLinkAPI"]}],"summary":"Get All Earnings","tags":["Earnings"]},"put":{"description":"Add/Update Earning API sends new or updated employee earnings information directly to Web Pay.","operationId":"Add or update an employee earning","parameters":[{"description":"Company Id","in":"path","name":"companyId","required":true,"schema":{"type":"string"}},{"description":"Employee Id","in":"path","name":"employeeId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/earning"}}},"description":"Earning Model","required":true},"responses":{"200":{"description":"Successfully added or updated"},"400":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"429":{"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"Internal Server Error"}},"security":[{"paylocity_auth":["WebLinkAPI"]}],"summary":"Add/Update Earning","tags":["Earnings"]}},"/v2/companies/{companyId}/employees/{employeeId}/earnings/{earningCode}":{"get":{"description":"Get Earnings returns all earnings with the provided earning code for the selected employee.","operationId":"Get Earnings by Earning Code","parameters":[{"description":"Company Id","in":"path","name":"companyId","required":true,"schema":{"type":"string"}},{"description":"Employee Id","in":"path","name":"employeeId","required":true,"schema":{"type":"string"}},{"description":"Earning Code","in":"path","name":"earningCode","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/earning"},"type":"array"}}},"description":"Successfully retrieved"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"The employee does not exist"},"429":{"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"Internal Server Error"}},"security":[{"paylocity_auth":["WebLinkAPI"]}],"summary":"Get Earnings by Earning Code","tags":["Earnings"]}},"/v2/companies/{companyId}/employees/{employeeId}/earnings/{earningCode}/{startDate}":{"delete":{"description":"Delete Earning by Earning Code and Start Date","operationId":"Delete Earning by Earning Code and Start Date","parameters":[{"description":"Company Id","in":"path","name":"companyId","required":true,"schema":{"type":"string"}},{"description":"Employee Id","in":"path","name":"employeeId","required":true,"schema":{"type":"string"}},{"description":"Earning Code","in":"path","name":"earningCode","required":true,"schema":{"type":"string"}},{"description":"Start Date","in":"path","name":"startDate","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Successfully deleted"},"400":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"The employee does not exist, or the specified earningCode-startDate combination does not exist"},"429":{"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"Internal Server Error"}},"security":[{"paylocity_auth":["WebLinkAPI"]}],"summary":"Delete Earning by Earning Code and Start Date","tags":["Earnings"]},"get":{"description":"Get Earnings returns the single earning with the provided earning code and start date for the selected employee.","operationId":"Get Earning by Earning Code and Start Date","parameters":[{"description":"Company Id","in":"path","name":"companyId","required":true,"schema":{"type":"string"}},{"description":"Employee Id","in":"path","name":"employeeId","required":true,"schema":{"type":"string"}},{"description":"Earning Code","in":"path","name":"earningCode","required":true,"schema":{"type":"string"}},{"description":"Start Date","in":"path","name":"startDate","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/earning"}}},"description":"Successfully retrieved"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"The employee does not exist, or the specified earningCode-startDate combination does not exist"},"429":{"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"Internal Server Error"}},"security":[{"paylocity_auth":["WebLinkAPI"]}],"summary":"Get Earning by Earning Code and Start Date","tags":["Earnings"]}},"/v2/companies/{companyId}/employees/{employeeId}/emergencyContacts":{"put":{"description":"Sends new or updated employee emergency contacts directly to Web Pay.","operationId":"Add or update emergency contacts","parameters":[{"description":"Company Id","in":"path","name":"companyId","required":true,"schema":{"type":"string"}},{"description":"Employee Id","in":"path","name":"employeeId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/emergencyContact"}}},"description":"Emergency Contact Model","required":true},"responses":{"200":{"description":"Successfully added or updated"},"400":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"429":{"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"Internal Server Error"}},"security":[{"paylocity_auth":["WebLinkAPI"]}],"summary":"Add/update emergency contacts","tags":["Emergency Contacts"]}},"/v2/companies/{companyId}/employees/{employeeId}/localTaxes":{"get":{"description":"Returns all local taxes for the selected employee.","operationId":"Get all local taxes","parameters":[{"description":"Company Id","in":"path","name":"companyId","required":true,"schema":{"type":"string"}},{"description":"Employee Id","in":"path","name":"employeeId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/localTax"},"type":"array"}}},"description":"Successfully retrieved"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"The employee does not exist"},"429":{"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"Internal Server Error"}},"security":[{"paylocity_auth":["WebLinkAPI"]}],"summary":"Get all local taxes","tags":["Local Taxes"]},"post":{"description":"Sends new employee local tax information directly to Web Pay.","operationId":"Add local tax","parameters":[{"description":"Company Id","in":"path","name":"companyId","required":true,"schema":{"type":"string"}},{"description":"Employee Id","in":"path","name":"employeeId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/localTax"}}},"description":"LocalTax Model","required":true},"responses":{"201":{"description":"Successfully added"},"400":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"429":{"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"Internal Server Error"}},"security":[{"paylocity_auth":["WebLinkAPI"]}],"summary":"Add new local tax","tags":["Local Taxes"]}},"/v2/companies/{companyId}/employees/{employeeId}/localTaxes/{taxCode}":{"delete":{"description":"Delete local tax by tax code","operationId":"Delete local tax by tax code","parameters":[{"description":"Company Id","in":"path","name":"companyId","required":true,"schema":{"type":"string"}},{"description":"Employee Id","in":"path","name":"employeeId","required":true,"schema":{"type":"string"}},{"description":"Tax Code","in":"path","name":"taxCode","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Successfully deleted"},"400":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"The employee does not exist, or the specified tax code does not exist"},"429":{"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"Internal Server Error"}},"security":[{"paylocity_auth":["WebLinkAPI"]}],"summary":"Delete local tax by tax code","tags":["Local Taxes"]},"get":{"description":"Returns all local taxes with the provided tax code for the selected employee.","operationId":"Get local tax by tax code","parameters":[{"description":"Company Id","in":"path","name":"companyId","required":true,"schema":{"type":"string"}},{"description":"Employee Id","in":"path","name":"employeeId","required":true,"schema":{"type":"string"}},{"description":"Tax Code","in":"path","name":"taxCode","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/localTax"},"type":"array"}}},"description":"Successfully retrieved"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"The employee does not exist, or the specified tax code does not exist"},"429":{"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"Internal Server Error"}},"security":[{"paylocity_auth":["WebLinkAPI"]}],"summary":"Get local taxes by tax code","tags":["Local Taxes"]}},"/v2/companies/{companyId}/employees/{employeeId}/nonprimaryStateTax":{"put":{"description":"Sends new or updated employee non-primary state tax information directly to Web Pay.","operationId":"Add or update non-primary state tax","parameters":[{"description":"Company Id","in":"path","name":"companyId","required":true,"schema":{"type":"string"}},{"description":"Employee Id","in":"path","name":"employeeId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/nonPrimaryStateTax"}}},"description":"Non-Primary State Tax Model","required":true},"responses":{"200":{"description":"Successfully added or updated"},"400":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"429":{"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"Internal Server Error"}},"security":[{"paylocity_auth":["WebLinkAPI"]}],"summary":"Add/update non-primary state tax","tags":["Non-Primary State Tax"]}},"/v2/companies/{companyId}/employees/{employeeId}/paystatement/details/{year}":{"get":{"description":"Get pay statement details API will return employee pay statement details data currently available in Web Pay for the specified year.","operationId":"Gets employee pay statement detail data based on the specified year","parameters":[{"description":"Company Id","in":"path","name":"companyId","required":true,"schema":{"type":"string"}},{"description":"Employee Id","in":"path","name":"employeeId","required":true,"schema":{"type":"string"}},{"description":"The year for which to retrieve pay statement data","in":"path","name":"year","required":true,"schema":{"type":"string"}},{"description":"Number of records per page. Default value is 25.","in":"query","name":"pagesize","required":false,"schema":{"type":"integer"}},{"description":"Page number to retrieve; page numbers are 0-based (so to get the first page of results, pass pagenumber=0). Default value is 0.","in":"query","name":"pagenumber","required":false,"schema":{"type":"integer"}},{"description":"Whether to include the total record count in the header's X-Pcty-Total-Count property. Default value is true.","in":"query","name":"includetotalcount","required":false,"schema":{"type":"boolean"}},{"description":"Retrieve pay statement details related to specific deduction, earning or tax types. Common values include 401k, Memo, Reg, OT, Cash Tips, FED and SITW.","in":"query","name":"codegroup","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/payStatementDetails"},"type":"array"}}},"description":"Successfully Retrieved"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"The employee, specified year, or check date does not exist"},"429":{"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"Internal Server Error"}},"security":[{"paylocity_auth":["WebLinkAPI"]}],"summary":"Get employee pay statement details data for the specified year.","tags":["PayStatements"]}},"/v2/companies/{companyId}/employees/{employeeId}/paystatement/details/{year}/{checkDate}":{"get":{"description":"Get pay statement details API will return employee pay statement detail data currently available in Web Pay for the specified year and check date.","operationId":"Gets employee pay statement detail data based on the specified year and check date","parameters":[{"description":"Company Id","in":"path","name":"companyId","required":true,"schema":{"type":"string"}},{"description":"Employee Id","in":"path","name":"employeeId","required":true,"schema":{"type":"string"}},{"description":"The year for which to retrieve pay statement data","in":"path","name":"year","required":true,"schema":{"type":"string"}},{"description":"The check date for which to retrieve pay statement data","in":"path","name":"checkDate","required":true,"schema":{"type":"string"}},{"description":"Number of records per page. Default value is 25.","in":"query","name":"pagesize","required":false,"schema":{"type":"integer"}},{"description":"Page number to retrieve; page numbers are 0-based (so to get the first page of results, pass pagenumber=0). Default value is 0.","in":"query","name":"pagenumber","required":false,"schema":{"type":"integer"}},{"description":"Whether to include the total record count in the header's X-Pcty-Total-Count property. Default value is true.","in":"query","name":"includetotalcount","required":false,"schema":{"type":"boolean"}},{"description":"Retrieve pay statement details related to specific deduction, earning or tax types. Common values include 401k, Memo, Reg, OT, Cash Tips, FED and SITW.","in":"query","name":"codegroup","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/payStatementDetails"},"type":"array"}}},"description":"Successfully Retrieved"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"The employee, specified year, or check date does not exist"},"429":{"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"Internal Server Error"}},"security":[{"paylocity_auth":["WebLinkAPI"]}],"summary":"Get employee pay statement details data for the specified year and check date.","tags":["PayStatements"]}},"/v2/companies/{companyId}/employees/{employeeId}/paystatement/summary/{year}":{"get":{"description":"Get pay statement summary API will return employee pay statement summary data currently available in Web Pay for the specified year.","operationId":"Gets employee pay statement summary data based on the specified year","parameters":[{"description":"Company Id","in":"path","name":"companyId","required":true,"schema":{"type":"string"}},{"description":"Employee Id","in":"path","name":"employeeId","required":true,"schema":{"type":"string"}},{"description":"The year for which to retrieve pay statement data","in":"path","name":"year","required":true,"schema":{"type":"string"}},{"description":"Number of records per page. Default value is 25.","in":"query","name":"pagesize","required":false,"schema":{"type":"integer"}},{"description":"Page number to retrieve; page numbers are 0-based (so to get the first page of results, pass pagenumber=0). Default value is 0.","in":"query","name":"pagenumber","required":false,"schema":{"type":"integer"}},{"description":"Whether to include the total record count in the header's X-Pcty-Total-Count property. Default value is true.","in":"query","name":"includetotalcount","required":false,"schema":{"type":"boolean"}},{"description":"Retrieve pay statement details related to specific deduction, earning or tax types. Common values include 401k, Memo, Reg, OT, Cash Tips, FED and SITW.","in":"query","name":"codegroup","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/payStatementSummary"},"type":"array"}}},"description":"Successfully Retrieved"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"The employee, specified year, or check date does not exist"},"429":{"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"Internal Server Error"}},"security":[{"paylocity_auth":["WebLinkAPI"]}],"summary":"Get employee pay statement summary data for the specified year.","tags":["PayStatements"]}},"/v2/companies/{companyId}/employees/{employeeId}/paystatement/summary/{year}/{checkDate}":{"get":{"description":"Get pay statement summary API will return employee pay statement summary data currently available in Web Pay for the specified year and check date.","operationId":"Gets employee pay statement summary data based on the specified year and check date","parameters":[{"description":"Company Id","in":"path","name":"companyId","required":true,"schema":{"type":"string"}},{"description":"Employee Id","in":"path","name":"employeeId","required":true,"schema":{"type":"string"}},{"description":"The year for which to retrieve pay statement data","in":"path","name":"year","required":true,"schema":{"type":"string"}},{"description":"The check date for which to retrieve pay statement data","in":"path","name":"checkDate","required":true,"schema":{"type":"string"}},{"description":"Number of records per page. Default value is 25.","in":"query","name":"pagesize","required":false,"schema":{"type":"integer"}},{"description":"Page number to retrieve; page numbers are 0-based (so to get the first page of results, pass pagenumber=0). Default value is 0.","in":"query","name":"pagenumber","required":false,"schema":{"type":"integer"}},{"description":"Whether to include the total record count in the header's X-Pcty-Total-Count property. Default value is true.","in":"query","name":"includetotalcount","required":false,"schema":{"type":"boolean"}},{"description":"Retrieve pay statement details related to specific deduction, earning or tax types. Common values include 401k, Memo, Reg, OT, Cash Tips, FED and SITW.","in":"query","name":"codegroup","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/payStatementSummary"},"type":"array"}}},"description":"Successfully Retrieved"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"The employee, specified year, or check date does not exist"},"429":{"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"Internal Server Error"}},"security":[{"paylocity_auth":["WebLinkAPI"]}],"summary":"Get employee pay statement summary data for the specified year and check date.","tags":["PayStatements"]}},"/v2/companies/{companyId}/employees/{employeeId}/primaryStateTax":{"put":{"description":"Sends new or updated employee primary state tax information directly to Web Pay.","operationId":"Add or update primary state tax","parameters":[{"description":"Company Id","in":"path","name":"companyId","required":true,"schema":{"type":"string"}},{"description":"Employee Id","in":"path","name":"employeeId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/stateTax"}}},"description":"Primary State Tax Model","required":true},"responses":{"200":{"description":"Successfully added or updated"},"400":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"429":{"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"Internal Server Error"}},"security":[{"paylocity_auth":["WebLinkAPI"]}],"summary":"Add/update primary state tax","tags":["Primary State Tax"]}},"/v2/companies/{companyId}/employees/{employeeId}/sensitivedata":{"get":{"description":"Gets employee sensitive data information directly from Web Pay.","operationId":"Get sensitive data","parameters":[{"description":"Company Id","in":"path","name":"companyId","required":true,"schema":{"type":"string"}},{"description":"Employee Id","in":"path","name":"employeeId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/sensitiveData"},"type":"array"}}},"description":"Successfully Retrieved"},"400":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"429":{"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"Internal Server Error"}},"security":[{"paylocity_auth":["WebLinkAPI"]}],"summary":"Get sensitive data","tags":["Sensitive Data"]},"put":{"description":"Sends new or updated employee sensitive data information directly to Web Pay.","operationId":"Add or update Sensitive Data","parameters":[{"description":"Company Id","in":"path","name":"companyId","required":true,"schema":{"type":"string"}},{"description":"Employee Id","in":"path","name":"employeeId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/sensitiveData"}}},"description":"Sensitive Data Model","required":true},"responses":{"200":{"description":"Successfully added or updated"},"400":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"429":{"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"Internal Server Error"}},"security":[{"paylocity_auth":["WebLinkAPI"]}],"summary":"Add/update sensitive data","tags":["Sensitive Data"]}},"/v2/companies/{companyId}/openapi":{"get":{"description":"The company-specific Open API endpoint allows the client to GET an Open API document for the Paylocity API that is customized with company-specific resource schemas. These customized resource schemas define certain properties as enumerations of pre-defined values that correspond to the company's setup with Web Pay. The customized schemas also indicate which properties are required by the company within Web Pay.<br />To learn more about Open API, click [here](https://www.openapis.org/)","operationId":"Get company-specific Open API documentation","parameters":[{"description":"Bearer + JWT","in":"header","name":"Authorization","required":true,"schema":{"type":"string"}},{"description":"Company Id","in":"path","name":"companyId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved"},"400":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"Bad Request"},"403":{"description":"Forbidden"},"429":{"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"Internal Server Error"}},"security":[{"paylocity_auth":["WebLinkAPI"]}],"summary":"Get Company-Specific Open API Documentation","tags":["Company-Specific Schema"]}},"/v2/credentials/secrets":{"post":{"description":"Obtain new client secret for Paylocity-issued client id. See Setup section for details.","operationId":"Add Client Secret","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/addClientSecret"}}},"description":"Add Client Secret Model","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/clientCredentialsResponse"},"type":"array"}}},"description":"Successfully added"},"400":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"429":{"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"Internal Server Error"}},"security":[{"paylocity_auth":["WebLinkAPI"]}],"summary":"Obtain new client secret.","tags":["Client Credentials"]}},"/v2/weblinkstaging/companies/{companyId}/employees/newemployees":{"post":{"description":"Add new employee to Web Link will send partially completed or potentially erroneous new hire record to Web Link, where it can be corrected and competed by company administrator or authorized Paylocity Service Bureau employee.","operationId":"Add new employee to Web Link","parameters":[{"description":"Company Id","in":"path","name":"companyId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/stagedEmployee"}}},"description":"StagedEmployee Model","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/trackingNumberResponse"},"type":"array"}}},"description":"Successfully Added"},"400":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"Bad Request"},"403":{"description":"Forbidden"},"429":{"description":"Too Many Requests"},"500":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}},"description":"Internal Server Error"}},"security":[{"paylocity_auth":["WebLinkAPI"]}],"summary":"Add new employee to Web Link","tags":["Employee Staging"]}}},"components":{"requestBodies":{"employee":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/employee"}}},"description":"Employee Model","required":true}},"schemas":{"addClientSecret":{"description":"The Add Client Secret Request Model","properties":{"code":{"description":"A value sent with the 'ACTION NEEDED: Web Link API