### GET /wep/companies/{companyId}/onboarding/finalize/{id}/taxsetup Source: https://apidocs.worklio.com/docs/tax-setup Retrieves the employee's pre-filled Tax Setup details. This endpoint returns onboarded information after the employee has entered it into the system. ```APIDOC ## GET /wep/companies/{companyId}/onboarding/finalize/{id}/taxsetup ### Description Retrieves the employee's pre-filled Tax Setup details. This endpoint returns onboarded information after the employee has entered it into the system. ### Method GET ### Endpoint `/wep/companies/{companyId}/onboarding/finalize/{id}/taxsetup` ### Parameters #### Path Parameters - **companyId** (string) - Required - The ID of the company. - **id** (string) - Required - The ID of the onboarding process. #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **residentialAddress** (object) - Contains verifiable information about the employee's home location. - **addressLine1** (string) - The first line of the address. - **city** (string) - The city of the address. - **state** (string) - The state of the address. - **zipCode** (string) - The zip code of the address. - **workAddress** (object) - Contains information about the company's primary work location. - **addressLine1** (string) - The first line of the address. - **city** (string) - The city of the address. - **state** (string) - The state of the address. - **zipCode** (string) - The zip code of the address. - **federalTaxes** (object) - Contains data fields for the employee's federal tax definition. - **filingStatus** (string) - The employee's federal filing status. - **taxExemptions** (integer) - The number of tax exemptions claimed. - **deductions** (number) - The amount of deductions. - **extraWithholdings** (number) - The amount of extra withholdings. - **stateTaxes** (array) - An array of objects, each containing state tax information. - **stateName** (string) - The name of the state. - **taxItems** (array) - An array of tax items for the state. - **itemName** (string) - The name of the tax item. - **itemDescription** (string) - The description of the tax item. - **employeeValue** (string) - The employee's assigned value for the tax item. #### Response Example ```json { "residentialAddress": { "addressLine1": "123 Main St", "city": "Anytown", "state": "CA", "zipCode": "90210" }, "workAddress": { "addressLine1": "456 Business Ave", "city": "Metropolis", "state": "NY", "zipCode": "10001" }, "federalTaxes": { "filingStatus": "Single", "taxExemptions": 1, "deductions": 5000.00, "extraWithholdings": 100.00 }, "stateTaxes": [ { "stateName": "California", "taxItems": [ { "itemName": "CA SDI", "itemDescription": "State Disability Insurance", "employeeValue": "0.1" } ] } ] } ``` ``` -------------------------------- ### Get Earnings Setup Source: https://apidocs.worklio.com/docs/time-entry Retrieves information necessary for rendering payroll statements. This is the first step in the payroll wizard. ```APIDOC ## GET /wep/companies/{companyId}/payroll/{payrollRunId}/earnings-setup ### Description Retrieves the earnings setup information required for payroll processing. ### Method GET ### Endpoint /wep/companies/{companyId}/payroll/{payrollRunId}/earnings-setup ### Parameters #### Path Parameters - **companyId** (string) - Required - The ID of the company. - **payrollRunId** (string) - Required - The ID of the payroll run. ### Request Example (No request body for GET requests) ### Response #### Success Response (200) - **earningsData** (object) - Contains detailed earnings setup information. #### Response Example ```json { "earningsData": { "payPeriodStartDate": "2023-01-01", "payPeriodEndDate": "2023-01-15", "employeeId": "emp123", "earningsTypes": [ { "type": "Regular", "rate": 25.00 }, { "type": "Overtime", "rate": 37.50 } ] } } ``` ``` -------------------------------- ### PUT /wep/companies/{companyId}/onboarding/finalize/{id}/taxsetup/finish Source: https://apidocs.worklio.com/docs/tax-setup Completes the Tax Setup step by onboarding the employee's Tax Setup details. This action is required for a successful payroll run. ```APIDOC ## PUT /wep/companies/{companyId}/onboarding/finalize/{id}/taxsetup/finish ### Description Completes the Tax Setup step by onboarding the employee's Tax Setup details. This action is required for a successful payroll run. ### Method PUT ### Endpoint `/wep/companies/{companyId}/onboarding/finalize/{id}/taxsetup/finish` ### Parameters #### Path Parameters - **companyId** (string) - Required - The ID of the company. - **id** (string) - Required - The ID of the onboarding process. #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **message** (string) - A success message indicating the tax setup step has been finished. #### Response Example ```json { "message": "Tax setup step finalized successfully." } ``` ``` -------------------------------- ### Test Webhook Source: https://apidocs.worklio.com/docs/python-simple-example This example shows how to test a registered webhook using a GET request. ```APIDOC ## GET /wep/webhooks/{id}/test ### Description Tests a registered webhook. ### Method GET ### Endpoint /wep/webhooks/{id}/test ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the webhook to test. #### Headers - **api-version** (string) - Required - "1.0" - **x-api-version** (string) - Required - "1.0" - **authorization** (string) - Required - "Bearer [token]" ### Response #### Success Response (200) - (Response body depends on the test outcome) #### Response Example (Example response will vary based on test results) ``` -------------------------------- ### Bank Setup API Source: https://apidocs.worklio.com/docs/bank-verification-integration-guide Endpoints for managing bank setup status, accounts, and Plaid integration. ```APIDOC ## GET /websites/apidocs_worklio/bank-setup/status ### Description Retrieves the current bank setup status for a company. ### Method GET ### Endpoint /websites/apidocs_worklio/bank-setup/status ### Parameters #### Query Parameters - **companyId** (string) - Required - The ID of the company. ### Response #### Success Response (200) - **status** (string) - The current bank setup status (e.g., `NotAvailable`, `Active`, `Completed`). #### Response Example ```json { "status": "Completed" } ``` ``` ```APIDOC ## POST /websites/apidocs_worklio/bank-accounts ### Description Creates a new bank account for the company. ### Method POST ### Endpoint /websites/apidocs_worklio/bank-accounts ### Parameters #### Query Parameters - **companyId** (string) - Required - The ID of the company. ### Request Body - **accountDetails** (object) - Required - Details of the bank account to create. - **purpose** (string) - Required - The purpose of the account (e.g., `DepositAccount`, `OperatingAccount`). - **providerType** (string) - Required - The type of bank provider (e.g., `NatPay`, `Kotapay`). ### Request Example ```json { "accountDetails": { "purpose": "OperatingAccount", "providerType": "NatPay" } } ``` ### Response #### Success Response (200) - **accountId** (string) - The ID of the newly created bank account. - **message** (string) - A success message. #### Response Example ```json { "accountId": "acc_12345", "message": "Bank account created successfully." } ``` ``` ```APIDOC ## PATCH /websites/apidocs_worklio/bank-accounts/{accountId} ### Description Updates an existing bank account for the company. ### Method PATCH ### Endpoint /websites/apidocs_worklio/bank-accounts/{accountId} ### Parameters #### Path Parameters - **accountId** (string) - Required - The ID of the bank account to update. #### Query Parameters - **companyId** (string) - Required - The ID of the company. ### Request Body - **updateDetails** (object) - Required - The details to update for the bank account. - **purpose** (string) - Optional - The new purpose of the account. - **providerType** (string) - Optional - The new type of bank provider. ### Request Example ```json { "updateDetails": { "purpose": "DepositAccount" } } ``` ### Response #### Success Response (200) - **message** (string) - A success message indicating the account was updated. #### Response Example ```json { "message": "Bank account updated successfully." } ``` ``` ```APIDOC ## GET /websites/apidocs_worklio/plaid/link-token ### Description Retrieves a Plaid link token for initiating the Plaid Link flow. ### Method GET ### Endpoint /websites/apidocs_worklio/plaid/link-token ### Parameters #### Query Parameters - **companyId** (string) - Required - The ID of the company. - **accountId** (string) - Required - The ID of the bank account associated with the Plaid connection. ### Response #### Success Response (200) - **linkToken** (string) - The Plaid link token. - **expiration** (string) - The expiration time of the link token. #### Response Example ```json { "linkToken": "link-sandbox-xxxxxxxx", "expiration": "2023-10-27T10:00:00Z" } ``` ``` ```APIDOC ## POST /websites/apidocs_worklio/plaid/connection ### Description Submits the Plaid connection details to establish a link between the company's bank account and Plaid. ### Method POST ### Endpoint /websites/apidocs_worklio/plaid/connection ### Parameters #### Query Parameters - **companyId** (string) - Required - The ID of the company. - **accountId** (string) - Required - The ID of the bank account to connect. ### Request Body - **publicToken** (string) - Required - The public token received from Plaid after successful user authentication. ### Request Example ```json { "publicToken": "public-sandbox-xxxxxxxx" } ``` ### Response #### Success Response (200) - **message** (string) - A success message indicating the Plaid connection was established. #### Response Example ```json { "message": "Plaid connection established successfully." } ``` ``` ```APIDOC ## POST /websites/apidocs_worklio/bank-provider/sign-agreement ### Description Signs the provider agreement for a specific bank account. ### Method POST ### Endpoint /websites/apidocs_worklio/bank-provider/sign-agreement ### Parameters #### Query Parameters - **companyId** (string) - Required - The ID of the company. - **accountId** (string) - Required - The ID of the bank account for which to sign the agreement. ### Response #### Success Response (200) - **message** (string) - A success message indicating the provider agreement was signed. #### Response Example ```json { "message": "Provider agreement signed successfully." } ``` ``` -------------------------------- ### Bank Setup API Source: https://apidocs.worklio.com/docs/bank-verification-integration-guide This section details the API endpoints for managing the bank setup process, including fetching status, creating/updating accounts, and handling Plaid integration. ```APIDOC ## GET /wepGetBankSetup ### Description Fetches the current bank setup status and account details for a given company. ### Method GET ### Endpoint `/wepGetBankSetup(companyId)` ### Parameters #### Path Parameters - **companyId** (string) - Required - The unique identifier for the company. ### Response #### Success Response (200) - **account_type** (string) - The type of bank account. - **routing_number** (string) - The routing number of the bank account. - **account_number** (string) - The account number of the bank account. - **provider_status** (string) - The status of the bank provider integration. - **verification_status** (string) - The verification status of the bank account. #### Response Example { "account_type": "checking", "routing_number": "123456789", "account_number": "987654321", "provider_status": "completed", "verification_status": "verified" } ``` ```APIDOC ## POST /wepCreateBankAccount ### Description Creates a new primary bank account for the company. ### Method POST ### Endpoint `/wepCreateBankAccount(companyId)` ### Parameters #### Path Parameters - **companyId** (string) - Required - The unique identifier for the company. #### Request Body - **account_type** (string) - Required - The type of bank account (e.g., "checking", "savings"). - **routing_number** (string) - Required - The routing number of the bank account. - **account_number** (string) - Required - The account number of the bank account. ### Request Example { "account_type": "checking", "routing_number": "123456789", "account_number": "987654321" } ### Response #### Success Response (200) - **accountId** (string) - The ID of the newly created bank account. #### Response Example { "accountId": "acc_123abc" } ``` ```APIDOC ## PUT /wepUpdateBankAccount ### Description Updates an existing bank account for the company. ### Method PUT ### Endpoint `/wepUpdateBankAccount(companyId, accountId)` ### Parameters #### Path Parameters - **companyId** (string) - Required - The unique identifier for the company. - **accountId** (string) - Required - The unique identifier for the bank account to update. #### Request Body - **account_type** (string) - Optional - The type of bank account (e.g., "checking", "savings"). - **routing_number** (string) - Optional - The routing number of the bank account. - **account_number** (string) - Optional - The account number of the bank account. ### Request Example { "account_type": "savings" } ### Response #### Success Response (200) - **message** (string) - Confirmation message of the update. #### Response Example { "message": "Bank account updated successfully." } ``` ```APIDOC ## POST /wepGetPlaidLinkToken ### Description Requests a Plaid link token to initiate the Plaid linking flow. ### Method POST ### Endpoint `/wepGetPlaidLinkToken(companyId, accountId)` ### Parameters #### Path Parameters - **companyId** (string) - Required - The unique identifier for the company. - **accountId** (string) - Required - The unique identifier for the bank account. ### Response #### Success Response (200) - **plaidLinkToken** (string) - The token required to initialize the Plaid Link UI. #### Response Example { "plaidLinkToken": "pk_test_abcdef1234567890" } ``` ```APIDOC ## POST /wepCreatePlaidConnection ### Description Submits Plaid connection data to establish the bank account connection. ### Method POST ### Endpoint `/wepCreatePlaidConnection(companyId, accountId)` ### Parameters #### Path Parameters - **companyId** (string) - Required - The unique identifier for the company. - **accountId** (string) - Required - The unique identifier for the bank account. #### Request Body - **publicToken** (string) - Required - The public token received from Plaid after successful linking. - **accountMetadata** (object) - Required - Metadata about the linked account from Plaid. - **institution_id** (string) - The ID of the financial institution. - **institution_name** (string) - The name of the financial institution. - **access_token** (string) - The access token for the Plaid connection. ### Request Example { "publicToken": "public-sandbox-token", "accountMetadata": { "institution_id": "ins_123", "institution_name": "Example Bank", "access_token": "access-sandbox-token" } } ### Response #### Success Response (200) - **message** (string) - Confirmation message of the Plaid connection. #### Response Example { "message": "Plaid connection established successfully." } ``` ```APIDOC ## GET /wepGetBankProvider ### Description Fetches details required by the bank provider for company information. ### Method GET ### Endpoint `/wepGetBankProvider(companyId)` ### Parameters #### Path Parameters - **companyId** (string) - Required - The unique identifier for the company. ### Response #### Success Response (200) - **fields** (array) - An array of objects, each describing a field required by the bank provider. - **name** (string) - The name of the field. - **label** (string) - The label to display for the field. - **type** (string) - The input type for the field (e.g., "text", "address"). - **required** (boolean) - Whether the field is required. #### Response Example { "fields": [ { "name": "company_name", "label": "Company Name", "type": "text", "required": true } ] } ``` ```APIDOC ## PUT /wepUpdateBankProvider ### Description Updates company details as required by the bank provider. ### Method PUT ### Endpoint `/wepUpdateBankProvider(companyId)` ### Parameters #### Path Parameters - **companyId** (string) - Required - The unique identifier for the company. #### Request Body - **fieldName** (string) - Required - The name of the field to update. - **fieldValue** (any) - Required - The new value for the field. ### Request Example { "fieldName": "company_name", "fieldValue": "Example Corp" } ### Response #### Success Response (200) - **message** (string) - Confirmation message of the update. #### Response Example { "message": "Bank provider details updated successfully." } ``` ```APIDOC ## POST /wepSignBankProvider ### Description Handles the signing of the bank provider agreement. ### Method POST ### Endpoint `/wepSignBankProvider(companyId, accountId)` ### Parameters #### Path Parameters - **companyId** (string) - Required - The unique identifier for the company. - **accountId** (string) - Required - The unique identifier for the bank account. #### Request Body - **agreementDocument** (string) - Required - The content or identifier of the agreement document. - **signatoryJobTitle** (string) - Required - The job title of the signatory. - **signatoryFullName** (string) - Required - The full name of the signatory. - **electronicConsent** (boolean) - Required - Indicates electronic consent (true/false). ### Request Example { "agreementDocument": "doc_xyz", "signatoryJobTitle": "CEO", "signatoryFullName": "Jane Doe", "electronicConsent": true } ### Response #### Success Response (200) - **message** (string) - Confirmation message of the signed agreement. #### Response Example { "message": "Bank provider agreement signed successfully." } ``` -------------------------------- ### GET /wep/companies/{companyId}/bankOnboarding/documents Source: https://apidocs.worklio.com/docs/banking-1 Retrieves a list of documents required for the bank onboarding process for a specific company. The response includes document IDs and their current status. ```APIDOC ## GET /wep/companies/{companyId}/bankOnboarding/documents ### Description Retrieves a list of documents required for onboarding. ### Method GET ### Endpoint /wep/companies/{companyId}/bankOnboarding/documents ### Parameters #### Path Parameters - **companyId** (string) - Required - The unique identifier of the company. #### Query Parameters None #### Request Body None ### Request Example ```http GET https://apidocs.worklio.com/wep/companies/123456/bankOnboarding/documents Authorization: Bearer YOUR_API_TOKEN ``` ### Response #### Success Response (200) - **docId** (string) - The unique identifier of the document. - **type** (string) - The type of the document (e.g., "Articles of Incorporation"). - **status** (string) - The current status of the document (e.g., "pending"). #### Response Example ```json [ { "docId": "doc1", "type": "Articles of Incorporation", "status": "pending" }, { "docId": "doc2", "type": "Tax Identification Document", "status": "pending" } ] ``` ``` -------------------------------- ### POST /wep/companies/{companyId}/timeoffrequests/setup Source: https://apidocs.worklio.com/docs/time-off-requests Creates a time off request setup for a company. Only one setup can exist per company. ```APIDOC ## POST /wep/companies/{companyId}/timeoffrequests/setup ### Description Creates a time off request setup configuration for a company. A company can only have one time off request setup. If a setup already exists, calling this endpoint will update it. ### Method POST ### Endpoint https://api.worklio.com/wep/companies/{companyId}/timeoffrequests/setup ### Parameters #### Path Parameters - **companyId** (string) - Required - The unique identifier for the company. #### Query Parameters None #### Request Body - **name** (string) - Required - The name of the time off request setup. - **description** (string) - Optional - A description for the setup. - **requestTypes** (array) - Required - A list of available time off request types. - **id** (string) - Required - Unique identifier for the request type. - **name** (string) - Required - Name of the request type (e.g., 'Vacation', 'Sick Leave'). - **requiresApproval** (boolean) - Required - Indicates if this request type requires approval. ### Request Example ```json { "name": "Standard Time Off", "description": "Default setup for all employees.", "requestTypes": [ { "id": "vacation", "name": "Vacation", "requiresApproval": true }, { "id": "sick", "name": "Sick Leave", "requiresApproval": false } ] } ``` ### Response #### Success Response (201) - **setup_id** (string) - The unique identifier for the created or updated time off request setup. - **name** (string) - The name of the time off request setup. - **description** (string) - The description of the setup. - **requestTypes** (array) - A list of available time off request types. - **id** (string) - Unique identifier for the request type. - **name** (string) - Name of the request type. - **requiresApproval** (boolean) - Indicates if this request type requires approval. - **createdAt** (string) - The timestamp when the setup was created. - **updatedAt** (string) - The timestamp when the setup was last updated. #### Response Example ```json { "setup_id": "setup_abc", "name": "Standard Time Off", "description": "Default setup for all employees.", "requestTypes": [ { "id": "vacation", "name": "Vacation", "requiresApproval": true }, { "id": "sick", "name": "Sick Leave", "requiresApproval": false } ], "createdAt": "2023-10-25T12:00:00Z", "updatedAt": "2023-10-25T12:00:00Z" } ``` ``` -------------------------------- ### Register Global Webhook Source: https://apidocs.worklio.com/docs/python-simple-example This example demonstrates how to register a global webhook for all operations using a POST request. ```APIDOC ## POST /wep/webhooks ### Description Registers a global webhook for all operations. ### Method POST ### Endpoint /wep/webhooks ### Parameters #### Headers - **api-version** (string) - Required - "1.0" - **x-api-version** (string) - Required - "1.0" - **accept** (string) - Required - "application/json" - **content-type** (string) - Required - "application/json" - **authorization** (string) - Required - "Bearer [token]" #### Request Body - **method** (string) - Required - "POST" - **format** (integer) - Required - e.g., 2 - **allowedEntries** (integer) - Required - e.g., 0 - **url** (string) - Required - The URL to receive webhook notifications. ### Request Example ```json { "method": "POST", "format": 2, "allowedEntries": 0, "url": "https://webhook.site/06f3d21d-0568-4951-97ae-af703cae1891" } ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier for the registered webhook. #### Response Example ```json { "id": "some-webhook-id" } ``` ``` -------------------------------- ### Install Project Dependencies Source: https://apidocs.worklio.com/docs/front-end-library Installs all project dependencies based on the package-lock.json file to ensure consistent installations. This is a prerequisite for development. ```shell npm ci ``` -------------------------------- ### Company Tax Setup API Source: https://apidocs.worklio.com/docs/update-tax-setup Retrieves a list of tax parameters that need to be filled in for a company's tax setup. This endpoint provides information to render the necessary UI elements for tax configuration. ```APIDOC ## GET /wep/companies/{companyId}/taxsetup ### Description Retrieves a list of tax parameters that need to be filled in for a company's tax setup. This endpoint provides information to render the necessary UI elements for tax configuration, including captions, descriptions, validation rules, and requirement information. ### Method GET ### Endpoint /wep/companies/{companyId}/taxsetup ### Parameters #### Path Parameters - **companyId** (string) - Required - The unique identifier for the company. #### Query Parameters None ### Request Example None (GET request) ### Response #### Success Response (200) - **taxParameters** (array) - A list of tax parameters required for company setup. - **id** (string) - The unique identifier for the tax parameter. - **caption** (string) - The display name for the tax parameter. - **description** (string) - A detailed explanation of the tax parameter. - **valueType** (string) - The expected type of value (e.g., 'number', 'percentage', 'selection', 'text'). - **validationRegex** (string) - A regular expression for client-side validation. - **isRequired** (boolean) - Indicates if the parameter is mandatory. #### Response Example ```json { "taxParameters": [ { "id": "FEIN", "caption": "Federal Employer Identification Number", "description": "Your company's legal Federal Employer Identification Number.", "valueType": "text", "validationRegex": "^\\d{2}-\\d{7}$", "isRequired": true } ] } ``` ``` -------------------------------- ### Employee Tax Setup API Source: https://apidocs.worklio.com/docs/update-tax-setup Manages tax setups for individual employees. This includes retrieving current tax setup information and updating employee-specific federal and state tax attributes. ```APIDOC ## GET /wep/companies/{companyId}/employees/{employeeId}/taxsetup ### Description Retrieves the current tax setup for a specific employee. This information is used to calculate federal and state taxes withheld from the employee's wages. ### Method GET ### Endpoint /wep/companies/{companyId}/employees/{employeeId}/taxsetup ### Parameters #### Path Parameters - **companyId** (string) - Required - The unique identifier for the company. - **employeeId** (string) - Required - The unique identifier for the employee. ### Request Example None (GET request) ### Response #### Success Response (200) - **taxSetup** (object) - The tax setup details for the employee. - **federal** (object) - Federal tax setup details. - **state** (object) - State tax setup details. #### Response Example ```json { "federal": { "allowances": 2, "additionalWithholding": 10.00 }, "state": { "allowances": 1, "additionalWithholding": 5.00 } } ``` ``` ```APIDOC ## POST /wep/companies/{companyId}/employees/{employeeId}/taxsetup ### Description Updates the relevant federal and state tax attributes for a specific employee. This endpoint is crucial for accurate payroll tax withholding calculations. ### Method POST ### Endpoint /wep/companies/{companyId}/employees/{employeeId}/taxsetup ### Parameters #### Path Parameters - **companyId** (string) - Required - The unique identifier for the company. - **employeeId** (string) - Required - The unique identifier for the employee. #### Query Parameters None #### Request Body - **taxSetup** (object) - The updated tax setup details for the employee. - **federal** (object) - Optional - Updated federal tax setup details. - **allowances** (integer) - The number of allowances for federal tax withholding. - **additionalWithholding** (number) - Any additional amount to be withheld for federal taxes. - **state** (object) - Optional - Updated state tax setup details. - **allowances** (integer) - The number of allowances for state tax withholding. - **additionalWithholding** (number) - Any additional amount to be withheld for state taxes. ### Request Example ```json { "taxSetup": { "federal": { "allowances": 3, "additionalWithholding": 15.50 }, "state": { "allowances": 2 } } } ``` ### Response #### Success Response (200) - **message** (string) - A confirmation message indicating the tax setup was updated successfully. #### Response Example ```json { "message": "Employee tax setup updated successfully." } ``` ``` -------------------------------- ### Receive and Validate Webhooks (Flask) Source: https://apidocs.worklio.com/docs/python-simple-example This example demonstrates how to receive and validate incoming webhook requests using Python with Flask. ```APIDOC ## POST / ### Description Receives and validates incoming webhook requests. ### Method POST ### Endpoint / ### Parameters #### Request Headers - **WEP-Sign** (string) - Required - The HMAC signature of the request body. #### Request Body - (The actual webhook payload data) ### Request Example (The request body will be the actual webhook payload sent by Worklio) ### Response #### Success Response (200) - Returns 'Verified request...' if the signature is valid. #### Error Response (401) - Returns 'Integrity of request compromised...' if the signature is invalid. ### Notes - Ensure `WORKLIO_WEBHOOK_SECRET` is set to the secret returned during webhook registration. - The `_verify_webhook` function uses HMAC-SHA256 for signature verification. ``` -------------------------------- ### Submit Document for Review Source: https://apidocs.worklio.com/docs/banking-1 Submits an uploaded document for review. ```APIDOC ## POST /wep/companies/{companyId}/bankOnboarding/documents/{docId}/submit ### Description Submits the uploaded document for review. ### Method POST ### Endpoint /wep/companies/{companyId}/bankOnboarding/documents/{docId}/submit #### Path Parameters - **companyId** (string) - Required - The unique identifier for the company. - **docId** (string) - Required - The unique identifier for the document. #### Request Body - **comment** (string) - Optional - A comment to accompany the submission for review. ### Request Example ```http POST https://apidocs.worklio.com/wep/companies/123456/bankOnboarding/documents/doc1/submit Authorization: Bearer YOUR_API_TOKEN Content-Type: application/json { "comment": "Please review the attached document." } ``` ### Response #### Success Response (200) - **message** (string) - A confirmation message indicating successful submission for review. #### Response Example ```json { "message": "Document submitted for review." } ``` ``` -------------------------------- ### Get List of Earnings (Paystubs) Source: https://apidocs.worklio.com/docs/time-entry Retrieves a list of pay statements with their data. This is called after getting the earnings setup. ```APIDOC ## GET /wep/companies/{companyId}/payroll/{payrollRunId}/paystubs ### Description Fetches a list of pay stubs for a given company and payroll run, including their associated data. ### Method GET ### Endpoint /wep/companies/{companyId}/payroll/{payrollRunId}/paystubs ### Parameters #### Path Parameters - **companyId** (string) - Required - The ID of the company. - **payrollRunId** (string) - Required - The ID of the payroll run. ### Request Example (No request body for GET requests) ### Response #### Success Response (200) - **paystubs** (array) - A list of pay stub objects. - **paystubId** (string) - The ID of the pay stub. - **employeeName** (string) - The name of the employee. - **grossPay** (number) - The gross pay amount. - **netPay** (number) - The net pay amount. #### Response Example ```json { "paystubs": [ { "paystubId": "ps456", "employeeName": "Jane Doe", "grossPay": 2000.00, "netPay": 1500.00 }, { "paystubId": "ps789", "employeeName": "John Smith", "grossPay": 2200.00, "netPay": 1650.00 } ] } ``` ``` -------------------------------- ### POST /wep/companies/{companyId}/taxsetup Source: https://apidocs.worklio.com/docs/company-tax-setup-1 Initiates the company tax setup process by returning a list of tax values that need to be filled out. This endpoint provides all necessary information to render the UI, including captions, descriptions, validation rules, and item requirements. ```APIDOC ## POST /wep/companies/{companyId}/taxsetup ### Description Initiates the company tax setup process by returning a list of tax values that need to be filled out. This endpoint provides all necessary information to render the UI, including captions, descriptions, validation rules, and item requirements. ### Method POST ### Endpoint /wep/companies/{companyId}/taxsetup ### Parameters #### Path Parameters - **companyId** (string) - Required - The unique identifier of the company. #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **taxSetupItems** (array) - An array of tax setup items, each containing details like `caption`, `description`, `valueType`, `validationRegex`, and `isRequired`. #### Response Example ```json { "taxSetupItems": [ { "id": "FEIN", "caption": "Federal Employer Identification Number", "description": "Your company's legal Federal Employer Identification Number.", "valueType": "string", "validationRegex": "^\\d{2}-?\\d{7}$", "isRequired": true }, { "id": "stateTaxAccountNumber", "caption": "State Tax Account Number", "description": "Your state-issued tax account number.", "valueType": "string", "isRequired": true }, { "id": "SUTA_rate", "caption": "SUTA Rate", "description": "State Unemployment Tax Act rate (in percentage).", "valueType": "percentage", "validationRegex": "^\\d+(\\.\\d+)?$", "isRequired": true }, { "id": "isSUTAExempt", "caption": "Exempt from SUTA tax", "description": "Check this box if your company is exempt from SUTA tax.", "valueType": "boolean", "isRequired": false } ] } ``` ``` -------------------------------- ### Start New Employee Onboarding Source: https://apidocs.worklio.com/docs/employee-onboarding-templates Initiates the onboarding process for a new employee by selecting a template. This returns a unique onboarding ID used for subsequent steps. ```APIDOC ## POST /wep/companies/{companyId}/onboarding/start ### Description Starts the onboarding process for a new employee by selecting a template. This endpoint returns a unique onboarding ID that is used to store the employee's information in subsequent requests. ### Method POST ### Endpoint /wep/companies/{companyId}/onboarding/start ### Parameters #### Path Parameters - **companyId** (string) - Required - The unique identifier for the company. #### Request Body - **templateId** (string) - Required - The ID of the onboarding template to use. ### Request Example ```json { "templateId": "tpl_abc123" } ``` ### Response #### Success Response (200) - **onboardingId** (string) - The unique identifier for the newly created onboarding process. #### Response Example ```json { "onboardingId": "onboarding_xyz789" } ``` ``` -------------------------------- ### POST /wep/companies/{companyId}/onboarding/start/{id}/eeBasicInfo Source: https://apidocs.worklio.com/docs/employee-basic-information Initiates or continues the employee basic information onboarding step. This endpoint is used to proceed to the next or previous step in the employee self-onboarding phase. ```APIDOC ## POST /wep/companies/{companyId}/onboarding/start/{id}/eeBasicInfo ### Description Initiates or continues the employee basic information onboarding step, returning information about the next and previous steps in this phase. ### Method POST ### Endpoint /wep/companies/{companyId}/onboarding/start/{id}/eeBasicInfo ### Parameters #### Path Parameters - **companyId** (string) - Required - The unique identifier for the company. - **id** (string) - Required - The unique identifier for the onboarding process. ### Response #### Success Response (200) - **nextStep** (object) - Information about the next step in the onboarding process. - **previousStep** (object) - Information about the previous step in the onboarding process. #### Response Example ```json { "nextStep": { "name": "Contact Information", "url": "/onboarding/contact-info" }, "previousStep": { "name": "Welcome", "url": "/onboarding/welcome" } } ``` ``` -------------------------------- ### iFrame API Request with Integer Page ID (Deprecated) Source: https://apidocs.worklio.com/docs/iframe-migration-guide This example shows a deprecated method of making an API request using the old integer-based `page` parameter. This method will be removed in future updates. ```curl curl --request POST \ --url /token/user/ \ --header 'Authorization: Bearer ' \ --header 'content-type: application/*+json' \ --data '{ \ "page": 1004, \ "email": "user@domain.com", \ "roleAccess": 2, \ "customAppClaims": [ \ { \ "type": "employeeId", \ "value": "123" \ } \ ]' \ }' ``` -------------------------------- ### Start New Employee Onboarding Source: https://apidocs.worklio.com/docs/employee-self-onboarding Initiates the onboarding process for a new employee. This endpoint returns an onboarding ID and the current step in the phase 1 onboarding. ```APIDOC ## POST /wep-companies/{companyId}/onboarding/start ### Description Initiates the onboarding process for a new employee. This endpoint returns an onboarding ID and the current step in the phase 1 onboarding. ### Method POST ### Endpoint /wep-companies/{companyId}/onboarding/start ### Parameters #### Path Parameters - **companyId** (string) - Required - The ID of the company. ### Request Example ```json { "templateId": "tpl_abc123" } ``` ### Response #### Success Response (200) - **onboardingId** (string) - The unique ID for the new employee's onboarding. - **currentStep** (string) - The current step in the phase 1 onboarding process. ``` -------------------------------- ### iFrame API Request with String Page ID (Recommended) Source: https://apidocs.worklio.com/docs/iframe-migration-guide This example demonstrates the recommended way to make an API request using the new string-based `page_name` parameter. It's part of the iFrame API's navigation structure update. ```curl curl --request POST \ --url /token/user/ \ --header 'Authorization: Bearer ' \ --header 'content-type: application/*+json' \ --data '{ \ "page_name": "employee", \ "email": "user@domain.com", \ "roleAccess": 2, \ "customAppClaims": [ \ { \ "type": "employeeId", \ "value": "123" \ } \ ]' \ }' ``` -------------------------------- ### Register and Test Webhooks with Python Source: https://apidocs.worklio.com/docs/python-simple-example This snippet shows how to register a global webhook for all operations using the Worklio API. It includes setting up the request payload and headers, sending a POST request to register the webhook, and then sending a GET request to test the registered webhook. It utilizes the `requests` library for HTTP communication. ```python #register global web hook for All operations url = api_url+"/wep/webhooks" payload = {'method':'POST', 'format':2, 'allowedEntries':0, 'url':'https://webhook.site/06f3d21d-0568-4951-97ae-af703cae1891' } headers = { "api-version": "1.0", "x-api-version": "1.0", "accept": "application/json", "content-type": "application/json", "authorization": "Bearer "+token } response = requests.post(url, json=payload, headers=headers, verify=False) print(response.text) data = response.json() id = str(data["id"]) url = api_url+"/wep/webhooks/"+id+"/test" headers = { "api-version": "1.0", "x-api-version": "1.0", "authorization": "Bearer "+token } response = requests.get(url, headers=headers, verify=False) print(response.text) ``` -------------------------------- ### GET /wep/companies/{companyId}/onboarding/start/{id}/eeBasicInfo Source: https://apidocs.worklio.com/docs/employee-basic-information Retrieves the employee's basic information and custom required fields for the specified onboarding process. ```APIDOC ## GET /wep/companies/{companyId}/onboarding/start/{id}/eeBasicInfo ### Description Retrieves the employee's basic information and information about custom required fields (e.g., email, SSN) for the specified onboarding process. ### Method GET ### Endpoint /wep/companies/{companyId}/onboarding/start/{id}/eeBasicInfo ### Parameters #### Path Parameters - **companyId** (string) - Required - The unique identifier for the company. - **id** (string) - Required - The unique identifier for the onboarding process. ### Response #### Success Response (200) - **firstName** (string) - The employee's legal first name. - **lastName** (string) - The employee's legal last name. - **identificationType** (string) - The type of identification used ('email' or 'SSN'). - **customRequiredField** (object) - Information about custom required fields. - **email** (string) - The employee's email address. - **ssn** (string) - The employee's Social Security Number. - **nextStep** (object) - Information about the next step in the onboarding process. - **previousStep** (object) - Information about the previous step in the onboarding process. #### Response Example ```json { "firstName": "John", "lastName": "Doe", "identificationType": "email", "customRequiredField": { "email": "john.doe@example.com", "ssn": null }, "nextStep": { "name": "Contact Information", "url": "/onboarding/contact-info" }, "previousStep": { "name": "Welcome", "url": "/onboarding/welcome" } } ``` ```