addEmployeeMiscellaneousStateTax
curl --request POST \
--url https://sandbox.rollfi.xyz/adminPortal/addEmployeeMiscellaneousStateTax \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"method": "addEmployeeMiscellaneousStateTax",
"companyId": "7440E812-C699-4A94-AE14-A4B788D83299",
"userId": "98CCB6CF-08DD-4C17-A367-B339CD5526CD",
"employeeMiscellaneousStateTax": {
"CompositeRate": "5",
"RiskClassName": "Painter",
"RiskClassCode": "121212",
"PayrollDeductionRate": "4"
}
}
'import requests
url = "https://sandbox.rollfi.xyz/adminPortal/addEmployeeMiscellaneousStateTax"
payload = {
"method": "addEmployeeMiscellaneousStateTax",
"companyId": "7440E812-C699-4A94-AE14-A4B788D83299",
"userId": "98CCB6CF-08DD-4C17-A367-B339CD5526CD",
"employeeMiscellaneousStateTax": {
"CompositeRate": "5",
"RiskClassName": "Painter",
"RiskClassCode": "121212",
"PayrollDeductionRate": "4"
}
}
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: 'addEmployeeMiscellaneousStateTax',
companyId: '7440E812-C699-4A94-AE14-A4B788D83299',
userId: '98CCB6CF-08DD-4C17-A367-B339CD5526CD',
employeeMiscellaneousStateTax: {
CompositeRate: '5',
RiskClassName: 'Painter',
RiskClassCode: '121212',
PayrollDeductionRate: '4'
}
})
};
fetch('https://sandbox.rollfi.xyz/adminPortal/addEmployeeMiscellaneousStateTax', 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/adminPortal/addEmployeeMiscellaneousStateTax",
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' => 'addEmployeeMiscellaneousStateTax',
'companyId' => '7440E812-C699-4A94-AE14-A4B788D83299',
'userId' => '98CCB6CF-08DD-4C17-A367-B339CD5526CD',
'employeeMiscellaneousStateTax' => [
'CompositeRate' => '5',
'RiskClassName' => 'Painter',
'RiskClassCode' => '121212',
'PayrollDeductionRate' => '4'
]
]),
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/adminPortal/addEmployeeMiscellaneousStateTax"
payload := strings.NewReader("{\n \"method\": \"addEmployeeMiscellaneousStateTax\",\n \"companyId\": \"7440E812-C699-4A94-AE14-A4B788D83299\",\n \"userId\": \"98CCB6CF-08DD-4C17-A367-B339CD5526CD\",\n \"employeeMiscellaneousStateTax\": {\n \"CompositeRate\": \"5\",\n \"RiskClassName\": \"Painter\",\n \"RiskClassCode\": \"121212\",\n \"PayrollDeductionRate\": \"4\"\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/adminPortal/addEmployeeMiscellaneousStateTax")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"method\": \"addEmployeeMiscellaneousStateTax\",\n \"companyId\": \"7440E812-C699-4A94-AE14-A4B788D83299\",\n \"userId\": \"98CCB6CF-08DD-4C17-A367-B339CD5526CD\",\n \"employeeMiscellaneousStateTax\": {\n \"CompositeRate\": \"5\",\n \"RiskClassName\": \"Painter\",\n \"RiskClassCode\": \"121212\",\n \"PayrollDeductionRate\": \"4\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.rollfi.xyz/adminPortal/addEmployeeMiscellaneousStateTax")
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\": \"addEmployeeMiscellaneousStateTax\",\n \"companyId\": \"7440E812-C699-4A94-AE14-A4B788D83299\",\n \"userId\": \"98CCB6CF-08DD-4C17-A367-B339CD5526CD\",\n \"employeeMiscellaneousStateTax\": {\n \"CompositeRate\": \"5\",\n \"RiskClassName\": \"Painter\",\n \"RiskClassCode\": \"121212\",\n \"PayrollDeductionRate\": \"4\"\n }\n}"
response = http.request(request)
puts response.read_body{
"employeeMiscellaneousStateTax": {
"status": "Ready",
"message": "The Employee Miscellaneous State Tax Information has been saved successfully."
}
}{
"error": {
"code": 400,
"message": "CompositeRate (5.0) cannot be less than PayrollDeductionRate (7.0)"
}
}Admin Portal
addEmployeeMiscellaneousStateTax
The addEmployeeMiscellaneousStateTax API is used to collect state-specific tax withholding information for employees in states that require profession/job specific taxes
What it does:
- Used when a state tax does not apply to all employees within the state, but to a select few professions/jobs
Notes:
- This step is only required for employees subjest to state taxes not covered in the standard W4 import. Skip this step if the employee is not subject to miscellaneous taxes.
- “CompositeRate” cannot be less than “PayrollDeductionRate”.
- A user’s MiscellaneousStateTaxes can be seen in
getUsersandgetUserAPIs. - After adding MiscellaneousStateTaxes, use
getEmployeeMiscellaneousStateTaxforPayrollto retrieve the exact object to add the taxes to payroll.
POST
/
adminPortal
/
addEmployeeMiscellaneousStateTax
addEmployeeMiscellaneousStateTax
curl --request POST \
--url https://sandbox.rollfi.xyz/adminPortal/addEmployeeMiscellaneousStateTax \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"method": "addEmployeeMiscellaneousStateTax",
"companyId": "7440E812-C699-4A94-AE14-A4B788D83299",
"userId": "98CCB6CF-08DD-4C17-A367-B339CD5526CD",
"employeeMiscellaneousStateTax": {
"CompositeRate": "5",
"RiskClassName": "Painter",
"RiskClassCode": "121212",
"PayrollDeductionRate": "4"
}
}
'import requests
url = "https://sandbox.rollfi.xyz/adminPortal/addEmployeeMiscellaneousStateTax"
payload = {
"method": "addEmployeeMiscellaneousStateTax",
"companyId": "7440E812-C699-4A94-AE14-A4B788D83299",
"userId": "98CCB6CF-08DD-4C17-A367-B339CD5526CD",
"employeeMiscellaneousStateTax": {
"CompositeRate": "5",
"RiskClassName": "Painter",
"RiskClassCode": "121212",
"PayrollDeductionRate": "4"
}
}
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: 'addEmployeeMiscellaneousStateTax',
companyId: '7440E812-C699-4A94-AE14-A4B788D83299',
userId: '98CCB6CF-08DD-4C17-A367-B339CD5526CD',
employeeMiscellaneousStateTax: {
CompositeRate: '5',
RiskClassName: 'Painter',
RiskClassCode: '121212',
PayrollDeductionRate: '4'
}
})
};
fetch('https://sandbox.rollfi.xyz/adminPortal/addEmployeeMiscellaneousStateTax', 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/adminPortal/addEmployeeMiscellaneousStateTax",
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' => 'addEmployeeMiscellaneousStateTax',
'companyId' => '7440E812-C699-4A94-AE14-A4B788D83299',
'userId' => '98CCB6CF-08DD-4C17-A367-B339CD5526CD',
'employeeMiscellaneousStateTax' => [
'CompositeRate' => '5',
'RiskClassName' => 'Painter',
'RiskClassCode' => '121212',
'PayrollDeductionRate' => '4'
]
]),
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/adminPortal/addEmployeeMiscellaneousStateTax"
payload := strings.NewReader("{\n \"method\": \"addEmployeeMiscellaneousStateTax\",\n \"companyId\": \"7440E812-C699-4A94-AE14-A4B788D83299\",\n \"userId\": \"98CCB6CF-08DD-4C17-A367-B339CD5526CD\",\n \"employeeMiscellaneousStateTax\": {\n \"CompositeRate\": \"5\",\n \"RiskClassName\": \"Painter\",\n \"RiskClassCode\": \"121212\",\n \"PayrollDeductionRate\": \"4\"\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/adminPortal/addEmployeeMiscellaneousStateTax")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"method\": \"addEmployeeMiscellaneousStateTax\",\n \"companyId\": \"7440E812-C699-4A94-AE14-A4B788D83299\",\n \"userId\": \"98CCB6CF-08DD-4C17-A367-B339CD5526CD\",\n \"employeeMiscellaneousStateTax\": {\n \"CompositeRate\": \"5\",\n \"RiskClassName\": \"Painter\",\n \"RiskClassCode\": \"121212\",\n \"PayrollDeductionRate\": \"4\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.rollfi.xyz/adminPortal/addEmployeeMiscellaneousStateTax")
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\": \"addEmployeeMiscellaneousStateTax\",\n \"companyId\": \"7440E812-C699-4A94-AE14-A4B788D83299\",\n \"userId\": \"98CCB6CF-08DD-4C17-A367-B339CD5526CD\",\n \"employeeMiscellaneousStateTax\": {\n \"CompositeRate\": \"5\",\n \"RiskClassName\": \"Painter\",\n \"RiskClassCode\": \"121212\",\n \"PayrollDeductionRate\": \"4\"\n }\n}"
response = http.request(request)
puts response.read_body{
"employeeMiscellaneousStateTax": {
"status": "Ready",
"message": "The Employee Miscellaneous State Tax Information has been saved successfully."
}
}{
"error": {
"code": 400,
"message": "CompositeRate (5.0) cannot be less than PayrollDeductionRate (7.0)"
}
}Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Body
application/json
Response
The response is of type object.
⌘I
