UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 115 kB
{"openapi":"3.0.0","info":{"contact":{"email":"webservices@paylocity.com"},"description":"For general questions and support of the API, contact: webservices@paylocity.com\n# Overview\n\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.\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.\n\n##### Setup\n\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. \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. \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. \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. \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.\n\n\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.\n\n\n# Authorization\n\nPaylocity Web Services API uses OAuth2.0 Authentication with JSON Message Format.\n\n\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.\n\n\nThe client must request a bearer token from the authorization endpoint:\n\n\nauth-server for production: https://api.paylocity.com/IdentityServer/connect/token\n\n\nauth-server for testing: https://apisandbox.paylocity.com/IdentityServer/connect/token\n\n##### Authorization Header\n\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.\n\n##### Content-Type Header\n\nThe \"Content-Type\" header is required to be \"application/x-www-form-urlencoded\".\n\n##### Additional Values\n\nThe request must post the following form encoded values within the request body:\n\n grant_type = client_credentials\n scope = WebLinkAPI\n\n##### Responses\n\nSuccess will return HTTP 200 OK with JSON content:\n\n {\n \"access_token\": \"xxx\",\n \"expires_in\": 3600,\n \"token_type\": \"Bearer\"\n }\n\n# Encryption\n\nPaylocity uses a combination of RSA and AES cryptography. As part of the setup, each client is issued a public RSA key.\n\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.\n\nThe Paylocity Public Key has the following properties:\n\n* 2048 bit key size\n\n* PKCS1 key format\n\n* PEM encoding\n\n##### Properties\n\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.\n\n* iv (base 64 encoded): The AES IV (Initialization Vector) used when encrypting the content.\n\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.\n\nWe suggest using the following for the AES:\n\n* CBC cipher mode\n\n* PKCS7 padding\n\n* 128 bit block size\n\n* 256 bit key size\n\n##### Encryption Flow\n\n* Generate the unencrypted JSON payload to POST/PUT\n* Encrypt this JSON payload using your _own key and IV_ (NOT with the Paylocity public key)\n* RSA encrypt the _key_ you used in step 2 with the Paylocity Public Key, then, base64 encode the result\n* Base64 encode the IV used to encrypt the JSON payload in step 2\n* Put together a \"securecontent\" JSON object:\n \n{\n 'secureContent' : {\n 'key' : -- RSA-encrypted & base64 encoded key from step 3,\n 'iv' : -- base64 encoded iv from step 4\n 'content' -- content encrypted with your own key from step 2, base64 encoded\n }\n}\n\n##### Sample Example\n\n {\n \"secureContent\": {\n \"key\": \"eS3aw6H/qzHMJ00gSi6gQ3xa08DPMazk8BFY96Pd99ODA==\",\n \"iv\": \"NLyXMGq9svw0XO5aI9BzWw==\",\n \"content\": \"gAEOiQltO1w+LzGUoIK8FiYbU42hug94EasSl7N+Q1w=\"\n }\n }\n\n##### Sample C# Code\n\n using Newtonsoft.Json;\n using System;\n using System.IO;\n using System.Security.Cryptography;\n using System.Text;\n\n public class SecuredContent\n {\n [JsonProperty(\"key\")]\n public string Key { get; set; }\n\n [JsonProperty(\"iv\")]\n public string Iv { get; set; }\n\n [JsonProperty(\"content\")]\n public string Content { get; set; }\n\n }\n\n public class EndUserSecureRequestExample\n {\n public string CreateSecuredRequest(FileInfo paylocityPublicKey, string unsecuredJsonRequest)\n {\n string publicKeyXml = File.ReadAllText(paylocityPublicKey.FullName, Encoding.UTF8);\n\n SecuredContent secureContent = this.CreateSecuredContent(publicKeyXml, unsecuredJsonRequest);\n\n string secureRequest = JsonConvert.SerializeObject(new { secureContent });\n\n return secureRequest;\n }\n\n private SecuredContent CreateSecuredContent(string publicKeyXml, string request)\n {\n using (AesCryptoServiceProvider aesCsp = new AesCryptoServiceProvider())\n {\n aesCsp.Mode = CipherMode.CBC;\n aesCsp.Padding = PaddingMode.PKCS7;\n aesCsp.BlockSize = 128;\n aesCsp.KeySize = 256;\n\n using (ICryptoTransform crt = aesCsp.CreateEncryptor(aesCsp.Key, aesCsp.IV))\n {\n using (MemoryStream outputStream = new MemoryStream())\n {\n using (CryptoStream encryptStream = new CryptoStream(outputStream, crt, CryptoStreamMode.Write))\n {\n byte[] encodedRequest = Encoding.UTF8.GetBytes(request);\n encryptStream.Write(encodedRequest, 0, encodedRequest.Length);\n encryptStream.FlushFinalBlock();\n byte[] encryptedRequest = outputStream.ToArray();\n\n using (RSACryptoServiceProvider crp = new RSACryptoServiceProvider())\n {\n crp.FromXmlstring(publicKeyXml);\n byte[] encryptedKey = crp.Encrypt(aesCsp.Key, false);\n\n return new SecuredContent()\n {\n Key = Convert.ToBase64string(encryptedKey),\n Iv = Convert.ToBase64string(aesCsp.IV),\n Content = Convert.ToBase64string(encryptedRequest)\n };\n }\n }\n }\n }\n }\n }\n }\n\n## Support\n\nQuestions about using the Paylocity API? Please contact webservices@paylocity.com.\n\n# Deductions (v1)\n\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>.\n\n# OnBoarding (v1)\n\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>.","termsOfService":"Paylocity_Automated_Data_Exchange_Request_Form.pdf","title":"Paylocity","version":"2","x-apisguru-categories":["financial"],"x-logo":{"url":"https://twitter.com/paylocity/profile_image?size=original"},"x-origin":[{"format":"swagger","url":"https://api.paylocity.com/api/v2/openapi","version":"2.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":"Bearer + JWT","in":"header","name":"Authorization","required":true,"schema":{"type":"string"}},{"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":{"description":"Successfully retrieved","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/companyCodes"},"type":"array"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Invalid Code Resource","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}}}},"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":"Bearer + JWT","in":"header","name":"Authorization","required":true,"schema":{"type":"string"}},{"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":{"description":"Successfully retrieved","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/customFieldDefinition"},"type":"array"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Invalid Category","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}}}},"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":"Bearer + JWT","in":"header","name":"Authorization","required":true,"schema":{"type":"string"}},{"description":"Company Id","in":"path","name":"companyId","required":true,"schema":{"type":"string"}}],"requestBody":{"$ref":"#/components/requestBodies/employee"},"responses":{"201":{"description":"Successfully added","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/employeeIdResponse"},"type":"array"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}}}},"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":"Bearer + JWT","in":"header","name":"Authorization","required":true,"schema":{"type":"string"}},{"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":{"description":"Successfully Retrieved","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/employeeInfo"},"type":"array"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"The company does not exist","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}}}},"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":"Bearer + JWT","in":"header","name":"Authorization","required":true,"schema":{"type":"string"}},{"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":{"description":"Successfully Retrieved","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/employee"},"type":"array"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"The employee does not exist","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}}}},"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":"Bearer + JWT","in":"header","name":"Authorization","required":true,"schema":{"type":"string"}},{"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":{"description":"Bad Request","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}}}},"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":"Bearer + JWT","in":"header","name":"Authorization","required":true,"schema":{"type":"string"}},{"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":{"description":"Bad Request","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}}}},"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":"Bearer + JWT","in":"header","name":"Authorization","required":true,"schema":{"type":"string"}},{"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":{"description":"Bad Request","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}}}},"security":[{"paylocity_auth":["WebLinkAPI"]}],"summary":"Add/update employee's benefit setup","tags":["Employee Benefit Setup"]}},"/v2/companies/{companyId}/employees/{employeeId}/earnings":{"get":{"description":"Get All Earnings returns all earnings for the selected employee.","operationId":"Get All Earnings","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"}},{"description":"Employee Id","in":"path","name":"employeeId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/earning"},"type":"array"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"The employee does not exist"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}}}},"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":"Bearer + JWT","in":"header","name":"Authorization","required":true,"schema":{"type":"string"}},{"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":{"description":"Bad Request","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}}}},"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":"Bearer + JWT","in":"header","name":"Authorization","required":true,"schema":{"type":"string"}},{"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":{"description":"Successfully retrieved","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/earning"},"type":"array"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"The employee does not exist"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}}}},"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":"Bearer + JWT","in":"header","name":"Authorization","required":true,"schema":{"type":"string"}},{"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":{"description":"Bad Request","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"The employee does not exist, or the specified earningCode-startDate combination does not exist"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}}}},"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":"Bearer + JWT","in":"header","name":"Authorization","required":true,"schema":{"type":"string"}},{"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":{"description":"Successfully retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/earning"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"The employee does not exist, or the specified earningCode-startDate combination does not exist"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}}}},"security":[{"paylocity_auth":["WebLinkAPI"]}],"summary":"Get Earning by Earning Code and Start Date","tags":["Earnings"]}},"/v2/companies/{companyId}/employees/{employeeId}/localTaxes":{"get":{"description":"Returns all local taxes for the selected employee.","operationId":"Get all local taxes","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"}},{"description":"Employee Id","in":"path","name":"employeeId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/localTax"},"type":"array"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"The employee does not exist"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}}}},"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":"Bearer + JWT","in":"header","name":"Authorization","required":true,"schema":{"type":"string"}},{"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":{"description":"Bad Request","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}}}},"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":"Bearer + JWT","in":"header","name":"Authorization","required":true,"schema":{"type":"string"}},{"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":{"description":"Bad Request","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"The employee does not exist, or the specified tax code does not exist"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}}}},"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":"Bearer + JWT","in":"header","name":"Authorization","required":true,"schema":{"type":"string"}},{"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":{"description":"Successfully retrieved","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/localTax"},"type":"array"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"The employee does not exist, or the specified tax code does not exist"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}}}},"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":"Bearer + JWT","in":"header","name":"Authorization","required":true,"schema":{"type":"string"}},{"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":{"description":"Bad Request","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}}}},"security":[{"paylocity_auth":["WebLinkAPI"]}],"summary":"Add/update non-primary state tax","tags":["Non-Primary State Tax"]}},"/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":"Bearer + JWT","in":"header","name":"Authorization","required":true,"schema":{"type":"string"}},{"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":{"description":"Bad Request","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}}}},"security":[{"paylocity_auth":["WebLinkAPI"]}],"summary":"Add/update primary state tax","tags":["Primary State Tax"]}},"/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":{"description":"Bad Request","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}}},"403":{"description":"Forbidden"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}}}},"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","parameters":[{"description":"Bearer + JWT","in":"header","name":"Authorization","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/addClientSecret"}}},"description":"Add Client Secret Model","required":true},"responses":{"200":{"description":"Successfully added"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}}}},"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":"Bearer + JWT","in":"header","name":"Authorization","required":true,"schema":{"type":"string"}},{"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":{"description":"Successfully Added","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/trackingNumberResponse"},"type":"array"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}}},"403":{"description":"Forbidden"},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/error"},"type":"array"}}}}},"security":[{"paylocity_auth":["WebLinkAPI"]}],"summary":"Add new employee to Web Link","tags":["Employee Staging"]}}},"servers":[{"url":"https://api.paylocity.com/api"}],"components":{"requestBodies":{"employee":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/employee"}}},"description":"Employee Model","required":true}},"securitySchemes":{"paylocity_auth":{"type":"oauth2","flows":{"clientCredentials":{"tokenUrl":"https://api.paylocity.com/IdentityServer/connect/token","scopes":{"WebLinkAPI":"Web Link Api"}}}}},"schemas":{"addClientSecret":{"description":"The Add Client Secret Request Model","properties":{"code":{"description":"A value sent with the 'ACTION NEEDED: Web Link API Credentials Expiring Soon.' email notification.","type":"string"}},"required":["code"],"type":"object"},"additionalRate":{"additionalProperties":false,"description":"The additional pay rate model","properties":{"changeReason":{"description":"Not required. If populated, must match one of the system coded values available in the Additional Rates Change Reason drop down.<br />","nullable":true,"type":"string"},"costCenter1":{"description":"Not required. Valid values must match one of the system coded cost centers available in the Additional Rates Cost Center level 1 drop down. This cell must be in a text format.<br />","nullable":true,"type":"string"},"costCenter2":{"description":"Not required. Valid values must match one of the system coded cost centers available in the Additional Rates Cost Center level 2 drop down. This cell must be in a text format.<br />","nullable":true,"type":"string"},"costCenter3":{"description":"Not required. Valid values must match one of the system coded cost centers available in the Additional Rates Cost Center level 3 drop down. This cell must be in a text format.<br />","nullable":true,"type":"string"},"effectiveDate":{"description":"Required. Common formats include *MM-DD-CCYY*, *CCYY-MM-DD*.<br />","format":"paylocity-date","nullable":true,"type":"string"},"endCheckDate":{"description":"Not required. Must match one of the system coded check dates available in the Additional Rates End Check Date drop down. Common formats include *MM-DD-CCYY*, *CCYY-MM-DD*.<br />","format":"paylocity-date","nullable":true,"type":"string"},"job":{"description":"Not required. If populated, must match one of the system coded values available in the Additional Rates Job drop down.<br />","nullable":true,"type":"string"},"rate":{"description":"Required. Enter dollar amount that corresponds to the Per selection.<br />","nullable":true,"type":"number"},"rateCode":{"description":"Required. If populated, must match one of the system coded values available in the Additional Rates Rate Code drop down.<br />","nullable":true,"type":"string"},"rateNotes":{"description":"Not required.<br />Max length: 4000<br />","nullable":true,"type":"string"},"ratePer":{"description":"Required. Valid values are HOUR or WEEK.<br />","nullable":true,"type":"string"},"shift":{"description":"Not required. If populated, must match one of the system coded values available in the Additional Rates Shift drop down.<br />","nullable":true,"type":"string"}},"type":"object"},"benefitSetup":{"additionalProperties":false,"description":"The benefit setup model","properties":{"benefitClass":{"description":"Benefit Class code. Values are configured in Web Pay Company > Setup > Benefits > Classes.<br />Max length: 30","nullable":true,"type":"string"},"benefitClassEffectiveDate":{"description":"Date when Benefit Class takes effect. Common formats include *MM-DD-CCYY*, *CCYY-MM-DD*.","format":"paylocity-date","nullable":true,"type":"string"},"benefitSalary":{"description":"Salary used to configure benefits.<br />Decimal(12,2)","nullable":true,"type":"number"},"benefitSalaryEffectiveDate":{"description":"Date when Benefit Salary takes effect. Common formats include *MM-DD-CCYY*, *CCYY-MM-DD*.","format":"paylocity-date","nullable":true,"type":"string"},"doNotApplyAdministrativePeriod":{"description":"Applicable only for HR Enhanced clients and Benefit Classes with ACA Employment Type of Full Time.","nullable":true,"type":"boolean"},"isMeasureAcaEligibility":{"description":"Only valid for HR Enhanced clients and Benefit Classes that are ACA Employment Type of Full Time.","nullable":true,"type":"boolean"}},"type":"object"},"companyCodes":{"additionalProperties":false,"description":"The Company Codes model","properties":{"code":{"description":"Code.<br /> Max length: 40","nullable":true,"type":"string"},"description":{"description":"Description. <br /> Max length: 150","nullable":true,"type":"string"}},"type":"object"},"customFieldDefinition":{"description":"","properties":{"category":{"description":"The custom field category.","type":"string"},"defaultValue":{"description":"Specifies the default value of the custom field.","type":"string"},"isRequired":{"description":"Indicates whether the custom field is required.","type":"boolean"},"label":{"description":"The custom field label.","type":"string"},"type":{"description":"The custom field type.","type":"string"},"values":{"description":"A set of values that are applicable to the custom field.","items":{"description":"","properties":{"code":{"description":"The custom field code.","type":"string"},"description":{"description":"The custom field description.","type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"earning":{"additionalProperties":false,"description":"The employee earning model","properties":{"agency":{"description":"Third-party agency associated with earning. Must match Company setup.<br />Max length: 10","nullable":true,"type":"string"},"amount":{"description":"Value that matches CalculationCode to add to gross wages. For percentage (%), enter whole number (10 = 10%). <br />Decimal(12,2)","nullable":true,"type":"number"},"annualMaximum":{"description":"Year to Date dollar amount not to be exceeded for an earning in the calendar year. Used only with company driven maximums. <br />Decimal(12,2)","nullable":true,"type":"number"},"calculationCode":{"description":"Defines how earnings are calculated. Common values are *% (percentage of gross), flat (flat dollar amount)*. Defaulted to the Company setup calcCode for earning. <br />Max length: 20","nullable":true,"type":"string"},"costCenter1":{"description":"Cost Center associated with earning. Must match Company setup.<br /> Max length: 10","nullable":true,"type":"string"},"costCenter2":{"description":"Cost Center associated with earning. Must match Company setup.<br /> Max length: 10","nullable":true,"type":"string"},"costCenter3":{"description":"Cost Center associated with earning. Must match Company setup.<br /> Max length: 10","nullable":true,"type":"string"},"earningCode":{"description":"Earning code. Must match Company setup. <br />Max length: 10","nullable":true,"type":"string"},"effectiveDate":{"description":"Date earning is active. Defaulted to run date or check date based on Company setup. Common formats are MM-DD-CCYY, CCYY-MM-DD.","format":"paylocity-date","nullable":true,"type":"string"},"endDate":{"description":"Stop date of an earning. Common formats are MM-DD-CCYY, CCYY-MM-DD.","format":"paylocity-date","nullable":true,"type":"string"},"frequency":{"description":"Needed if earning is applied differently from the payroll frequency (one time earning for example).<br /> Max length: 5","nullable":true,"type":"string"},"goal":{"description":"Dollar amount. The employee earning will stop when the goal amount is reached.<br /> Decimal(12,2)","nullable":true,"type":"number"},"hoursOrUnits":{"description":"The value is used in conjunction with the Rate field. When entering Group Term Life Insurance (GTL), it should contain the full amount of the group term life insurance policy. <br /> Decimal(12,2)","nullable":true,"type":"number"},"isSelfInsured":{"description":"Used for ACA. If not entered, defaulted to Company earning setup.","nullable":true,"type":"boolean"},"jobCode":{"description":"Job code associated with earnings. Must match Company setup.<br /> Max length: 20","nullable":true,"type":"string"},"miscellaneousInfo":{"description":"Information to print on the check stub if agency is set up for this earning. <br />Max length: 50","nullable":true,"type":"string"},"paidTowardsGoal":{"description":"Amount already paid to employee toward goal. <br /> Decimal(12,2)","nullable":true,"type":"number"},"payPeriodMaximum":{"description":"Maximum amount of the earning on a single paycheck. <br /> Decimal(12,2)","nullable":true,"type":"number"},"payPeriodMinimum":{"description":"Minimum amount of the earning on a single paycheck. <br /> Decimal(12,2)","nullable":true,"type":"number"},"rate":{"description":"Rate is used in conjunction with the hoursOrUnits field. <br /> Decimal(12,2)","nullable":true,"type":"number"},"rateCode":{"description":"Rate Code applies to additional pay rates entered for an employee. Must match Company setup. <br /> Max length: 10","nullable":true,"type":"string"},"startDate":{"description":"Start date of an earning based on payroll calendar. Common formats are MM-DD-CCYY, CCYY-MM-DD.","format":"paylocity-date","nullable":true,"type":"string"}},"required":["earningCode","startDate"],"type":"object"},"employee":{"additionalProperties":false,"description":"The employee model","properties":{"additionalDirectDeposit":{"description":"Add up to 19 direct deposit accounts in addition to the main direct deposit account. IMPORTANT: A direct deposit update will remove ALL existing main and additional direct deposit information in WebPay and replace with information provided on the request. GET API will not return direct deposit data.","items":{"additionalProperties":false,"description":"The additional direct deposit model","properties":{"accountNumber":{"description":"Account number, entered without special characters and spaces. <br />Max length: 17<br />","nullable":true,"type":"string"},"accountType":{"description":"Account type. Valid values are *C* (Checking), *S* (Saving), *P* (Pay Card). <br />Max length: 1<br />","nullable":true,"type":"string"},"amount":{"description":"Amount value to be deposited to the account.<br />Decimal (12,2)<br />","nullable":true,"type":"number"},"amountType":{"description":"Amount type to indicate the context of the amount. Common values are *F* (FLAT), *F-* (Net Minus), *P* (Percent). <br /> Max length: 5<br />","nullable":true,"type":"string"},"blockSpecial":{"description":"Indicates if direct deposit should be blocked when special check types such as Bonus are processed.<br />","nullable":true,"type":"boolean"},"isSkipPreNote":{"description":"Indicates if account will not pre-note.<br />","nullable":true,"type":"boolean"},"nameOnAccount":{"description":"Name on the bank account. Defaults to employee's name. <br />Max length: 30<br />","nullable":true,"type":"string"},"preNoteDate":{"description":"Date to end the pre-note of the account. Common formats include *MM-DD-CCYY*, *CCYY-MM-DD*.<br />","format":"paylocity-date","nullable":true,"type":"string"},"routingNumber":{"description":"ABA Transit Routing Number, entered without dashes or spaces. <br />Max length: 9<br />","nullable":true,"type":"string"}},"type":"object"},"maxItems":19,"type":"array"},"additionalRate":{"description":"Add Additional Rates.","items":{"additionalProperties":false,"description":"The additional pay rate model","properties":{"changeReason":{"description":"Not required. If populated, must match one of the system coded values available in the Additional Rates Change Reason drop down.<br />","nullable":true,"type":"string"},"costCenter1":{"description":"Not required. Valid values must match one of the system coded cost centers available in the Additional Rates Cost Center level 1 drop down. This cell must be in a text format.<br />","nullable":true,"type":"string"},"costCenter2":{"description":"Not required. Valid values must match one of the system coded cost centers available in the Additional Rates Cost Center level 2 drop down. This cell must be in a text format.<br />","nullable":true,"type":"string"},"costCenter3":{"description":"Not required. Valid values must match one of the system coded cost centers available in the Additional Rates Cost Center level 3 drop down. This cell must be in a text format.<br />","nullable":true,"type":"string"},"effectiveDate":{"description":"Required. Common formats include *MM-DD-CCYY*, *CCYY-MM-DD*.<br />","format":"paylocity-date","nullable":true,"type":"string"},"endCheckDate":{"description":"Not required. Must match one of the system coded check dates available in the Additional Rates End Check Date drop down. Common formats include *MM-DD-CCYY*, *CCYY-MM-DD*.<br />","format":"paylocity-date","nullable":true,"type":"string"},"job":{"description":"Not required. If populated, must match one of the system coded values available in the Additional Rates Job drop down.<br />","nullable":true,"type":"string"},"rate":{"description":"Required. Enter dollar amount that corresponds to the Per selection.<br />","nullable":true,"type":"number"},"rateCode":{"description":"Required. If populated, must match one of the system coded values available in the Additional Rates Rate Code drop down.<br />","nullable":true,"type":"string"},"rateNotes":{"description":"Not required.<br />Max length: 4000<br />","nullable":true,"type":"string"},"ratePer":{"description":"Required. Valid values are HOUR or WEEK.<br />","nullable":true,"type":"string"},"shift":{"description":"Not required. If populated, must match one of the system coded values available in the Additional Rates Shift drop down.<br />","nullable":true,"type":"string"}},"type":"object"},"type":"array"},"benefitSetup":{"additionalProperties":false,"description":"