importRegularPayrollData
curl --request POST \
--url https://sandbox.rollfi.xyz/payroll/importRegularPayrollData \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"method": "importRegularPayrollData",
"companyId": "3FD08599-7CBB-44C5-9243-CAD72BE36BDF",
"payPeriodId": "EDD9F5D2-BED4-4337-A80C-4DDD33EDFF91",
"payrollData": [
{
"userId": "4DF5A79A-3735-4588-95A6-B80D15CB5A5E",
"paymentMethod": "Check",
"basicPay": {
"payHours": 173
},
"unPaidLeave": {
"noOfHours": 10
},
"retro": {
"amount": 4,
"description": "JK"
},
"overTime": [
{
"type": "Comp off OT",
"noOfHours": 10,
"multiplier": 1
}
],
"additionalCompensation": [
{
"description": "Stock Options",
"amount": 500
},
{
"description": "Van Pool & Transit Passes",
"amount": 500
}
],
"deductions": [
{
"description": "403B CU 15 year Reg",
"amount": 10
},
{
"description": "125DC Reg",
"amount": 5000
}
],
"reimbursements": [
{
"reimbursementType": "GYM",
"amount": 120
}
],
"timeOffs": [
{
"leaveType": "Paid",
"policyType": "Sick Leave",
"hours": 20
},
{
"leaveType": "Paid",
"policyType": "Vacation",
"hours": 10
},
{
"leaveType": "Unpaid",
"hours": 5
}
],
"miscellaneousStateTaxes": [
{
"stateCode": "WA",
"taxName": "Washington L&I",
"taxDetails": [
{
"riskClassName": "Electrician",
"noOfHours": 5
}
]
}
]
}
]
}
'import requests
url = "https://sandbox.rollfi.xyz/payroll/importRegularPayrollData"
payload = {
"method": "importRegularPayrollData",
"companyId": "3FD08599-7CBB-44C5-9243-CAD72BE36BDF",
"payPeriodId": "EDD9F5D2-BED4-4337-A80C-4DDD33EDFF91",
"payrollData": [
{
"userId": "4DF5A79A-3735-4588-95A6-B80D15CB5A5E",
"paymentMethod": "Check",
"basicPay": { "payHours": 173 },
"unPaidLeave": { "noOfHours": 10 },
"retro": {
"amount": 4,
"description": "JK"
},
"overTime": [
{
"type": "Comp off OT",
"noOfHours": 10,
"multiplier": 1
}
],
"additionalCompensation": [
{
"description": "Stock Options",
"amount": 500
},
{
"description": "Van Pool & Transit Passes",
"amount": 500
}
],
"deductions": [
{
"description": "403B CU 15 year Reg",
"amount": 10
},
{
"description": "125DC Reg",
"amount": 5000
}
],
"reimbursements": [
{
"reimbursementType": "GYM",
"amount": 120
}
],
"timeOffs": [
{
"leaveType": "Paid",
"policyType": "Sick Leave",
"hours": 20
},
{
"leaveType": "Paid",
"policyType": "Vacation",
"hours": 10
},
{
"leaveType": "Unpaid",
"hours": 5
}
],
"miscellaneousStateTaxes": [
{
"stateCode": "WA",
"taxName": "Washington L&I",
"taxDetails": [
{
"riskClassName": "Electrician",
"noOfHours": 5
}
]
}
]
}
]
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
method: 'importRegularPayrollData',
companyId: '3FD08599-7CBB-44C5-9243-CAD72BE36BDF',
payPeriodId: 'EDD9F5D2-BED4-4337-A80C-4DDD33EDFF91',
payrollData: [
{
userId: '4DF5A79A-3735-4588-95A6-B80D15CB5A5E',
paymentMethod: 'Check',
basicPay: {payHours: 173},
unPaidLeave: {noOfHours: 10},
retro: {amount: 4, description: 'JK'},
overTime: [{type: 'Comp off OT', noOfHours: 10, multiplier: 1}],
additionalCompensation: [
{description: 'Stock Options', amount: 500},
{description: 'Van Pool & Transit Passes', amount: 500}
],
deductions: [
{description: '403B CU 15 year Reg', amount: 10},
{description: '125DC Reg', amount: 5000}
],
reimbursements: [{reimbursementType: 'GYM', amount: 120}],
timeOffs: [
{leaveType: 'Paid', policyType: 'Sick Leave', hours: 20},
{leaveType: 'Paid', policyType: 'Vacation', hours: 10},
{leaveType: 'Unpaid', hours: 5}
],
miscellaneousStateTaxes: [
{
stateCode: 'WA',
taxName: 'Washington L&I',
taxDetails: [{riskClassName: 'Electrician', noOfHours: 5}]
}
]
}
]
})
};
fetch('https://sandbox.rollfi.xyz/payroll/importRegularPayrollData', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.rollfi.xyz/payroll/importRegularPayrollData",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'method' => 'importRegularPayrollData',
'companyId' => '3FD08599-7CBB-44C5-9243-CAD72BE36BDF',
'payPeriodId' => 'EDD9F5D2-BED4-4337-A80C-4DDD33EDFF91',
'payrollData' => [
[
'userId' => '4DF5A79A-3735-4588-95A6-B80D15CB5A5E',
'paymentMethod' => 'Check',
'basicPay' => [
'payHours' => 173
],
'unPaidLeave' => [
'noOfHours' => 10
],
'retro' => [
'amount' => 4,
'description' => 'JK'
],
'overTime' => [
[
'type' => 'Comp off OT',
'noOfHours' => 10,
'multiplier' => 1
]
],
'additionalCompensation' => [
[
'description' => 'Stock Options',
'amount' => 500
],
[
'description' => 'Van Pool & Transit Passes',
'amount' => 500
]
],
'deductions' => [
[
'description' => '403B CU 15 year Reg',
'amount' => 10
],
[
'description' => '125DC Reg',
'amount' => 5000
]
],
'reimbursements' => [
[
'reimbursementType' => 'GYM',
'amount' => 120
]
],
'timeOffs' => [
[
'leaveType' => 'Paid',
'policyType' => 'Sick Leave',
'hours' => 20
],
[
'leaveType' => 'Paid',
'policyType' => 'Vacation',
'hours' => 10
],
[
'leaveType' => 'Unpaid',
'hours' => 5
]
],
'miscellaneousStateTaxes' => [
[
'stateCode' => 'WA',
'taxName' => 'Washington L&I',
'taxDetails' => [
[
'riskClassName' => 'Electrician',
'noOfHours' => 5
]
]
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.rollfi.xyz/payroll/importRegularPayrollData"
payload := strings.NewReader("{\n \"method\": \"importRegularPayrollData\",\n \"companyId\": \"3FD08599-7CBB-44C5-9243-CAD72BE36BDF\",\n \"payPeriodId\": \"EDD9F5D2-BED4-4337-A80C-4DDD33EDFF91\",\n \"payrollData\": [\n {\n \"userId\": \"4DF5A79A-3735-4588-95A6-B80D15CB5A5E\",\n \"paymentMethod\": \"Check\",\n \"basicPay\": {\n \"payHours\": 173\n },\n \"unPaidLeave\": {\n \"noOfHours\": 10\n },\n \"retro\": {\n \"amount\": 4,\n \"description\": \"JK\"\n },\n \"overTime\": [\n {\n \"type\": \"Comp off OT\",\n \"noOfHours\": 10,\n \"multiplier\": 1\n }\n ],\n \"additionalCompensation\": [\n {\n \"description\": \"Stock Options\",\n \"amount\": 500\n },\n {\n \"description\": \"Van Pool & Transit Passes\",\n \"amount\": 500\n }\n ],\n \"deductions\": [\n {\n \"description\": \"403B CU 15 year Reg\",\n \"amount\": 10\n },\n {\n \"description\": \"125DC Reg\",\n \"amount\": 5000\n }\n ],\n \"reimbursements\": [\n {\n \"reimbursementType\": \"GYM\",\n \"amount\": 120\n }\n ],\n \"timeOffs\": [\n {\n \"leaveType\": \"Paid\",\n \"policyType\": \"Sick Leave\",\n \"hours\": 20\n },\n {\n \"leaveType\": \"Paid\",\n \"policyType\": \"Vacation\",\n \"hours\": 10\n },\n {\n \"leaveType\": \"Unpaid\",\n \"hours\": 5\n }\n ],\n \"miscellaneousStateTaxes\": [\n {\n \"stateCode\": \"WA\",\n \"taxName\": \"Washington L&I\",\n \"taxDetails\": [\n {\n \"riskClassName\": \"Electrician\",\n \"noOfHours\": 5\n }\n ]\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.rollfi.xyz/payroll/importRegularPayrollData")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"method\": \"importRegularPayrollData\",\n \"companyId\": \"3FD08599-7CBB-44C5-9243-CAD72BE36BDF\",\n \"payPeriodId\": \"EDD9F5D2-BED4-4337-A80C-4DDD33EDFF91\",\n \"payrollData\": [\n {\n \"userId\": \"4DF5A79A-3735-4588-95A6-B80D15CB5A5E\",\n \"paymentMethod\": \"Check\",\n \"basicPay\": {\n \"payHours\": 173\n },\n \"unPaidLeave\": {\n \"noOfHours\": 10\n },\n \"retro\": {\n \"amount\": 4,\n \"description\": \"JK\"\n },\n \"overTime\": [\n {\n \"type\": \"Comp off OT\",\n \"noOfHours\": 10,\n \"multiplier\": 1\n }\n ],\n \"additionalCompensation\": [\n {\n \"description\": \"Stock Options\",\n \"amount\": 500\n },\n {\n \"description\": \"Van Pool & Transit Passes\",\n \"amount\": 500\n }\n ],\n \"deductions\": [\n {\n \"description\": \"403B CU 15 year Reg\",\n \"amount\": 10\n },\n {\n \"description\": \"125DC Reg\",\n \"amount\": 5000\n }\n ],\n \"reimbursements\": [\n {\n \"reimbursementType\": \"GYM\",\n \"amount\": 120\n }\n ],\n \"timeOffs\": [\n {\n \"leaveType\": \"Paid\",\n \"policyType\": \"Sick Leave\",\n \"hours\": 20\n },\n {\n \"leaveType\": \"Paid\",\n \"policyType\": \"Vacation\",\n \"hours\": 10\n },\n {\n \"leaveType\": \"Unpaid\",\n \"hours\": 5\n }\n ],\n \"miscellaneousStateTaxes\": [\n {\n \"stateCode\": \"WA\",\n \"taxName\": \"Washington L&I\",\n \"taxDetails\": [\n {\n \"riskClassName\": \"Electrician\",\n \"noOfHours\": 5\n }\n ]\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.rollfi.xyz/payroll/importRegularPayrollData")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"method\": \"importRegularPayrollData\",\n \"companyId\": \"3FD08599-7CBB-44C5-9243-CAD72BE36BDF\",\n \"payPeriodId\": \"EDD9F5D2-BED4-4337-A80C-4DDD33EDFF91\",\n \"payrollData\": [\n {\n \"userId\": \"4DF5A79A-3735-4588-95A6-B80D15CB5A5E\",\n \"paymentMethod\": \"Check\",\n \"basicPay\": {\n \"payHours\": 173\n },\n \"unPaidLeave\": {\n \"noOfHours\": 10\n },\n \"retro\": {\n \"amount\": 4,\n \"description\": \"JK\"\n },\n \"overTime\": [\n {\n \"type\": \"Comp off OT\",\n \"noOfHours\": 10,\n \"multiplier\": 1\n }\n ],\n \"additionalCompensation\": [\n {\n \"description\": \"Stock Options\",\n \"amount\": 500\n },\n {\n \"description\": \"Van Pool & Transit Passes\",\n \"amount\": 500\n }\n ],\n \"deductions\": [\n {\n \"description\": \"403B CU 15 year Reg\",\n \"amount\": 10\n },\n {\n \"description\": \"125DC Reg\",\n \"amount\": 5000\n }\n ],\n \"reimbursements\": [\n {\n \"reimbursementType\": \"GYM\",\n \"amount\": 120\n }\n ],\n \"timeOffs\": [\n {\n \"leaveType\": \"Paid\",\n \"policyType\": \"Sick Leave\",\n \"hours\": 20\n },\n {\n \"leaveType\": \"Paid\",\n \"policyType\": \"Vacation\",\n \"hours\": 10\n },\n {\n \"leaveType\": \"Unpaid\",\n \"hours\": 5\n }\n ],\n \"miscellaneousStateTaxes\": [\n {\n \"stateCode\": \"WA\",\n \"taxName\": \"Washington L&I\",\n \"taxDetails\": [\n {\n \"riskClassName\": \"Electrician\",\n \"noOfHours\": 5\n }\n ]\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"importRegularPayrollLData": {
"status": "Ready",
"message": "Imported Payroll Data Successfully"
}
}Payroll
importRegularPayrollData
The importRegularPayrollData API imports regular payroll data for processing.
What it does:
- Handles standard payroll data import for companies with consistent pay structures
- Links users to their regular compensation package, deductions, additional compensation, and reimbursements
- Processes regular payroll information for multiple employees at once
- Used to import regular payroll data without differential pay rates on a user-by-user basis
Notes:
- To allow
miscellaneousStateTaxesto be imported to payroll, please refer to theaddEmployeeMiscellaneousStateTaxAPI - An employee’s available miscellaneousStateTax items can be retrieved using ‘getEmployeeMiscellaneousStateTaxforPayroll`
Specifying Payment Method:
- PaymentMethod can be specified for each employee in the request.
- Defaults to the method in the user’s wage details.
- Employees can only be set to Direct Deposit if the employee has a connected bank account
- Employees will be switched only for the pay period you are currently importing for. Subsequent pay periods will default back to the user wage
Async Import:
- This method will return before the import fully completes to prevent unecessary blocking.
- Once the import completes a
payperiod.payperiodstatus.updatewebhook is fired to indicate ther import was successful. - The payload is validated before returning, and while the import is ongoing. An error in the response or webhook body indicates some employee’s data needs correcting and re-importing
- For more details please see the Payroll Processing Guide
POST
/
payroll
/
importRegularPayrollData
importRegularPayrollData
curl --request POST \
--url https://sandbox.rollfi.xyz/payroll/importRegularPayrollData \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"method": "importRegularPayrollData",
"companyId": "3FD08599-7CBB-44C5-9243-CAD72BE36BDF",
"payPeriodId": "EDD9F5D2-BED4-4337-A80C-4DDD33EDFF91",
"payrollData": [
{
"userId": "4DF5A79A-3735-4588-95A6-B80D15CB5A5E",
"paymentMethod": "Check",
"basicPay": {
"payHours": 173
},
"unPaidLeave": {
"noOfHours": 10
},
"retro": {
"amount": 4,
"description": "JK"
},
"overTime": [
{
"type": "Comp off OT",
"noOfHours": 10,
"multiplier": 1
}
],
"additionalCompensation": [
{
"description": "Stock Options",
"amount": 500
},
{
"description": "Van Pool & Transit Passes",
"amount": 500
}
],
"deductions": [
{
"description": "403B CU 15 year Reg",
"amount": 10
},
{
"description": "125DC Reg",
"amount": 5000
}
],
"reimbursements": [
{
"reimbursementType": "GYM",
"amount": 120
}
],
"timeOffs": [
{
"leaveType": "Paid",
"policyType": "Sick Leave",
"hours": 20
},
{
"leaveType": "Paid",
"policyType": "Vacation",
"hours": 10
},
{
"leaveType": "Unpaid",
"hours": 5
}
],
"miscellaneousStateTaxes": [
{
"stateCode": "WA",
"taxName": "Washington L&I",
"taxDetails": [
{
"riskClassName": "Electrician",
"noOfHours": 5
}
]
}
]
}
]
}
'import requests
url = "https://sandbox.rollfi.xyz/payroll/importRegularPayrollData"
payload = {
"method": "importRegularPayrollData",
"companyId": "3FD08599-7CBB-44C5-9243-CAD72BE36BDF",
"payPeriodId": "EDD9F5D2-BED4-4337-A80C-4DDD33EDFF91",
"payrollData": [
{
"userId": "4DF5A79A-3735-4588-95A6-B80D15CB5A5E",
"paymentMethod": "Check",
"basicPay": { "payHours": 173 },
"unPaidLeave": { "noOfHours": 10 },
"retro": {
"amount": 4,
"description": "JK"
},
"overTime": [
{
"type": "Comp off OT",
"noOfHours": 10,
"multiplier": 1
}
],
"additionalCompensation": [
{
"description": "Stock Options",
"amount": 500
},
{
"description": "Van Pool & Transit Passes",
"amount": 500
}
],
"deductions": [
{
"description": "403B CU 15 year Reg",
"amount": 10
},
{
"description": "125DC Reg",
"amount": 5000
}
],
"reimbursements": [
{
"reimbursementType": "GYM",
"amount": 120
}
],
"timeOffs": [
{
"leaveType": "Paid",
"policyType": "Sick Leave",
"hours": 20
},
{
"leaveType": "Paid",
"policyType": "Vacation",
"hours": 10
},
{
"leaveType": "Unpaid",
"hours": 5
}
],
"miscellaneousStateTaxes": [
{
"stateCode": "WA",
"taxName": "Washington L&I",
"taxDetails": [
{
"riskClassName": "Electrician",
"noOfHours": 5
}
]
}
]
}
]
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
method: 'importRegularPayrollData',
companyId: '3FD08599-7CBB-44C5-9243-CAD72BE36BDF',
payPeriodId: 'EDD9F5D2-BED4-4337-A80C-4DDD33EDFF91',
payrollData: [
{
userId: '4DF5A79A-3735-4588-95A6-B80D15CB5A5E',
paymentMethod: 'Check',
basicPay: {payHours: 173},
unPaidLeave: {noOfHours: 10},
retro: {amount: 4, description: 'JK'},
overTime: [{type: 'Comp off OT', noOfHours: 10, multiplier: 1}],
additionalCompensation: [
{description: 'Stock Options', amount: 500},
{description: 'Van Pool & Transit Passes', amount: 500}
],
deductions: [
{description: '403B CU 15 year Reg', amount: 10},
{description: '125DC Reg', amount: 5000}
],
reimbursements: [{reimbursementType: 'GYM', amount: 120}],
timeOffs: [
{leaveType: 'Paid', policyType: 'Sick Leave', hours: 20},
{leaveType: 'Paid', policyType: 'Vacation', hours: 10},
{leaveType: 'Unpaid', hours: 5}
],
miscellaneousStateTaxes: [
{
stateCode: 'WA',
taxName: 'Washington L&I',
taxDetails: [{riskClassName: 'Electrician', noOfHours: 5}]
}
]
}
]
})
};
fetch('https://sandbox.rollfi.xyz/payroll/importRegularPayrollData', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.rollfi.xyz/payroll/importRegularPayrollData",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'method' => 'importRegularPayrollData',
'companyId' => '3FD08599-7CBB-44C5-9243-CAD72BE36BDF',
'payPeriodId' => 'EDD9F5D2-BED4-4337-A80C-4DDD33EDFF91',
'payrollData' => [
[
'userId' => '4DF5A79A-3735-4588-95A6-B80D15CB5A5E',
'paymentMethod' => 'Check',
'basicPay' => [
'payHours' => 173
],
'unPaidLeave' => [
'noOfHours' => 10
],
'retro' => [
'amount' => 4,
'description' => 'JK'
],
'overTime' => [
[
'type' => 'Comp off OT',
'noOfHours' => 10,
'multiplier' => 1
]
],
'additionalCompensation' => [
[
'description' => 'Stock Options',
'amount' => 500
],
[
'description' => 'Van Pool & Transit Passes',
'amount' => 500
]
],
'deductions' => [
[
'description' => '403B CU 15 year Reg',
'amount' => 10
],
[
'description' => '125DC Reg',
'amount' => 5000
]
],
'reimbursements' => [
[
'reimbursementType' => 'GYM',
'amount' => 120
]
],
'timeOffs' => [
[
'leaveType' => 'Paid',
'policyType' => 'Sick Leave',
'hours' => 20
],
[
'leaveType' => 'Paid',
'policyType' => 'Vacation',
'hours' => 10
],
[
'leaveType' => 'Unpaid',
'hours' => 5
]
],
'miscellaneousStateTaxes' => [
[
'stateCode' => 'WA',
'taxName' => 'Washington L&I',
'taxDetails' => [
[
'riskClassName' => 'Electrician',
'noOfHours' => 5
]
]
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.rollfi.xyz/payroll/importRegularPayrollData"
payload := strings.NewReader("{\n \"method\": \"importRegularPayrollData\",\n \"companyId\": \"3FD08599-7CBB-44C5-9243-CAD72BE36BDF\",\n \"payPeriodId\": \"EDD9F5D2-BED4-4337-A80C-4DDD33EDFF91\",\n \"payrollData\": [\n {\n \"userId\": \"4DF5A79A-3735-4588-95A6-B80D15CB5A5E\",\n \"paymentMethod\": \"Check\",\n \"basicPay\": {\n \"payHours\": 173\n },\n \"unPaidLeave\": {\n \"noOfHours\": 10\n },\n \"retro\": {\n \"amount\": 4,\n \"description\": \"JK\"\n },\n \"overTime\": [\n {\n \"type\": \"Comp off OT\",\n \"noOfHours\": 10,\n \"multiplier\": 1\n }\n ],\n \"additionalCompensation\": [\n {\n \"description\": \"Stock Options\",\n \"amount\": 500\n },\n {\n \"description\": \"Van Pool & Transit Passes\",\n \"amount\": 500\n }\n ],\n \"deductions\": [\n {\n \"description\": \"403B CU 15 year Reg\",\n \"amount\": 10\n },\n {\n \"description\": \"125DC Reg\",\n \"amount\": 5000\n }\n ],\n \"reimbursements\": [\n {\n \"reimbursementType\": \"GYM\",\n \"amount\": 120\n }\n ],\n \"timeOffs\": [\n {\n \"leaveType\": \"Paid\",\n \"policyType\": \"Sick Leave\",\n \"hours\": 20\n },\n {\n \"leaveType\": \"Paid\",\n \"policyType\": \"Vacation\",\n \"hours\": 10\n },\n {\n \"leaveType\": \"Unpaid\",\n \"hours\": 5\n }\n ],\n \"miscellaneousStateTaxes\": [\n {\n \"stateCode\": \"WA\",\n \"taxName\": \"Washington L&I\",\n \"taxDetails\": [\n {\n \"riskClassName\": \"Electrician\",\n \"noOfHours\": 5\n }\n ]\n }\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.rollfi.xyz/payroll/importRegularPayrollData")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"method\": \"importRegularPayrollData\",\n \"companyId\": \"3FD08599-7CBB-44C5-9243-CAD72BE36BDF\",\n \"payPeriodId\": \"EDD9F5D2-BED4-4337-A80C-4DDD33EDFF91\",\n \"payrollData\": [\n {\n \"userId\": \"4DF5A79A-3735-4588-95A6-B80D15CB5A5E\",\n \"paymentMethod\": \"Check\",\n \"basicPay\": {\n \"payHours\": 173\n },\n \"unPaidLeave\": {\n \"noOfHours\": 10\n },\n \"retro\": {\n \"amount\": 4,\n \"description\": \"JK\"\n },\n \"overTime\": [\n {\n \"type\": \"Comp off OT\",\n \"noOfHours\": 10,\n \"multiplier\": 1\n }\n ],\n \"additionalCompensation\": [\n {\n \"description\": \"Stock Options\",\n \"amount\": 500\n },\n {\n \"description\": \"Van Pool & Transit Passes\",\n \"amount\": 500\n }\n ],\n \"deductions\": [\n {\n \"description\": \"403B CU 15 year Reg\",\n \"amount\": 10\n },\n {\n \"description\": \"125DC Reg\",\n \"amount\": 5000\n }\n ],\n \"reimbursements\": [\n {\n \"reimbursementType\": \"GYM\",\n \"amount\": 120\n }\n ],\n \"timeOffs\": [\n {\n \"leaveType\": \"Paid\",\n \"policyType\": \"Sick Leave\",\n \"hours\": 20\n },\n {\n \"leaveType\": \"Paid\",\n \"policyType\": \"Vacation\",\n \"hours\": 10\n },\n {\n \"leaveType\": \"Unpaid\",\n \"hours\": 5\n }\n ],\n \"miscellaneousStateTaxes\": [\n {\n \"stateCode\": \"WA\",\n \"taxName\": \"Washington L&I\",\n \"taxDetails\": [\n {\n \"riskClassName\": \"Electrician\",\n \"noOfHours\": 5\n }\n ]\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.rollfi.xyz/payroll/importRegularPayrollData")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"method\": \"importRegularPayrollData\",\n \"companyId\": \"3FD08599-7CBB-44C5-9243-CAD72BE36BDF\",\n \"payPeriodId\": \"EDD9F5D2-BED4-4337-A80C-4DDD33EDFF91\",\n \"payrollData\": [\n {\n \"userId\": \"4DF5A79A-3735-4588-95A6-B80D15CB5A5E\",\n \"paymentMethod\": \"Check\",\n \"basicPay\": {\n \"payHours\": 173\n },\n \"unPaidLeave\": {\n \"noOfHours\": 10\n },\n \"retro\": {\n \"amount\": 4,\n \"description\": \"JK\"\n },\n \"overTime\": [\n {\n \"type\": \"Comp off OT\",\n \"noOfHours\": 10,\n \"multiplier\": 1\n }\n ],\n \"additionalCompensation\": [\n {\n \"description\": \"Stock Options\",\n \"amount\": 500\n },\n {\n \"description\": \"Van Pool & Transit Passes\",\n \"amount\": 500\n }\n ],\n \"deductions\": [\n {\n \"description\": \"403B CU 15 year Reg\",\n \"amount\": 10\n },\n {\n \"description\": \"125DC Reg\",\n \"amount\": 5000\n }\n ],\n \"reimbursements\": [\n {\n \"reimbursementType\": \"GYM\",\n \"amount\": 120\n }\n ],\n \"timeOffs\": [\n {\n \"leaveType\": \"Paid\",\n \"policyType\": \"Sick Leave\",\n \"hours\": 20\n },\n {\n \"leaveType\": \"Paid\",\n \"policyType\": \"Vacation\",\n \"hours\": 10\n },\n {\n \"leaveType\": \"Unpaid\",\n \"hours\": 5\n }\n ],\n \"miscellaneousStateTaxes\": [\n {\n \"stateCode\": \"WA\",\n \"taxName\": \"Washington L&I\",\n \"taxDetails\": [\n {\n \"riskClassName\": \"Electrician\",\n \"noOfHours\": 5\n }\n ]\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"importRegularPayrollLData": {
"status": "Ready",
"message": "Imported Payroll Data Successfully"
}
}Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Body
application/json
Response
Show child attributes
Show child attributes
⌘I
