addBusinessContractor
curl --request POST \
--url https://sandbox.rollfi.xyz/adminPortal/addBusinessContractor \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"method": "addBusinessContractor",
"user": {
"companyId": "A141A4B1-C742-4C43-9A45-E8CCC2FD87F7",
"legalName": "Pear Inc",
"firstName": "Meery",
"middleName": "Austin",
"lastName": "Steve",
"email": "pear001@sto.com",
"phoneNumber": "9889890989",
"dateOfJoin": "2000-01-01",
"jobTitle": "Manager",
"companyLocationCategory": "Remote",
"code": "FL"
},
"userWage": {
"differentialPay": "No",
"wageRate": 1110,
"workerType": "W2",
"wageBasis": "Per Week",
"userType": "Salary/Eligible for overtime",
"employmentStatus": "Full Time (30+ Hours per week)",
"userRefTaxExempt": "Yes, as an owner/corporate officer",
"startDate": "2023-02-25",
"paymentMethod": "Check"
},
"kybInformation": {
"ein": "785698565",
"dateOfIncorporation": "2023-02-25"
},
"companyLocation": {
"address1": "8745 Colard Ln",
"address2": "",
"city": "Lyons",
"state": "CO",
"zipcode": "80540",
"country": "US",
"phoneNumber": "9889890989"
},
"businessUser": {
"address1": "8745 Colard Ln",
"address2": "",
"city": "Lyons",
"state": "CO",
"zipcode": "80540",
"country": "US",
"dateOfBirth": "2000-09-09",
"ownershipPercentage": 28
}
}
'import requests
url = "https://sandbox.rollfi.xyz/adminPortal/addBusinessContractor"
payload = {
"method": "addBusinessContractor",
"user": {
"companyId": "A141A4B1-C742-4C43-9A45-E8CCC2FD87F7",
"legalName": "Pear Inc",
"firstName": "Meery",
"middleName": "Austin",
"lastName": "Steve",
"email": "pear001@sto.com",
"phoneNumber": "9889890989",
"dateOfJoin": "2000-01-01",
"jobTitle": "Manager",
"companyLocationCategory": "Remote",
"code": "FL"
},
"userWage": {
"differentialPay": "No",
"wageRate": 1110,
"workerType": "W2",
"wageBasis": "Per Week",
"userType": "Salary/Eligible for overtime",
"employmentStatus": "Full Time (30+ Hours per week)",
"userRefTaxExempt": "Yes, as an owner/corporate officer",
"startDate": "2023-02-25",
"paymentMethod": "Check"
},
"kybInformation": {
"ein": "785698565",
"dateOfIncorporation": "2023-02-25"
},
"companyLocation": {
"address1": "8745 Colard Ln",
"address2": "",
"city": "Lyons",
"state": "CO",
"zipcode": "80540",
"country": "US",
"phoneNumber": "9889890989"
},
"businessUser": {
"address1": "8745 Colard Ln",
"address2": "",
"city": "Lyons",
"state": "CO",
"zipcode": "80540",
"country": "US",
"dateOfBirth": "2000-09-09",
"ownershipPercentage": 28
}
}
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: 'addBusinessContractor',
user: {
companyId: 'A141A4B1-C742-4C43-9A45-E8CCC2FD87F7',
legalName: 'Pear Inc',
firstName: 'Meery',
middleName: 'Austin',
lastName: 'Steve',
email: 'pear001@sto.com',
phoneNumber: '9889890989',
dateOfJoin: '2000-01-01',
jobTitle: 'Manager',
companyLocationCategory: 'Remote',
code: 'FL'
},
userWage: {
differentialPay: 'No',
wageRate: 1110,
workerType: 'W2',
wageBasis: 'Per Week',
userType: 'Salary/Eligible for overtime',
employmentStatus: 'Full Time (30+ Hours per week)',
userRefTaxExempt: 'Yes, as an owner/corporate officer',
startDate: '2023-02-25',
paymentMethod: 'Check'
},
kybInformation: {ein: '785698565', dateOfIncorporation: '2023-02-25'},
companyLocation: {
address1: '8745 Colard Ln',
address2: '',
city: 'Lyons',
state: 'CO',
zipcode: '80540',
country: 'US',
phoneNumber: '9889890989'
},
businessUser: {
address1: '8745 Colard Ln',
address2: '',
city: 'Lyons',
state: 'CO',
zipcode: '80540',
country: 'US',
dateOfBirth: '2000-09-09',
ownershipPercentage: 28
}
})
};
fetch('https://sandbox.rollfi.xyz/adminPortal/addBusinessContractor', 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/addBusinessContractor",
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' => 'addBusinessContractor',
'user' => [
'companyId' => 'A141A4B1-C742-4C43-9A45-E8CCC2FD87F7',
'legalName' => 'Pear Inc',
'firstName' => 'Meery',
'middleName' => 'Austin',
'lastName' => 'Steve',
'email' => 'pear001@sto.com',
'phoneNumber' => '9889890989',
'dateOfJoin' => '2000-01-01',
'jobTitle' => 'Manager',
'companyLocationCategory' => 'Remote',
'code' => 'FL'
],
'userWage' => [
'differentialPay' => 'No',
'wageRate' => 1110,
'workerType' => 'W2',
'wageBasis' => 'Per Week',
'userType' => 'Salary/Eligible for overtime',
'employmentStatus' => 'Full Time (30+ Hours per week)',
'userRefTaxExempt' => 'Yes, as an owner/corporate officer',
'startDate' => '2023-02-25',
'paymentMethod' => 'Check'
],
'kybInformation' => [
'ein' => '785698565',
'dateOfIncorporation' => '2023-02-25'
],
'companyLocation' => [
'address1' => '8745 Colard Ln',
'address2' => '',
'city' => 'Lyons',
'state' => 'CO',
'zipcode' => '80540',
'country' => 'US',
'phoneNumber' => '9889890989'
],
'businessUser' => [
'address1' => '8745 Colard Ln',
'address2' => '',
'city' => 'Lyons',
'state' => 'CO',
'zipcode' => '80540',
'country' => 'US',
'dateOfBirth' => '2000-09-09',
'ownershipPercentage' => 28
]
]),
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/addBusinessContractor"
payload := strings.NewReader("{\n \"method\": \"addBusinessContractor\",\n \"user\": {\n \"companyId\": \"A141A4B1-C742-4C43-9A45-E8CCC2FD87F7\",\n \"legalName\": \"Pear Inc\",\n \"firstName\": \"Meery\",\n \"middleName\": \"Austin\",\n \"lastName\": \"Steve\",\n \"email\": \"pear001@sto.com\",\n \"phoneNumber\": \"9889890989\",\n \"dateOfJoin\": \"2000-01-01\",\n \"jobTitle\": \"Manager\",\n \"companyLocationCategory\": \"Remote\",\n \"code\": \"FL\"\n },\n \"userWage\": {\n \"differentialPay\": \"No\",\n \"wageRate\": 1110,\n \"workerType\": \"W2\",\n \"wageBasis\": \"Per Week\",\n \"userType\": \"Salary/Eligible for overtime\",\n \"employmentStatus\": \"Full Time (30+ Hours per week)\",\n \"userRefTaxExempt\": \"Yes, as an owner/corporate officer\",\n \"startDate\": \"2023-02-25\",\n \"paymentMethod\": \"Check\"\n },\n \"kybInformation\": {\n \"ein\": \"785698565\",\n \"dateOfIncorporation\": \"2023-02-25\"\n },\n \"companyLocation\": {\n \"address1\": \"8745 Colard Ln\",\n \"address2\": \"\",\n \"city\": \"Lyons\",\n \"state\": \"CO\",\n \"zipcode\": \"80540\",\n \"country\": \"US\",\n \"phoneNumber\": \"9889890989\"\n },\n \"businessUser\": {\n \"address1\": \"8745 Colard Ln\",\n \"address2\": \"\",\n \"city\": \"Lyons\",\n \"state\": \"CO\",\n \"zipcode\": \"80540\",\n \"country\": \"US\",\n \"dateOfBirth\": \"2000-09-09\",\n \"ownershipPercentage\": 28\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/addBusinessContractor")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"method\": \"addBusinessContractor\",\n \"user\": {\n \"companyId\": \"A141A4B1-C742-4C43-9A45-E8CCC2FD87F7\",\n \"legalName\": \"Pear Inc\",\n \"firstName\": \"Meery\",\n \"middleName\": \"Austin\",\n \"lastName\": \"Steve\",\n \"email\": \"pear001@sto.com\",\n \"phoneNumber\": \"9889890989\",\n \"dateOfJoin\": \"2000-01-01\",\n \"jobTitle\": \"Manager\",\n \"companyLocationCategory\": \"Remote\",\n \"code\": \"FL\"\n },\n \"userWage\": {\n \"differentialPay\": \"No\",\n \"wageRate\": 1110,\n \"workerType\": \"W2\",\n \"wageBasis\": \"Per Week\",\n \"userType\": \"Salary/Eligible for overtime\",\n \"employmentStatus\": \"Full Time (30+ Hours per week)\",\n \"userRefTaxExempt\": \"Yes, as an owner/corporate officer\",\n \"startDate\": \"2023-02-25\",\n \"paymentMethod\": \"Check\"\n },\n \"kybInformation\": {\n \"ein\": \"785698565\",\n \"dateOfIncorporation\": \"2023-02-25\"\n },\n \"companyLocation\": {\n \"address1\": \"8745 Colard Ln\",\n \"address2\": \"\",\n \"city\": \"Lyons\",\n \"state\": \"CO\",\n \"zipcode\": \"80540\",\n \"country\": \"US\",\n \"phoneNumber\": \"9889890989\"\n },\n \"businessUser\": {\n \"address1\": \"8745 Colard Ln\",\n \"address2\": \"\",\n \"city\": \"Lyons\",\n \"state\": \"CO\",\n \"zipcode\": \"80540\",\n \"country\": \"US\",\n \"dateOfBirth\": \"2000-09-09\",\n \"ownershipPercentage\": 28\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.rollfi.xyz/adminPortal/addBusinessContractor")
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\": \"addBusinessContractor\",\n \"user\": {\n \"companyId\": \"A141A4B1-C742-4C43-9A45-E8CCC2FD87F7\",\n \"legalName\": \"Pear Inc\",\n \"firstName\": \"Meery\",\n \"middleName\": \"Austin\",\n \"lastName\": \"Steve\",\n \"email\": \"pear001@sto.com\",\n \"phoneNumber\": \"9889890989\",\n \"dateOfJoin\": \"2000-01-01\",\n \"jobTitle\": \"Manager\",\n \"companyLocationCategory\": \"Remote\",\n \"code\": \"FL\"\n },\n \"userWage\": {\n \"differentialPay\": \"No\",\n \"wageRate\": 1110,\n \"workerType\": \"W2\",\n \"wageBasis\": \"Per Week\",\n \"userType\": \"Salary/Eligible for overtime\",\n \"employmentStatus\": \"Full Time (30+ Hours per week)\",\n \"userRefTaxExempt\": \"Yes, as an owner/corporate officer\",\n \"startDate\": \"2023-02-25\",\n \"paymentMethod\": \"Check\"\n },\n \"kybInformation\": {\n \"ein\": \"785698565\",\n \"dateOfIncorporation\": \"2023-02-25\"\n },\n \"companyLocation\": {\n \"address1\": \"8745 Colard Ln\",\n \"address2\": \"\",\n \"city\": \"Lyons\",\n \"state\": \"CO\",\n \"zipcode\": \"80540\",\n \"country\": \"US\",\n \"phoneNumber\": \"9889890989\"\n },\n \"businessUser\": {\n \"address1\": \"8745 Colard Ln\",\n \"address2\": \"\",\n \"city\": \"Lyons\",\n \"state\": \"CO\",\n \"zipcode\": \"80540\",\n \"country\": \"US\",\n \"dateOfBirth\": \"2000-09-09\",\n \"ownershipPercentage\": 28\n }\n}"
response = http.request(request)
puts response.read_body{
"businessContractor": {
"companyId": "B06FF5C9-D654-4B6F-ABF0-072AF5A7D1CF",
"kybInformationId": "51A02CD2-745A-4C77-B7C6-6711ABBD9EEE",
"userId": "088B3C3C-F7C2-4F42-999A-CC1FA135CE82",
"userWageId": "C62AD35C-5BDF-4B9F-9E0A-6C97A44730BF",
"businessUserId": "088B3C3C-F7C2-4F42-999A-CC1FA135CE82",
"companyLocationId": "401AB38E-5C90-48F1-BBEA-F7449B41DB80",
"status": "Registered",
"message": "A business contractor has been registered successfully and KYB verification is in progress."
}
}{
"error": {
"code": 400,
"message": "First Name is mandatory and cannot be empty."
}
}Admin Portal
addBusinessContractor
The addBusinessContractor API creates a new business contractor who interacts with the company payroll.
What it does:
- Creates a business contractor user with address, KYB (Know Your Business) data, wage and company location
- Records the ownership share of the business user in their respective company
Notes:
- Different from regular contractors created with
addUser- this is specifically for business contractors - Business contractors are separate from business users who have administrative roles
POST
/
adminPortal
/
addBusinessContractor
addBusinessContractor
curl --request POST \
--url https://sandbox.rollfi.xyz/adminPortal/addBusinessContractor \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"method": "addBusinessContractor",
"user": {
"companyId": "A141A4B1-C742-4C43-9A45-E8CCC2FD87F7",
"legalName": "Pear Inc",
"firstName": "Meery",
"middleName": "Austin",
"lastName": "Steve",
"email": "pear001@sto.com",
"phoneNumber": "9889890989",
"dateOfJoin": "2000-01-01",
"jobTitle": "Manager",
"companyLocationCategory": "Remote",
"code": "FL"
},
"userWage": {
"differentialPay": "No",
"wageRate": 1110,
"workerType": "W2",
"wageBasis": "Per Week",
"userType": "Salary/Eligible for overtime",
"employmentStatus": "Full Time (30+ Hours per week)",
"userRefTaxExempt": "Yes, as an owner/corporate officer",
"startDate": "2023-02-25",
"paymentMethod": "Check"
},
"kybInformation": {
"ein": "785698565",
"dateOfIncorporation": "2023-02-25"
},
"companyLocation": {
"address1": "8745 Colard Ln",
"address2": "",
"city": "Lyons",
"state": "CO",
"zipcode": "80540",
"country": "US",
"phoneNumber": "9889890989"
},
"businessUser": {
"address1": "8745 Colard Ln",
"address2": "",
"city": "Lyons",
"state": "CO",
"zipcode": "80540",
"country": "US",
"dateOfBirth": "2000-09-09",
"ownershipPercentage": 28
}
}
'import requests
url = "https://sandbox.rollfi.xyz/adminPortal/addBusinessContractor"
payload = {
"method": "addBusinessContractor",
"user": {
"companyId": "A141A4B1-C742-4C43-9A45-E8CCC2FD87F7",
"legalName": "Pear Inc",
"firstName": "Meery",
"middleName": "Austin",
"lastName": "Steve",
"email": "pear001@sto.com",
"phoneNumber": "9889890989",
"dateOfJoin": "2000-01-01",
"jobTitle": "Manager",
"companyLocationCategory": "Remote",
"code": "FL"
},
"userWage": {
"differentialPay": "No",
"wageRate": 1110,
"workerType": "W2",
"wageBasis": "Per Week",
"userType": "Salary/Eligible for overtime",
"employmentStatus": "Full Time (30+ Hours per week)",
"userRefTaxExempt": "Yes, as an owner/corporate officer",
"startDate": "2023-02-25",
"paymentMethod": "Check"
},
"kybInformation": {
"ein": "785698565",
"dateOfIncorporation": "2023-02-25"
},
"companyLocation": {
"address1": "8745 Colard Ln",
"address2": "",
"city": "Lyons",
"state": "CO",
"zipcode": "80540",
"country": "US",
"phoneNumber": "9889890989"
},
"businessUser": {
"address1": "8745 Colard Ln",
"address2": "",
"city": "Lyons",
"state": "CO",
"zipcode": "80540",
"country": "US",
"dateOfBirth": "2000-09-09",
"ownershipPercentage": 28
}
}
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: 'addBusinessContractor',
user: {
companyId: 'A141A4B1-C742-4C43-9A45-E8CCC2FD87F7',
legalName: 'Pear Inc',
firstName: 'Meery',
middleName: 'Austin',
lastName: 'Steve',
email: 'pear001@sto.com',
phoneNumber: '9889890989',
dateOfJoin: '2000-01-01',
jobTitle: 'Manager',
companyLocationCategory: 'Remote',
code: 'FL'
},
userWage: {
differentialPay: 'No',
wageRate: 1110,
workerType: 'W2',
wageBasis: 'Per Week',
userType: 'Salary/Eligible for overtime',
employmentStatus: 'Full Time (30+ Hours per week)',
userRefTaxExempt: 'Yes, as an owner/corporate officer',
startDate: '2023-02-25',
paymentMethod: 'Check'
},
kybInformation: {ein: '785698565', dateOfIncorporation: '2023-02-25'},
companyLocation: {
address1: '8745 Colard Ln',
address2: '',
city: 'Lyons',
state: 'CO',
zipcode: '80540',
country: 'US',
phoneNumber: '9889890989'
},
businessUser: {
address1: '8745 Colard Ln',
address2: '',
city: 'Lyons',
state: 'CO',
zipcode: '80540',
country: 'US',
dateOfBirth: '2000-09-09',
ownershipPercentage: 28
}
})
};
fetch('https://sandbox.rollfi.xyz/adminPortal/addBusinessContractor', 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/addBusinessContractor",
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' => 'addBusinessContractor',
'user' => [
'companyId' => 'A141A4B1-C742-4C43-9A45-E8CCC2FD87F7',
'legalName' => 'Pear Inc',
'firstName' => 'Meery',
'middleName' => 'Austin',
'lastName' => 'Steve',
'email' => 'pear001@sto.com',
'phoneNumber' => '9889890989',
'dateOfJoin' => '2000-01-01',
'jobTitle' => 'Manager',
'companyLocationCategory' => 'Remote',
'code' => 'FL'
],
'userWage' => [
'differentialPay' => 'No',
'wageRate' => 1110,
'workerType' => 'W2',
'wageBasis' => 'Per Week',
'userType' => 'Salary/Eligible for overtime',
'employmentStatus' => 'Full Time (30+ Hours per week)',
'userRefTaxExempt' => 'Yes, as an owner/corporate officer',
'startDate' => '2023-02-25',
'paymentMethod' => 'Check'
],
'kybInformation' => [
'ein' => '785698565',
'dateOfIncorporation' => '2023-02-25'
],
'companyLocation' => [
'address1' => '8745 Colard Ln',
'address2' => '',
'city' => 'Lyons',
'state' => 'CO',
'zipcode' => '80540',
'country' => 'US',
'phoneNumber' => '9889890989'
],
'businessUser' => [
'address1' => '8745 Colard Ln',
'address2' => '',
'city' => 'Lyons',
'state' => 'CO',
'zipcode' => '80540',
'country' => 'US',
'dateOfBirth' => '2000-09-09',
'ownershipPercentage' => 28
]
]),
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/addBusinessContractor"
payload := strings.NewReader("{\n \"method\": \"addBusinessContractor\",\n \"user\": {\n \"companyId\": \"A141A4B1-C742-4C43-9A45-E8CCC2FD87F7\",\n \"legalName\": \"Pear Inc\",\n \"firstName\": \"Meery\",\n \"middleName\": \"Austin\",\n \"lastName\": \"Steve\",\n \"email\": \"pear001@sto.com\",\n \"phoneNumber\": \"9889890989\",\n \"dateOfJoin\": \"2000-01-01\",\n \"jobTitle\": \"Manager\",\n \"companyLocationCategory\": \"Remote\",\n \"code\": \"FL\"\n },\n \"userWage\": {\n \"differentialPay\": \"No\",\n \"wageRate\": 1110,\n \"workerType\": \"W2\",\n \"wageBasis\": \"Per Week\",\n \"userType\": \"Salary/Eligible for overtime\",\n \"employmentStatus\": \"Full Time (30+ Hours per week)\",\n \"userRefTaxExempt\": \"Yes, as an owner/corporate officer\",\n \"startDate\": \"2023-02-25\",\n \"paymentMethod\": \"Check\"\n },\n \"kybInformation\": {\n \"ein\": \"785698565\",\n \"dateOfIncorporation\": \"2023-02-25\"\n },\n \"companyLocation\": {\n \"address1\": \"8745 Colard Ln\",\n \"address2\": \"\",\n \"city\": \"Lyons\",\n \"state\": \"CO\",\n \"zipcode\": \"80540\",\n \"country\": \"US\",\n \"phoneNumber\": \"9889890989\"\n },\n \"businessUser\": {\n \"address1\": \"8745 Colard Ln\",\n \"address2\": \"\",\n \"city\": \"Lyons\",\n \"state\": \"CO\",\n \"zipcode\": \"80540\",\n \"country\": \"US\",\n \"dateOfBirth\": \"2000-09-09\",\n \"ownershipPercentage\": 28\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/addBusinessContractor")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"method\": \"addBusinessContractor\",\n \"user\": {\n \"companyId\": \"A141A4B1-C742-4C43-9A45-E8CCC2FD87F7\",\n \"legalName\": \"Pear Inc\",\n \"firstName\": \"Meery\",\n \"middleName\": \"Austin\",\n \"lastName\": \"Steve\",\n \"email\": \"pear001@sto.com\",\n \"phoneNumber\": \"9889890989\",\n \"dateOfJoin\": \"2000-01-01\",\n \"jobTitle\": \"Manager\",\n \"companyLocationCategory\": \"Remote\",\n \"code\": \"FL\"\n },\n \"userWage\": {\n \"differentialPay\": \"No\",\n \"wageRate\": 1110,\n \"workerType\": \"W2\",\n \"wageBasis\": \"Per Week\",\n \"userType\": \"Salary/Eligible for overtime\",\n \"employmentStatus\": \"Full Time (30+ Hours per week)\",\n \"userRefTaxExempt\": \"Yes, as an owner/corporate officer\",\n \"startDate\": \"2023-02-25\",\n \"paymentMethod\": \"Check\"\n },\n \"kybInformation\": {\n \"ein\": \"785698565\",\n \"dateOfIncorporation\": \"2023-02-25\"\n },\n \"companyLocation\": {\n \"address1\": \"8745 Colard Ln\",\n \"address2\": \"\",\n \"city\": \"Lyons\",\n \"state\": \"CO\",\n \"zipcode\": \"80540\",\n \"country\": \"US\",\n \"phoneNumber\": \"9889890989\"\n },\n \"businessUser\": {\n \"address1\": \"8745 Colard Ln\",\n \"address2\": \"\",\n \"city\": \"Lyons\",\n \"state\": \"CO\",\n \"zipcode\": \"80540\",\n \"country\": \"US\",\n \"dateOfBirth\": \"2000-09-09\",\n \"ownershipPercentage\": 28\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.rollfi.xyz/adminPortal/addBusinessContractor")
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\": \"addBusinessContractor\",\n \"user\": {\n \"companyId\": \"A141A4B1-C742-4C43-9A45-E8CCC2FD87F7\",\n \"legalName\": \"Pear Inc\",\n \"firstName\": \"Meery\",\n \"middleName\": \"Austin\",\n \"lastName\": \"Steve\",\n \"email\": \"pear001@sto.com\",\n \"phoneNumber\": \"9889890989\",\n \"dateOfJoin\": \"2000-01-01\",\n \"jobTitle\": \"Manager\",\n \"companyLocationCategory\": \"Remote\",\n \"code\": \"FL\"\n },\n \"userWage\": {\n \"differentialPay\": \"No\",\n \"wageRate\": 1110,\n \"workerType\": \"W2\",\n \"wageBasis\": \"Per Week\",\n \"userType\": \"Salary/Eligible for overtime\",\n \"employmentStatus\": \"Full Time (30+ Hours per week)\",\n \"userRefTaxExempt\": \"Yes, as an owner/corporate officer\",\n \"startDate\": \"2023-02-25\",\n \"paymentMethod\": \"Check\"\n },\n \"kybInformation\": {\n \"ein\": \"785698565\",\n \"dateOfIncorporation\": \"2023-02-25\"\n },\n \"companyLocation\": {\n \"address1\": \"8745 Colard Ln\",\n \"address2\": \"\",\n \"city\": \"Lyons\",\n \"state\": \"CO\",\n \"zipcode\": \"80540\",\n \"country\": \"US\",\n \"phoneNumber\": \"9889890989\"\n },\n \"businessUser\": {\n \"address1\": \"8745 Colard Ln\",\n \"address2\": \"\",\n \"city\": \"Lyons\",\n \"state\": \"CO\",\n \"zipcode\": \"80540\",\n \"country\": \"US\",\n \"dateOfBirth\": \"2000-09-09\",\n \"ownershipPercentage\": 28\n }\n}"
response = http.request(request)
puts response.read_body{
"businessContractor": {
"companyId": "B06FF5C9-D654-4B6F-ABF0-072AF5A7D1CF",
"kybInformationId": "51A02CD2-745A-4C77-B7C6-6711ABBD9EEE",
"userId": "088B3C3C-F7C2-4F42-999A-CC1FA135CE82",
"userWageId": "C62AD35C-5BDF-4B9F-9E0A-6C97A44730BF",
"businessUserId": "088B3C3C-F7C2-4F42-999A-CC1FA135CE82",
"companyLocationId": "401AB38E-5C90-48F1-BBEA-F7449B41DB80",
"status": "Registered",
"message": "A business contractor has been registered successfully and KYB verification is in progress."
}
}{
"error": {
"code": 400,
"message": "First Name is mandatory and cannot be empty."
}
}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
