Paylocity API
PUT
Add-update additional rates
{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/additionalRates
QUERY PARAMS
companyId
employeeId
BODY json
{
"changeReason": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"endCheckDate": "",
"job": "",
"rate": "",
"rateCode": "",
"rateNotes": "",
"ratePer": "",
"shift": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/additionalRates");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"changeReason\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"endCheckDate\": \"\",\n \"job\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"rateNotes\": \"\",\n \"ratePer\": \"\",\n \"shift\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/additionalRates" {:content-type :json
:form-params {:changeReason ""
:costCenter1 ""
:costCenter2 ""
:costCenter3 ""
:effectiveDate ""
:endCheckDate ""
:job ""
:rate ""
:rateCode ""
:rateNotes ""
:ratePer ""
:shift ""}})
require "http/client"
url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/additionalRates"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"changeReason\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"endCheckDate\": \"\",\n \"job\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"rateNotes\": \"\",\n \"ratePer\": \"\",\n \"shift\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/additionalRates"),
Content = new StringContent("{\n \"changeReason\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"endCheckDate\": \"\",\n \"job\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"rateNotes\": \"\",\n \"ratePer\": \"\",\n \"shift\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/additionalRates");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"changeReason\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"endCheckDate\": \"\",\n \"job\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"rateNotes\": \"\",\n \"ratePer\": \"\",\n \"shift\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/additionalRates"
payload := strings.NewReader("{\n \"changeReason\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"endCheckDate\": \"\",\n \"job\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"rateNotes\": \"\",\n \"ratePer\": \"\",\n \"shift\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/v2/companies/:companyId/employees/:employeeId/additionalRates HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 228
{
"changeReason": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"endCheckDate": "",
"job": "",
"rate": "",
"rateCode": "",
"rateNotes": "",
"ratePer": "",
"shift": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/additionalRates")
.setHeader("content-type", "application/json")
.setBody("{\n \"changeReason\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"endCheckDate\": \"\",\n \"job\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"rateNotes\": \"\",\n \"ratePer\": \"\",\n \"shift\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/additionalRates"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"changeReason\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"endCheckDate\": \"\",\n \"job\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"rateNotes\": \"\",\n \"ratePer\": \"\",\n \"shift\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"changeReason\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"endCheckDate\": \"\",\n \"job\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"rateNotes\": \"\",\n \"ratePer\": \"\",\n \"shift\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/additionalRates")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/additionalRates")
.header("content-type", "application/json")
.body("{\n \"changeReason\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"endCheckDate\": \"\",\n \"job\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"rateNotes\": \"\",\n \"ratePer\": \"\",\n \"shift\": \"\"\n}")
.asString();
const data = JSON.stringify({
changeReason: '',
costCenter1: '',
costCenter2: '',
costCenter3: '',
effectiveDate: '',
endCheckDate: '',
job: '',
rate: '',
rateCode: '',
rateNotes: '',
ratePer: '',
shift: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/additionalRates');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/additionalRates',
headers: {'content-type': 'application/json'},
data: {
changeReason: '',
costCenter1: '',
costCenter2: '',
costCenter3: '',
effectiveDate: '',
endCheckDate: '',
job: '',
rate: '',
rateCode: '',
rateNotes: '',
ratePer: '',
shift: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/additionalRates';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"changeReason":"","costCenter1":"","costCenter2":"","costCenter3":"","effectiveDate":"","endCheckDate":"","job":"","rate":"","rateCode":"","rateNotes":"","ratePer":"","shift":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/additionalRates',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "changeReason": "",\n "costCenter1": "",\n "costCenter2": "",\n "costCenter3": "",\n "effectiveDate": "",\n "endCheckDate": "",\n "job": "",\n "rate": "",\n "rateCode": "",\n "rateNotes": "",\n "ratePer": "",\n "shift": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"changeReason\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"endCheckDate\": \"\",\n \"job\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"rateNotes\": \"\",\n \"ratePer\": \"\",\n \"shift\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/additionalRates")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/companies/:companyId/employees/:employeeId/additionalRates',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
changeReason: '',
costCenter1: '',
costCenter2: '',
costCenter3: '',
effectiveDate: '',
endCheckDate: '',
job: '',
rate: '',
rateCode: '',
rateNotes: '',
ratePer: '',
shift: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/additionalRates',
headers: {'content-type': 'application/json'},
body: {
changeReason: '',
costCenter1: '',
costCenter2: '',
costCenter3: '',
effectiveDate: '',
endCheckDate: '',
job: '',
rate: '',
rateCode: '',
rateNotes: '',
ratePer: '',
shift: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/additionalRates');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
changeReason: '',
costCenter1: '',
costCenter2: '',
costCenter3: '',
effectiveDate: '',
endCheckDate: '',
job: '',
rate: '',
rateCode: '',
rateNotes: '',
ratePer: '',
shift: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/additionalRates',
headers: {'content-type': 'application/json'},
data: {
changeReason: '',
costCenter1: '',
costCenter2: '',
costCenter3: '',
effectiveDate: '',
endCheckDate: '',
job: '',
rate: '',
rateCode: '',
rateNotes: '',
ratePer: '',
shift: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/additionalRates';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"changeReason":"","costCenter1":"","costCenter2":"","costCenter3":"","effectiveDate":"","endCheckDate":"","job":"","rate":"","rateCode":"","rateNotes":"","ratePer":"","shift":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"changeReason": @"",
@"costCenter1": @"",
@"costCenter2": @"",
@"costCenter3": @"",
@"effectiveDate": @"",
@"endCheckDate": @"",
@"job": @"",
@"rate": @"",
@"rateCode": @"",
@"rateNotes": @"",
@"ratePer": @"",
@"shift": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/additionalRates"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/additionalRates" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"changeReason\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"endCheckDate\": \"\",\n \"job\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"rateNotes\": \"\",\n \"ratePer\": \"\",\n \"shift\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/additionalRates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'changeReason' => '',
'costCenter1' => '',
'costCenter2' => '',
'costCenter3' => '',
'effectiveDate' => '',
'endCheckDate' => '',
'job' => '',
'rate' => '',
'rateCode' => '',
'rateNotes' => '',
'ratePer' => '',
'shift' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/additionalRates', [
'body' => '{
"changeReason": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"endCheckDate": "",
"job": "",
"rate": "",
"rateCode": "",
"rateNotes": "",
"ratePer": "",
"shift": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/additionalRates');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'changeReason' => '',
'costCenter1' => '',
'costCenter2' => '',
'costCenter3' => '',
'effectiveDate' => '',
'endCheckDate' => '',
'job' => '',
'rate' => '',
'rateCode' => '',
'rateNotes' => '',
'ratePer' => '',
'shift' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'changeReason' => '',
'costCenter1' => '',
'costCenter2' => '',
'costCenter3' => '',
'effectiveDate' => '',
'endCheckDate' => '',
'job' => '',
'rate' => '',
'rateCode' => '',
'rateNotes' => '',
'ratePer' => '',
'shift' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/additionalRates');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/additionalRates' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"changeReason": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"endCheckDate": "",
"job": "",
"rate": "",
"rateCode": "",
"rateNotes": "",
"ratePer": "",
"shift": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/additionalRates' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"changeReason": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"endCheckDate": "",
"job": "",
"rate": "",
"rateCode": "",
"rateNotes": "",
"ratePer": "",
"shift": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"changeReason\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"endCheckDate\": \"\",\n \"job\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"rateNotes\": \"\",\n \"ratePer\": \"\",\n \"shift\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v2/companies/:companyId/employees/:employeeId/additionalRates", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/additionalRates"
payload = {
"changeReason": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"endCheckDate": "",
"job": "",
"rate": "",
"rateCode": "",
"rateNotes": "",
"ratePer": "",
"shift": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/additionalRates"
payload <- "{\n \"changeReason\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"endCheckDate\": \"\",\n \"job\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"rateNotes\": \"\",\n \"ratePer\": \"\",\n \"shift\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/additionalRates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"changeReason\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"endCheckDate\": \"\",\n \"job\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"rateNotes\": \"\",\n \"ratePer\": \"\",\n \"shift\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/v2/companies/:companyId/employees/:employeeId/additionalRates') do |req|
req.body = "{\n \"changeReason\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"endCheckDate\": \"\",\n \"job\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"rateNotes\": \"\",\n \"ratePer\": \"\",\n \"shift\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/additionalRates";
let payload = json!({
"changeReason": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"endCheckDate": "",
"job": "",
"rate": "",
"rateCode": "",
"rateNotes": "",
"ratePer": "",
"shift": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/additionalRates \
--header 'content-type: application/json' \
--data '{
"changeReason": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"endCheckDate": "",
"job": "",
"rate": "",
"rateCode": "",
"rateNotes": "",
"ratePer": "",
"shift": ""
}'
echo '{
"changeReason": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"endCheckDate": "",
"job": "",
"rate": "",
"rateCode": "",
"rateNotes": "",
"ratePer": "",
"shift": ""
}' | \
http PUT {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/additionalRates \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "changeReason": "",\n "costCenter1": "",\n "costCenter2": "",\n "costCenter3": "",\n "effectiveDate": "",\n "endCheckDate": "",\n "job": "",\n "rate": "",\n "rateCode": "",\n "rateNotes": "",\n "ratePer": "",\n "shift": ""\n}' \
--output-document \
- {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/additionalRates
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"changeReason": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"endCheckDate": "",
"job": "",
"rate": "",
"rateCode": "",
"rateNotes": "",
"ratePer": "",
"shift": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/additionalRates")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Obtain new client secret.
{{baseUrl}}/v2/credentials/secrets
BODY json
{
"code": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/credentials/secrets");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"code\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v2/credentials/secrets" {:content-type :json
:form-params {:code ""}})
require "http/client"
url = "{{baseUrl}}/v2/credentials/secrets"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"code\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v2/credentials/secrets"),
Content = new StringContent("{\n \"code\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/credentials/secrets");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"code\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/credentials/secrets"
payload := strings.NewReader("{\n \"code\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v2/credentials/secrets HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 16
{
"code": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v2/credentials/secrets")
.setHeader("content-type", "application/json")
.setBody("{\n \"code\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/credentials/secrets"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"code\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"code\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/credentials/secrets")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v2/credentials/secrets")
.header("content-type", "application/json")
.body("{\n \"code\": \"\"\n}")
.asString();
const data = JSON.stringify({
code: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v2/credentials/secrets');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/credentials/secrets',
headers: {'content-type': 'application/json'},
data: {code: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/credentials/secrets';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"code":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/credentials/secrets',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "code": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"code\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v2/credentials/secrets")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/credentials/secrets',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({code: ''}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/credentials/secrets',
headers: {'content-type': 'application/json'},
body: {code: ''},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v2/credentials/secrets');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
code: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/credentials/secrets',
headers: {'content-type': 'application/json'},
data: {code: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/credentials/secrets';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"code":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"code": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/credentials/secrets"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/credentials/secrets" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"code\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/credentials/secrets",
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([
'code' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v2/credentials/secrets', [
'body' => '{
"code": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/credentials/secrets');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'code' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'code' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v2/credentials/secrets');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/credentials/secrets' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"code": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/credentials/secrets' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"code": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"code\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v2/credentials/secrets", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/credentials/secrets"
payload = { "code": "" }
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/credentials/secrets"
payload <- "{\n \"code\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/credentials/secrets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"code\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v2/credentials/secrets') do |req|
req.body = "{\n \"code\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/credentials/secrets";
let payload = json!({"code": ""});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v2/credentials/secrets \
--header 'content-type: application/json' \
--data '{
"code": ""
}'
echo '{
"code": ""
}' | \
http POST {{baseUrl}}/v2/credentials/secrets \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "code": ""\n}' \
--output-document \
- {{baseUrl}}/v2/credentials/secrets
import Foundation
let headers = ["content-type": "application/json"]
let parameters = ["code": ""] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/credentials/secrets")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Get All Company Codes
{{baseUrl}}/v2/companies/:companyId/codes/:codeResource
QUERY PARAMS
companyId
codeResource
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/companies/:companyId/codes/:codeResource");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/companies/:companyId/codes/:codeResource")
require "http/client"
url = "{{baseUrl}}/v2/companies/:companyId/codes/:codeResource"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v2/companies/:companyId/codes/:codeResource"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/companies/:companyId/codes/:codeResource");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/companies/:companyId/codes/:codeResource"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v2/companies/:companyId/codes/:codeResource HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/companies/:companyId/codes/:codeResource")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/companies/:companyId/codes/:codeResource"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/codes/:codeResource")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/companies/:companyId/codes/:codeResource")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v2/companies/:companyId/codes/:codeResource');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/companies/:companyId/codes/:codeResource'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/companies/:companyId/codes/:codeResource';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/companies/:companyId/codes/:codeResource',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/codes/:codeResource")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/companies/:companyId/codes/:codeResource',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/companies/:companyId/codes/:codeResource'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v2/companies/:companyId/codes/:codeResource');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/companies/:companyId/codes/:codeResource'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/companies/:companyId/codes/:codeResource';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/companies/:companyId/codes/:codeResource"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/companies/:companyId/codes/:codeResource" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/companies/:companyId/codes/:codeResource",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v2/companies/:companyId/codes/:codeResource');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/companies/:companyId/codes/:codeResource');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/companies/:companyId/codes/:codeResource');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/companies/:companyId/codes/:codeResource' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/companies/:companyId/codes/:codeResource' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v2/companies/:companyId/codes/:codeResource")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/companies/:companyId/codes/:codeResource"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/companies/:companyId/codes/:codeResource"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/companies/:companyId/codes/:codeResource")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v2/companies/:companyId/codes/:codeResource') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/companies/:companyId/codes/:codeResource";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v2/companies/:companyId/codes/:codeResource
http GET {{baseUrl}}/v2/companies/:companyId/codes/:codeResource
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v2/companies/:companyId/codes/:codeResource
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/companies/:companyId/codes/:codeResource")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Get Company-Specific Open API Documentation
{{baseUrl}}/v2/companies/:companyId/openapi
HEADERS
Authorization
QUERY PARAMS
companyId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/companies/:companyId/openapi");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "authorization: ");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/companies/:companyId/openapi" {:headers {:authorization ""}})
require "http/client"
url = "{{baseUrl}}/v2/companies/:companyId/openapi"
headers = HTTP::Headers{
"authorization" => ""
}
response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v2/companies/:companyId/openapi"),
Headers =
{
{ "authorization", "" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/companies/:companyId/openapi");
var request = new RestRequest("", Method.Get);
request.AddHeader("authorization", "");
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/companies/:companyId/openapi"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("authorization", "")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v2/companies/:companyId/openapi HTTP/1.1
Authorization:
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/companies/:companyId/openapi")
.setHeader("authorization", "")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/companies/:companyId/openapi"))
.header("authorization", "")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/openapi")
.get()
.addHeader("authorization", "")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/companies/:companyId/openapi")
.header("authorization", "")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v2/companies/:companyId/openapi');
xhr.setRequestHeader('authorization', '');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/companies/:companyId/openapi',
headers: {authorization: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/companies/:companyId/openapi';
const options = {method: 'GET', headers: {authorization: ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/companies/:companyId/openapi',
method: 'GET',
headers: {
authorization: ''
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/openapi")
.get()
.addHeader("authorization", "")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/companies/:companyId/openapi',
headers: {
authorization: ''
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/companies/:companyId/openapi',
headers: {authorization: ''}
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v2/companies/:companyId/openapi');
req.headers({
authorization: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/companies/:companyId/openapi',
headers: {authorization: ''}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/companies/:companyId/openapi';
const options = {method: 'GET', headers: {authorization: ''}};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"authorization": @"" };
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/companies/:companyId/openapi"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/companies/:companyId/openapi" in
let headers = Header.add (Header.init ()) "authorization" "" in
Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/companies/:companyId/openapi",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"authorization: "
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v2/companies/:companyId/openapi', [
'headers' => [
'authorization' => '',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/companies/:companyId/openapi');
$request->setMethod(HTTP_METH_GET);
$request->setHeaders([
'authorization' => ''
]);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/companies/:companyId/openapi');
$request->setRequestMethod('GET');
$request->setHeaders([
'authorization' => ''
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("authorization", "")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/companies/:companyId/openapi' -Method GET -Headers $headers
$headers=@{}
$headers.Add("authorization", "")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/companies/:companyId/openapi' -Method GET -Headers $headers
import http.client
conn = http.client.HTTPSConnection("example.com")
headers = { 'authorization': "" }
conn.request("GET", "/baseUrl/v2/companies/:companyId/openapi", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/companies/:companyId/openapi"
headers = {"authorization": ""}
response = requests.get(url, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/companies/:companyId/openapi"
response <- VERB("GET", url, add_headers('authorization' = ''), content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/companies/:companyId/openapi")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["authorization"] = ''
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v2/companies/:companyId/openapi') do |req|
req.headers['authorization'] = ''
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/companies/:companyId/openapi";
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("authorization", "".parse().unwrap());
let client = reqwest::Client::new();
let response = client.get(url)
.headers(headers)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v2/companies/:companyId/openapi \
--header 'authorization: '
http GET {{baseUrl}}/v2/companies/:companyId/openapi \
authorization:''
wget --quiet \
--method GET \
--header 'authorization: ' \
--output-document \
- {{baseUrl}}/v2/companies/:companyId/openapi
import Foundation
let headers = ["authorization": ""]
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/companies/:companyId/openapi")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Get All Custom Fields
{{baseUrl}}/v2/companies/:companyId/customfields/:category
QUERY PARAMS
companyId
category
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/companies/:companyId/customfields/:category");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/companies/:companyId/customfields/:category")
require "http/client"
url = "{{baseUrl}}/v2/companies/:companyId/customfields/:category"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v2/companies/:companyId/customfields/:category"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/companies/:companyId/customfields/:category");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/companies/:companyId/customfields/:category"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v2/companies/:companyId/customfields/:category HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/companies/:companyId/customfields/:category")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/companies/:companyId/customfields/:category"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/customfields/:category")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/companies/:companyId/customfields/:category")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v2/companies/:companyId/customfields/:category');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/companies/:companyId/customfields/:category'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/companies/:companyId/customfields/:category';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/companies/:companyId/customfields/:category',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/customfields/:category")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/companies/:companyId/customfields/:category',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/companies/:companyId/customfields/:category'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v2/companies/:companyId/customfields/:category');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/companies/:companyId/customfields/:category'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/companies/:companyId/customfields/:category';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/companies/:companyId/customfields/:category"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/companies/:companyId/customfields/:category" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/companies/:companyId/customfields/:category",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v2/companies/:companyId/customfields/:category');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/companies/:companyId/customfields/:category');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/companies/:companyId/customfields/:category');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/companies/:companyId/customfields/:category' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/companies/:companyId/customfields/:category' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v2/companies/:companyId/customfields/:category")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/companies/:companyId/customfields/:category"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/companies/:companyId/customfields/:category"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/companies/:companyId/customfields/:category")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v2/companies/:companyId/customfields/:category') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/companies/:companyId/customfields/:category";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v2/companies/:companyId/customfields/:category
http GET {{baseUrl}}/v2/companies/:companyId/customfields/:category
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v2/companies/:companyId/customfields/:category
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/companies/:companyId/customfields/:category")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Get All Direct Deposit
{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/directDeposit
QUERY PARAMS
companyId
employeeId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/directDeposit");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/directDeposit")
require "http/client"
url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/directDeposit"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/directDeposit"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/directDeposit");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/directDeposit"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v2/companies/:companyId/employees/:employeeId/directDeposit HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/directDeposit")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/directDeposit"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/directDeposit")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/directDeposit")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/directDeposit');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/directDeposit'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/directDeposit';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/directDeposit',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/directDeposit")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/companies/:companyId/employees/:employeeId/directDeposit',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/directDeposit'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/directDeposit');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/directDeposit'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/directDeposit';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/directDeposit"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/directDeposit" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/directDeposit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/directDeposit');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/directDeposit');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/directDeposit');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/directDeposit' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/directDeposit' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v2/companies/:companyId/employees/:employeeId/directDeposit")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/directDeposit"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/directDeposit"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/directDeposit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v2/companies/:companyId/employees/:employeeId/directDeposit') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/directDeposit";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/directDeposit
http GET {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/directDeposit
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/directDeposit
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/directDeposit")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
Add-Update Earning
{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings
QUERY PARAMS
companyId
employeeId
BODY json
{
"agency": "",
"amount": "",
"annualMaximum": "",
"calculationCode": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"earningCode": "",
"effectiveDate": "",
"endDate": "",
"frequency": "",
"goal": "",
"hoursOrUnits": "",
"isSelfInsured": false,
"jobCode": "",
"miscellaneousInfo": "",
"paidTowardsGoal": "",
"payPeriodMaximum": "",
"payPeriodMinimum": "",
"rate": "",
"rateCode": "",
"startDate": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"agency\": \"\",\n \"amount\": \"\",\n \"annualMaximum\": \"\",\n \"calculationCode\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"earningCode\": \"\",\n \"effectiveDate\": \"\",\n \"endDate\": \"\",\n \"frequency\": \"\",\n \"goal\": \"\",\n \"hoursOrUnits\": \"\",\n \"isSelfInsured\": false,\n \"jobCode\": \"\",\n \"miscellaneousInfo\": \"\",\n \"paidTowardsGoal\": \"\",\n \"payPeriodMaximum\": \"\",\n \"payPeriodMinimum\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"startDate\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings" {:content-type :json
:form-params {:agency ""
:amount ""
:annualMaximum ""
:calculationCode ""
:costCenter1 ""
:costCenter2 ""
:costCenter3 ""
:earningCode ""
:effectiveDate ""
:endDate ""
:frequency ""
:goal ""
:hoursOrUnits ""
:isSelfInsured false
:jobCode ""
:miscellaneousInfo ""
:paidTowardsGoal ""
:payPeriodMaximum ""
:payPeriodMinimum ""
:rate ""
:rateCode ""
:startDate ""}})
require "http/client"
url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"agency\": \"\",\n \"amount\": \"\",\n \"annualMaximum\": \"\",\n \"calculationCode\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"earningCode\": \"\",\n \"effectiveDate\": \"\",\n \"endDate\": \"\",\n \"frequency\": \"\",\n \"goal\": \"\",\n \"hoursOrUnits\": \"\",\n \"isSelfInsured\": false,\n \"jobCode\": \"\",\n \"miscellaneousInfo\": \"\",\n \"paidTowardsGoal\": \"\",\n \"payPeriodMaximum\": \"\",\n \"payPeriodMinimum\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"startDate\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings"),
Content = new StringContent("{\n \"agency\": \"\",\n \"amount\": \"\",\n \"annualMaximum\": \"\",\n \"calculationCode\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"earningCode\": \"\",\n \"effectiveDate\": \"\",\n \"endDate\": \"\",\n \"frequency\": \"\",\n \"goal\": \"\",\n \"hoursOrUnits\": \"\",\n \"isSelfInsured\": false,\n \"jobCode\": \"\",\n \"miscellaneousInfo\": \"\",\n \"paidTowardsGoal\": \"\",\n \"payPeriodMaximum\": \"\",\n \"payPeriodMinimum\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"startDate\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"agency\": \"\",\n \"amount\": \"\",\n \"annualMaximum\": \"\",\n \"calculationCode\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"earningCode\": \"\",\n \"effectiveDate\": \"\",\n \"endDate\": \"\",\n \"frequency\": \"\",\n \"goal\": \"\",\n \"hoursOrUnits\": \"\",\n \"isSelfInsured\": false,\n \"jobCode\": \"\",\n \"miscellaneousInfo\": \"\",\n \"paidTowardsGoal\": \"\",\n \"payPeriodMaximum\": \"\",\n \"payPeriodMinimum\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"startDate\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings"
payload := strings.NewReader("{\n \"agency\": \"\",\n \"amount\": \"\",\n \"annualMaximum\": \"\",\n \"calculationCode\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"earningCode\": \"\",\n \"effectiveDate\": \"\",\n \"endDate\": \"\",\n \"frequency\": \"\",\n \"goal\": \"\",\n \"hoursOrUnits\": \"\",\n \"isSelfInsured\": false,\n \"jobCode\": \"\",\n \"miscellaneousInfo\": \"\",\n \"paidTowardsGoal\": \"\",\n \"payPeriodMaximum\": \"\",\n \"payPeriodMinimum\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"startDate\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/v2/companies/:companyId/employees/:employeeId/earnings HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 459
{
"agency": "",
"amount": "",
"annualMaximum": "",
"calculationCode": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"earningCode": "",
"effectiveDate": "",
"endDate": "",
"frequency": "",
"goal": "",
"hoursOrUnits": "",
"isSelfInsured": false,
"jobCode": "",
"miscellaneousInfo": "",
"paidTowardsGoal": "",
"payPeriodMaximum": "",
"payPeriodMinimum": "",
"rate": "",
"rateCode": "",
"startDate": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings")
.setHeader("content-type", "application/json")
.setBody("{\n \"agency\": \"\",\n \"amount\": \"\",\n \"annualMaximum\": \"\",\n \"calculationCode\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"earningCode\": \"\",\n \"effectiveDate\": \"\",\n \"endDate\": \"\",\n \"frequency\": \"\",\n \"goal\": \"\",\n \"hoursOrUnits\": \"\",\n \"isSelfInsured\": false,\n \"jobCode\": \"\",\n \"miscellaneousInfo\": \"\",\n \"paidTowardsGoal\": \"\",\n \"payPeriodMaximum\": \"\",\n \"payPeriodMinimum\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"startDate\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"agency\": \"\",\n \"amount\": \"\",\n \"annualMaximum\": \"\",\n \"calculationCode\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"earningCode\": \"\",\n \"effectiveDate\": \"\",\n \"endDate\": \"\",\n \"frequency\": \"\",\n \"goal\": \"\",\n \"hoursOrUnits\": \"\",\n \"isSelfInsured\": false,\n \"jobCode\": \"\",\n \"miscellaneousInfo\": \"\",\n \"paidTowardsGoal\": \"\",\n \"payPeriodMaximum\": \"\",\n \"payPeriodMinimum\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"startDate\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"agency\": \"\",\n \"amount\": \"\",\n \"annualMaximum\": \"\",\n \"calculationCode\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"earningCode\": \"\",\n \"effectiveDate\": \"\",\n \"endDate\": \"\",\n \"frequency\": \"\",\n \"goal\": \"\",\n \"hoursOrUnits\": \"\",\n \"isSelfInsured\": false,\n \"jobCode\": \"\",\n \"miscellaneousInfo\": \"\",\n \"paidTowardsGoal\": \"\",\n \"payPeriodMaximum\": \"\",\n \"payPeriodMinimum\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"startDate\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings")
.header("content-type", "application/json")
.body("{\n \"agency\": \"\",\n \"amount\": \"\",\n \"annualMaximum\": \"\",\n \"calculationCode\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"earningCode\": \"\",\n \"effectiveDate\": \"\",\n \"endDate\": \"\",\n \"frequency\": \"\",\n \"goal\": \"\",\n \"hoursOrUnits\": \"\",\n \"isSelfInsured\": false,\n \"jobCode\": \"\",\n \"miscellaneousInfo\": \"\",\n \"paidTowardsGoal\": \"\",\n \"payPeriodMaximum\": \"\",\n \"payPeriodMinimum\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"startDate\": \"\"\n}")
.asString();
const data = JSON.stringify({
agency: '',
amount: '',
annualMaximum: '',
calculationCode: '',
costCenter1: '',
costCenter2: '',
costCenter3: '',
earningCode: '',
effectiveDate: '',
endDate: '',
frequency: '',
goal: '',
hoursOrUnits: '',
isSelfInsured: false,
jobCode: '',
miscellaneousInfo: '',
paidTowardsGoal: '',
payPeriodMaximum: '',
payPeriodMinimum: '',
rate: '',
rateCode: '',
startDate: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings',
headers: {'content-type': 'application/json'},
data: {
agency: '',
amount: '',
annualMaximum: '',
calculationCode: '',
costCenter1: '',
costCenter2: '',
costCenter3: '',
earningCode: '',
effectiveDate: '',
endDate: '',
frequency: '',
goal: '',
hoursOrUnits: '',
isSelfInsured: false,
jobCode: '',
miscellaneousInfo: '',
paidTowardsGoal: '',
payPeriodMaximum: '',
payPeriodMinimum: '',
rate: '',
rateCode: '',
startDate: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"agency":"","amount":"","annualMaximum":"","calculationCode":"","costCenter1":"","costCenter2":"","costCenter3":"","earningCode":"","effectiveDate":"","endDate":"","frequency":"","goal":"","hoursOrUnits":"","isSelfInsured":false,"jobCode":"","miscellaneousInfo":"","paidTowardsGoal":"","payPeriodMaximum":"","payPeriodMinimum":"","rate":"","rateCode":"","startDate":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "agency": "",\n "amount": "",\n "annualMaximum": "",\n "calculationCode": "",\n "costCenter1": "",\n "costCenter2": "",\n "costCenter3": "",\n "earningCode": "",\n "effectiveDate": "",\n "endDate": "",\n "frequency": "",\n "goal": "",\n "hoursOrUnits": "",\n "isSelfInsured": false,\n "jobCode": "",\n "miscellaneousInfo": "",\n "paidTowardsGoal": "",\n "payPeriodMaximum": "",\n "payPeriodMinimum": "",\n "rate": "",\n "rateCode": "",\n "startDate": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"agency\": \"\",\n \"amount\": \"\",\n \"annualMaximum\": \"\",\n \"calculationCode\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"earningCode\": \"\",\n \"effectiveDate\": \"\",\n \"endDate\": \"\",\n \"frequency\": \"\",\n \"goal\": \"\",\n \"hoursOrUnits\": \"\",\n \"isSelfInsured\": false,\n \"jobCode\": \"\",\n \"miscellaneousInfo\": \"\",\n \"paidTowardsGoal\": \"\",\n \"payPeriodMaximum\": \"\",\n \"payPeriodMinimum\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"startDate\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/companies/:companyId/employees/:employeeId/earnings',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
agency: '',
amount: '',
annualMaximum: '',
calculationCode: '',
costCenter1: '',
costCenter2: '',
costCenter3: '',
earningCode: '',
effectiveDate: '',
endDate: '',
frequency: '',
goal: '',
hoursOrUnits: '',
isSelfInsured: false,
jobCode: '',
miscellaneousInfo: '',
paidTowardsGoal: '',
payPeriodMaximum: '',
payPeriodMinimum: '',
rate: '',
rateCode: '',
startDate: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings',
headers: {'content-type': 'application/json'},
body: {
agency: '',
amount: '',
annualMaximum: '',
calculationCode: '',
costCenter1: '',
costCenter2: '',
costCenter3: '',
earningCode: '',
effectiveDate: '',
endDate: '',
frequency: '',
goal: '',
hoursOrUnits: '',
isSelfInsured: false,
jobCode: '',
miscellaneousInfo: '',
paidTowardsGoal: '',
payPeriodMaximum: '',
payPeriodMinimum: '',
rate: '',
rateCode: '',
startDate: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
agency: '',
amount: '',
annualMaximum: '',
calculationCode: '',
costCenter1: '',
costCenter2: '',
costCenter3: '',
earningCode: '',
effectiveDate: '',
endDate: '',
frequency: '',
goal: '',
hoursOrUnits: '',
isSelfInsured: false,
jobCode: '',
miscellaneousInfo: '',
paidTowardsGoal: '',
payPeriodMaximum: '',
payPeriodMinimum: '',
rate: '',
rateCode: '',
startDate: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings',
headers: {'content-type': 'application/json'},
data: {
agency: '',
amount: '',
annualMaximum: '',
calculationCode: '',
costCenter1: '',
costCenter2: '',
costCenter3: '',
earningCode: '',
effectiveDate: '',
endDate: '',
frequency: '',
goal: '',
hoursOrUnits: '',
isSelfInsured: false,
jobCode: '',
miscellaneousInfo: '',
paidTowardsGoal: '',
payPeriodMaximum: '',
payPeriodMinimum: '',
rate: '',
rateCode: '',
startDate: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"agency":"","amount":"","annualMaximum":"","calculationCode":"","costCenter1":"","costCenter2":"","costCenter3":"","earningCode":"","effectiveDate":"","endDate":"","frequency":"","goal":"","hoursOrUnits":"","isSelfInsured":false,"jobCode":"","miscellaneousInfo":"","paidTowardsGoal":"","payPeriodMaximum":"","payPeriodMinimum":"","rate":"","rateCode":"","startDate":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"agency": @"",
@"amount": @"",
@"annualMaximum": @"",
@"calculationCode": @"",
@"costCenter1": @"",
@"costCenter2": @"",
@"costCenter3": @"",
@"earningCode": @"",
@"effectiveDate": @"",
@"endDate": @"",
@"frequency": @"",
@"goal": @"",
@"hoursOrUnits": @"",
@"isSelfInsured": @NO,
@"jobCode": @"",
@"miscellaneousInfo": @"",
@"paidTowardsGoal": @"",
@"payPeriodMaximum": @"",
@"payPeriodMinimum": @"",
@"rate": @"",
@"rateCode": @"",
@"startDate": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"agency\": \"\",\n \"amount\": \"\",\n \"annualMaximum\": \"\",\n \"calculationCode\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"earningCode\": \"\",\n \"effectiveDate\": \"\",\n \"endDate\": \"\",\n \"frequency\": \"\",\n \"goal\": \"\",\n \"hoursOrUnits\": \"\",\n \"isSelfInsured\": false,\n \"jobCode\": \"\",\n \"miscellaneousInfo\": \"\",\n \"paidTowardsGoal\": \"\",\n \"payPeriodMaximum\": \"\",\n \"payPeriodMinimum\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"startDate\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'agency' => '',
'amount' => '',
'annualMaximum' => '',
'calculationCode' => '',
'costCenter1' => '',
'costCenter2' => '',
'costCenter3' => '',
'earningCode' => '',
'effectiveDate' => '',
'endDate' => '',
'frequency' => '',
'goal' => '',
'hoursOrUnits' => '',
'isSelfInsured' => null,
'jobCode' => '',
'miscellaneousInfo' => '',
'paidTowardsGoal' => '',
'payPeriodMaximum' => '',
'payPeriodMinimum' => '',
'rate' => '',
'rateCode' => '',
'startDate' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings', [
'body' => '{
"agency": "",
"amount": "",
"annualMaximum": "",
"calculationCode": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"earningCode": "",
"effectiveDate": "",
"endDate": "",
"frequency": "",
"goal": "",
"hoursOrUnits": "",
"isSelfInsured": false,
"jobCode": "",
"miscellaneousInfo": "",
"paidTowardsGoal": "",
"payPeriodMaximum": "",
"payPeriodMinimum": "",
"rate": "",
"rateCode": "",
"startDate": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'agency' => '',
'amount' => '',
'annualMaximum' => '',
'calculationCode' => '',
'costCenter1' => '',
'costCenter2' => '',
'costCenter3' => '',
'earningCode' => '',
'effectiveDate' => '',
'endDate' => '',
'frequency' => '',
'goal' => '',
'hoursOrUnits' => '',
'isSelfInsured' => null,
'jobCode' => '',
'miscellaneousInfo' => '',
'paidTowardsGoal' => '',
'payPeriodMaximum' => '',
'payPeriodMinimum' => '',
'rate' => '',
'rateCode' => '',
'startDate' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'agency' => '',
'amount' => '',
'annualMaximum' => '',
'calculationCode' => '',
'costCenter1' => '',
'costCenter2' => '',
'costCenter3' => '',
'earningCode' => '',
'effectiveDate' => '',
'endDate' => '',
'frequency' => '',
'goal' => '',
'hoursOrUnits' => '',
'isSelfInsured' => null,
'jobCode' => '',
'miscellaneousInfo' => '',
'paidTowardsGoal' => '',
'payPeriodMaximum' => '',
'payPeriodMinimum' => '',
'rate' => '',
'rateCode' => '',
'startDate' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"agency": "",
"amount": "",
"annualMaximum": "",
"calculationCode": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"earningCode": "",
"effectiveDate": "",
"endDate": "",
"frequency": "",
"goal": "",
"hoursOrUnits": "",
"isSelfInsured": false,
"jobCode": "",
"miscellaneousInfo": "",
"paidTowardsGoal": "",
"payPeriodMaximum": "",
"payPeriodMinimum": "",
"rate": "",
"rateCode": "",
"startDate": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"agency": "",
"amount": "",
"annualMaximum": "",
"calculationCode": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"earningCode": "",
"effectiveDate": "",
"endDate": "",
"frequency": "",
"goal": "",
"hoursOrUnits": "",
"isSelfInsured": false,
"jobCode": "",
"miscellaneousInfo": "",
"paidTowardsGoal": "",
"payPeriodMaximum": "",
"payPeriodMinimum": "",
"rate": "",
"rateCode": "",
"startDate": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"agency\": \"\",\n \"amount\": \"\",\n \"annualMaximum\": \"\",\n \"calculationCode\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"earningCode\": \"\",\n \"effectiveDate\": \"\",\n \"endDate\": \"\",\n \"frequency\": \"\",\n \"goal\": \"\",\n \"hoursOrUnits\": \"\",\n \"isSelfInsured\": false,\n \"jobCode\": \"\",\n \"miscellaneousInfo\": \"\",\n \"paidTowardsGoal\": \"\",\n \"payPeriodMaximum\": \"\",\n \"payPeriodMinimum\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"startDate\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v2/companies/:companyId/employees/:employeeId/earnings", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings"
payload = {
"agency": "",
"amount": "",
"annualMaximum": "",
"calculationCode": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"earningCode": "",
"effectiveDate": "",
"endDate": "",
"frequency": "",
"goal": "",
"hoursOrUnits": "",
"isSelfInsured": False,
"jobCode": "",
"miscellaneousInfo": "",
"paidTowardsGoal": "",
"payPeriodMaximum": "",
"payPeriodMinimum": "",
"rate": "",
"rateCode": "",
"startDate": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings"
payload <- "{\n \"agency\": \"\",\n \"amount\": \"\",\n \"annualMaximum\": \"\",\n \"calculationCode\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"earningCode\": \"\",\n \"effectiveDate\": \"\",\n \"endDate\": \"\",\n \"frequency\": \"\",\n \"goal\": \"\",\n \"hoursOrUnits\": \"\",\n \"isSelfInsured\": false,\n \"jobCode\": \"\",\n \"miscellaneousInfo\": \"\",\n \"paidTowardsGoal\": \"\",\n \"payPeriodMaximum\": \"\",\n \"payPeriodMinimum\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"startDate\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"agency\": \"\",\n \"amount\": \"\",\n \"annualMaximum\": \"\",\n \"calculationCode\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"earningCode\": \"\",\n \"effectiveDate\": \"\",\n \"endDate\": \"\",\n \"frequency\": \"\",\n \"goal\": \"\",\n \"hoursOrUnits\": \"\",\n \"isSelfInsured\": false,\n \"jobCode\": \"\",\n \"miscellaneousInfo\": \"\",\n \"paidTowardsGoal\": \"\",\n \"payPeriodMaximum\": \"\",\n \"payPeriodMinimum\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"startDate\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/v2/companies/:companyId/employees/:employeeId/earnings') do |req|
req.body = "{\n \"agency\": \"\",\n \"amount\": \"\",\n \"annualMaximum\": \"\",\n \"calculationCode\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"earningCode\": \"\",\n \"effectiveDate\": \"\",\n \"endDate\": \"\",\n \"frequency\": \"\",\n \"goal\": \"\",\n \"hoursOrUnits\": \"\",\n \"isSelfInsured\": false,\n \"jobCode\": \"\",\n \"miscellaneousInfo\": \"\",\n \"paidTowardsGoal\": \"\",\n \"payPeriodMaximum\": \"\",\n \"payPeriodMinimum\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"startDate\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings";
let payload = json!({
"agency": "",
"amount": "",
"annualMaximum": "",
"calculationCode": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"earningCode": "",
"effectiveDate": "",
"endDate": "",
"frequency": "",
"goal": "",
"hoursOrUnits": "",
"isSelfInsured": false,
"jobCode": "",
"miscellaneousInfo": "",
"paidTowardsGoal": "",
"payPeriodMaximum": "",
"payPeriodMinimum": "",
"rate": "",
"rateCode": "",
"startDate": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings \
--header 'content-type: application/json' \
--data '{
"agency": "",
"amount": "",
"annualMaximum": "",
"calculationCode": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"earningCode": "",
"effectiveDate": "",
"endDate": "",
"frequency": "",
"goal": "",
"hoursOrUnits": "",
"isSelfInsured": false,
"jobCode": "",
"miscellaneousInfo": "",
"paidTowardsGoal": "",
"payPeriodMaximum": "",
"payPeriodMinimum": "",
"rate": "",
"rateCode": "",
"startDate": ""
}'
echo '{
"agency": "",
"amount": "",
"annualMaximum": "",
"calculationCode": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"earningCode": "",
"effectiveDate": "",
"endDate": "",
"frequency": "",
"goal": "",
"hoursOrUnits": "",
"isSelfInsured": false,
"jobCode": "",
"miscellaneousInfo": "",
"paidTowardsGoal": "",
"payPeriodMaximum": "",
"payPeriodMinimum": "",
"rate": "",
"rateCode": "",
"startDate": ""
}' | \
http PUT {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "agency": "",\n "amount": "",\n "annualMaximum": "",\n "calculationCode": "",\n "costCenter1": "",\n "costCenter2": "",\n "costCenter3": "",\n "earningCode": "",\n "effectiveDate": "",\n "endDate": "",\n "frequency": "",\n "goal": "",\n "hoursOrUnits": "",\n "isSelfInsured": false,\n "jobCode": "",\n "miscellaneousInfo": "",\n "paidTowardsGoal": "",\n "payPeriodMaximum": "",\n "payPeriodMinimum": "",\n "rate": "",\n "rateCode": "",\n "startDate": ""\n}' \
--output-document \
- {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"agency": "",
"amount": "",
"annualMaximum": "",
"calculationCode": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"earningCode": "",
"effectiveDate": "",
"endDate": "",
"frequency": "",
"goal": "",
"hoursOrUnits": "",
"isSelfInsured": false,
"jobCode": "",
"miscellaneousInfo": "",
"paidTowardsGoal": "",
"payPeriodMaximum": "",
"payPeriodMinimum": "",
"rate": "",
"rateCode": "",
"startDate": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
Delete Earning by Earning Code and Start Date
{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate
QUERY PARAMS
companyId
employeeId
earningCode
startDate
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate")
require "http/client"
url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate
http DELETE {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Get All Earnings
{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings
QUERY PARAMS
companyId
employeeId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings")
require "http/client"
url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v2/companies/:companyId/employees/:employeeId/earnings HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/companies/:companyId/employees/:employeeId/earnings',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v2/companies/:companyId/employees/:employeeId/earnings")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v2/companies/:companyId/employees/:employeeId/earnings') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings
http GET {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Get Earning by Earning Code and Start Date
{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate
QUERY PARAMS
companyId
employeeId
earningCode
startDate
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate")
require "http/client"
url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate
http GET {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode/:startDate")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Get Earnings by Earning Code
{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode
QUERY PARAMS
companyId
employeeId
earningCode
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode")
require "http/client"
url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode
http GET {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/earnings/:earningCode")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
Add-update emergency contacts
{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/emergencyContacts
QUERY PARAMS
companyId
employeeId
BODY json
{
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"email": "",
"firstName": "",
"homePhone": "",
"lastName": "",
"mobilePhone": "",
"notes": "",
"pager": "",
"primaryPhone": "",
"priority": "",
"relationship": "",
"state": "",
"syncEmployeeInfo": false,
"workExtension": "",
"workPhone": "",
"zip": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/emergencyContacts");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"homePhone\": \"\",\n \"lastName\": \"\",\n \"mobilePhone\": \"\",\n \"notes\": \"\",\n \"pager\": \"\",\n \"primaryPhone\": \"\",\n \"priority\": \"\",\n \"relationship\": \"\",\n \"state\": \"\",\n \"syncEmployeeInfo\": false,\n \"workExtension\": \"\",\n \"workPhone\": \"\",\n \"zip\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/emergencyContacts" {:content-type :json
:form-params {:address1 ""
:address2 ""
:city ""
:country ""
:county ""
:email ""
:firstName ""
:homePhone ""
:lastName ""
:mobilePhone ""
:notes ""
:pager ""
:primaryPhone ""
:priority ""
:relationship ""
:state ""
:syncEmployeeInfo false
:workExtension ""
:workPhone ""
:zip ""}})
require "http/client"
url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/emergencyContacts"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"homePhone\": \"\",\n \"lastName\": \"\",\n \"mobilePhone\": \"\",\n \"notes\": \"\",\n \"pager\": \"\",\n \"primaryPhone\": \"\",\n \"priority\": \"\",\n \"relationship\": \"\",\n \"state\": \"\",\n \"syncEmployeeInfo\": false,\n \"workExtension\": \"\",\n \"workPhone\": \"\",\n \"zip\": \"\"\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/emergencyContacts"),
Content = new StringContent("{\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"homePhone\": \"\",\n \"lastName\": \"\",\n \"mobilePhone\": \"\",\n \"notes\": \"\",\n \"pager\": \"\",\n \"primaryPhone\": \"\",\n \"priority\": \"\",\n \"relationship\": \"\",\n \"state\": \"\",\n \"syncEmployeeInfo\": false,\n \"workExtension\": \"\",\n \"workPhone\": \"\",\n \"zip\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/emergencyContacts");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"homePhone\": \"\",\n \"lastName\": \"\",\n \"mobilePhone\": \"\",\n \"notes\": \"\",\n \"pager\": \"\",\n \"primaryPhone\": \"\",\n \"priority\": \"\",\n \"relationship\": \"\",\n \"state\": \"\",\n \"syncEmployeeInfo\": false,\n \"workExtension\": \"\",\n \"workPhone\": \"\",\n \"zip\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/emergencyContacts"
payload := strings.NewReader("{\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"homePhone\": \"\",\n \"lastName\": \"\",\n \"mobilePhone\": \"\",\n \"notes\": \"\",\n \"pager\": \"\",\n \"primaryPhone\": \"\",\n \"priority\": \"\",\n \"relationship\": \"\",\n \"state\": \"\",\n \"syncEmployeeInfo\": false,\n \"workExtension\": \"\",\n \"workPhone\": \"\",\n \"zip\": \"\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/v2/companies/:companyId/employees/:employeeId/emergencyContacts HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 368
{
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"email": "",
"firstName": "",
"homePhone": "",
"lastName": "",
"mobilePhone": "",
"notes": "",
"pager": "",
"primaryPhone": "",
"priority": "",
"relationship": "",
"state": "",
"syncEmployeeInfo": false,
"workExtension": "",
"workPhone": "",
"zip": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/emergencyContacts")
.setHeader("content-type", "application/json")
.setBody("{\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"homePhone\": \"\",\n \"lastName\": \"\",\n \"mobilePhone\": \"\",\n \"notes\": \"\",\n \"pager\": \"\",\n \"primaryPhone\": \"\",\n \"priority\": \"\",\n \"relationship\": \"\",\n \"state\": \"\",\n \"syncEmployeeInfo\": false,\n \"workExtension\": \"\",\n \"workPhone\": \"\",\n \"zip\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/emergencyContacts"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"homePhone\": \"\",\n \"lastName\": \"\",\n \"mobilePhone\": \"\",\n \"notes\": \"\",\n \"pager\": \"\",\n \"primaryPhone\": \"\",\n \"priority\": \"\",\n \"relationship\": \"\",\n \"state\": \"\",\n \"syncEmployeeInfo\": false,\n \"workExtension\": \"\",\n \"workPhone\": \"\",\n \"zip\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"homePhone\": \"\",\n \"lastName\": \"\",\n \"mobilePhone\": \"\",\n \"notes\": \"\",\n \"pager\": \"\",\n \"primaryPhone\": \"\",\n \"priority\": \"\",\n \"relationship\": \"\",\n \"state\": \"\",\n \"syncEmployeeInfo\": false,\n \"workExtension\": \"\",\n \"workPhone\": \"\",\n \"zip\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/emergencyContacts")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/emergencyContacts")
.header("content-type", "application/json")
.body("{\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"homePhone\": \"\",\n \"lastName\": \"\",\n \"mobilePhone\": \"\",\n \"notes\": \"\",\n \"pager\": \"\",\n \"primaryPhone\": \"\",\n \"priority\": \"\",\n \"relationship\": \"\",\n \"state\": \"\",\n \"syncEmployeeInfo\": false,\n \"workExtension\": \"\",\n \"workPhone\": \"\",\n \"zip\": \"\"\n}")
.asString();
const data = JSON.stringify({
address1: '',
address2: '',
city: '',
country: '',
county: '',
email: '',
firstName: '',
homePhone: '',
lastName: '',
mobilePhone: '',
notes: '',
pager: '',
primaryPhone: '',
priority: '',
relationship: '',
state: '',
syncEmployeeInfo: false,
workExtension: '',
workPhone: '',
zip: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/emergencyContacts');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/emergencyContacts',
headers: {'content-type': 'application/json'},
data: {
address1: '',
address2: '',
city: '',
country: '',
county: '',
email: '',
firstName: '',
homePhone: '',
lastName: '',
mobilePhone: '',
notes: '',
pager: '',
primaryPhone: '',
priority: '',
relationship: '',
state: '',
syncEmployeeInfo: false,
workExtension: '',
workPhone: '',
zip: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/emergencyContacts';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"address1":"","address2":"","city":"","country":"","county":"","email":"","firstName":"","homePhone":"","lastName":"","mobilePhone":"","notes":"","pager":"","primaryPhone":"","priority":"","relationship":"","state":"","syncEmployeeInfo":false,"workExtension":"","workPhone":"","zip":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/emergencyContacts',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "address1": "",\n "address2": "",\n "city": "",\n "country": "",\n "county": "",\n "email": "",\n "firstName": "",\n "homePhone": "",\n "lastName": "",\n "mobilePhone": "",\n "notes": "",\n "pager": "",\n "primaryPhone": "",\n "priority": "",\n "relationship": "",\n "state": "",\n "syncEmployeeInfo": false,\n "workExtension": "",\n "workPhone": "",\n "zip": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"homePhone\": \"\",\n \"lastName\": \"\",\n \"mobilePhone\": \"\",\n \"notes\": \"\",\n \"pager\": \"\",\n \"primaryPhone\": \"\",\n \"priority\": \"\",\n \"relationship\": \"\",\n \"state\": \"\",\n \"syncEmployeeInfo\": false,\n \"workExtension\": \"\",\n \"workPhone\": \"\",\n \"zip\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/emergencyContacts")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/companies/:companyId/employees/:employeeId/emergencyContacts',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
address1: '',
address2: '',
city: '',
country: '',
county: '',
email: '',
firstName: '',
homePhone: '',
lastName: '',
mobilePhone: '',
notes: '',
pager: '',
primaryPhone: '',
priority: '',
relationship: '',
state: '',
syncEmployeeInfo: false,
workExtension: '',
workPhone: '',
zip: ''
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/emergencyContacts',
headers: {'content-type': 'application/json'},
body: {
address1: '',
address2: '',
city: '',
country: '',
county: '',
email: '',
firstName: '',
homePhone: '',
lastName: '',
mobilePhone: '',
notes: '',
pager: '',
primaryPhone: '',
priority: '',
relationship: '',
state: '',
syncEmployeeInfo: false,
workExtension: '',
workPhone: '',
zip: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/emergencyContacts');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
address1: '',
address2: '',
city: '',
country: '',
county: '',
email: '',
firstName: '',
homePhone: '',
lastName: '',
mobilePhone: '',
notes: '',
pager: '',
primaryPhone: '',
priority: '',
relationship: '',
state: '',
syncEmployeeInfo: false,
workExtension: '',
workPhone: '',
zip: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/emergencyContacts',
headers: {'content-type': 'application/json'},
data: {
address1: '',
address2: '',
city: '',
country: '',
county: '',
email: '',
firstName: '',
homePhone: '',
lastName: '',
mobilePhone: '',
notes: '',
pager: '',
primaryPhone: '',
priority: '',
relationship: '',
state: '',
syncEmployeeInfo: false,
workExtension: '',
workPhone: '',
zip: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/emergencyContacts';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"address1":"","address2":"","city":"","country":"","county":"","email":"","firstName":"","homePhone":"","lastName":"","mobilePhone":"","notes":"","pager":"","primaryPhone":"","priority":"","relationship":"","state":"","syncEmployeeInfo":false,"workExtension":"","workPhone":"","zip":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"address1": @"",
@"address2": @"",
@"city": @"",
@"country": @"",
@"county": @"",
@"email": @"",
@"firstName": @"",
@"homePhone": @"",
@"lastName": @"",
@"mobilePhone": @"",
@"notes": @"",
@"pager": @"",
@"primaryPhone": @"",
@"priority": @"",
@"relationship": @"",
@"state": @"",
@"syncEmployeeInfo": @NO,
@"workExtension": @"",
@"workPhone": @"",
@"zip": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/emergencyContacts"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/emergencyContacts" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"homePhone\": \"\",\n \"lastName\": \"\",\n \"mobilePhone\": \"\",\n \"notes\": \"\",\n \"pager\": \"\",\n \"primaryPhone\": \"\",\n \"priority\": \"\",\n \"relationship\": \"\",\n \"state\": \"\",\n \"syncEmployeeInfo\": false,\n \"workExtension\": \"\",\n \"workPhone\": \"\",\n \"zip\": \"\"\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/emergencyContacts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'address1' => '',
'address2' => '',
'city' => '',
'country' => '',
'county' => '',
'email' => '',
'firstName' => '',
'homePhone' => '',
'lastName' => '',
'mobilePhone' => '',
'notes' => '',
'pager' => '',
'primaryPhone' => '',
'priority' => '',
'relationship' => '',
'state' => '',
'syncEmployeeInfo' => null,
'workExtension' => '',
'workPhone' => '',
'zip' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/emergencyContacts', [
'body' => '{
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"email": "",
"firstName": "",
"homePhone": "",
"lastName": "",
"mobilePhone": "",
"notes": "",
"pager": "",
"primaryPhone": "",
"priority": "",
"relationship": "",
"state": "",
"syncEmployeeInfo": false,
"workExtension": "",
"workPhone": "",
"zip": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/emergencyContacts');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'address1' => '',
'address2' => '',
'city' => '',
'country' => '',
'county' => '',
'email' => '',
'firstName' => '',
'homePhone' => '',
'lastName' => '',
'mobilePhone' => '',
'notes' => '',
'pager' => '',
'primaryPhone' => '',
'priority' => '',
'relationship' => '',
'state' => '',
'syncEmployeeInfo' => null,
'workExtension' => '',
'workPhone' => '',
'zip' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'address1' => '',
'address2' => '',
'city' => '',
'country' => '',
'county' => '',
'email' => '',
'firstName' => '',
'homePhone' => '',
'lastName' => '',
'mobilePhone' => '',
'notes' => '',
'pager' => '',
'primaryPhone' => '',
'priority' => '',
'relationship' => '',
'state' => '',
'syncEmployeeInfo' => null,
'workExtension' => '',
'workPhone' => '',
'zip' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/emergencyContacts');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/emergencyContacts' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"email": "",
"firstName": "",
"homePhone": "",
"lastName": "",
"mobilePhone": "",
"notes": "",
"pager": "",
"primaryPhone": "",
"priority": "",
"relationship": "",
"state": "",
"syncEmployeeInfo": false,
"workExtension": "",
"workPhone": "",
"zip": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/emergencyContacts' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"email": "",
"firstName": "",
"homePhone": "",
"lastName": "",
"mobilePhone": "",
"notes": "",
"pager": "",
"primaryPhone": "",
"priority": "",
"relationship": "",
"state": "",
"syncEmployeeInfo": false,
"workExtension": "",
"workPhone": "",
"zip": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"homePhone\": \"\",\n \"lastName\": \"\",\n \"mobilePhone\": \"\",\n \"notes\": \"\",\n \"pager\": \"\",\n \"primaryPhone\": \"\",\n \"priority\": \"\",\n \"relationship\": \"\",\n \"state\": \"\",\n \"syncEmployeeInfo\": false,\n \"workExtension\": \"\",\n \"workPhone\": \"\",\n \"zip\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v2/companies/:companyId/employees/:employeeId/emergencyContacts", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/emergencyContacts"
payload = {
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"email": "",
"firstName": "",
"homePhone": "",
"lastName": "",
"mobilePhone": "",
"notes": "",
"pager": "",
"primaryPhone": "",
"priority": "",
"relationship": "",
"state": "",
"syncEmployeeInfo": False,
"workExtension": "",
"workPhone": "",
"zip": ""
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/emergencyContacts"
payload <- "{\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"homePhone\": \"\",\n \"lastName\": \"\",\n \"mobilePhone\": \"\",\n \"notes\": \"\",\n \"pager\": \"\",\n \"primaryPhone\": \"\",\n \"priority\": \"\",\n \"relationship\": \"\",\n \"state\": \"\",\n \"syncEmployeeInfo\": false,\n \"workExtension\": \"\",\n \"workPhone\": \"\",\n \"zip\": \"\"\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/emergencyContacts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"homePhone\": \"\",\n \"lastName\": \"\",\n \"mobilePhone\": \"\",\n \"notes\": \"\",\n \"pager\": \"\",\n \"primaryPhone\": \"\",\n \"priority\": \"\",\n \"relationship\": \"\",\n \"state\": \"\",\n \"syncEmployeeInfo\": false,\n \"workExtension\": \"\",\n \"workPhone\": \"\",\n \"zip\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/v2/companies/:companyId/employees/:employeeId/emergencyContacts') do |req|
req.body = "{\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"homePhone\": \"\",\n \"lastName\": \"\",\n \"mobilePhone\": \"\",\n \"notes\": \"\",\n \"pager\": \"\",\n \"primaryPhone\": \"\",\n \"priority\": \"\",\n \"relationship\": \"\",\n \"state\": \"\",\n \"syncEmployeeInfo\": false,\n \"workExtension\": \"\",\n \"workPhone\": \"\",\n \"zip\": \"\"\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/emergencyContacts";
let payload = json!({
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"email": "",
"firstName": "",
"homePhone": "",
"lastName": "",
"mobilePhone": "",
"notes": "",
"pager": "",
"primaryPhone": "",
"priority": "",
"relationship": "",
"state": "",
"syncEmployeeInfo": false,
"workExtension": "",
"workPhone": "",
"zip": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/emergencyContacts \
--header 'content-type: application/json' \
--data '{
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"email": "",
"firstName": "",
"homePhone": "",
"lastName": "",
"mobilePhone": "",
"notes": "",
"pager": "",
"primaryPhone": "",
"priority": "",
"relationship": "",
"state": "",
"syncEmployeeInfo": false,
"workExtension": "",
"workPhone": "",
"zip": ""
}'
echo '{
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"email": "",
"firstName": "",
"homePhone": "",
"lastName": "",
"mobilePhone": "",
"notes": "",
"pager": "",
"primaryPhone": "",
"priority": "",
"relationship": "",
"state": "",
"syncEmployeeInfo": false,
"workExtension": "",
"workPhone": "",
"zip": ""
}' | \
http PUT {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/emergencyContacts \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "address1": "",\n "address2": "",\n "city": "",\n "country": "",\n "county": "",\n "email": "",\n "firstName": "",\n "homePhone": "",\n "lastName": "",\n "mobilePhone": "",\n "notes": "",\n "pager": "",\n "primaryPhone": "",\n "priority": "",\n "relationship": "",\n "state": "",\n "syncEmployeeInfo": false,\n "workExtension": "",\n "workPhone": "",\n "zip": ""\n}' \
--output-document \
- {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/emergencyContacts
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"email": "",
"firstName": "",
"homePhone": "",
"lastName": "",
"mobilePhone": "",
"notes": "",
"pager": "",
"primaryPhone": "",
"priority": "",
"relationship": "",
"state": "",
"syncEmployeeInfo": false,
"workExtension": "",
"workPhone": "",
"zip": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/emergencyContacts")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Add new employee
{{baseUrl}}/v2/companies/:companyId/employees
QUERY PARAMS
companyId
BODY json
{
"additionalDirectDeposit": [
{
"accountNumber": "",
"accountType": "",
"amount": "",
"amountType": "",
"blockSpecial": false,
"isSkipPreNote": false,
"nameOnAccount": "",
"preNoteDate": "",
"routingNumber": ""
}
],
"additionalRate": [
{
"changeReason": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"endCheckDate": "",
"job": "",
"rate": "",
"rateCode": "",
"rateNotes": "",
"ratePer": "",
"shift": ""
}
],
"benefitSetup": {
"benefitClass": "",
"benefitClassEffectiveDate": "",
"benefitSalary": "",
"benefitSalaryEffectiveDate": "",
"doNotApplyAdministrativePeriod": false,
"isMeasureAcaEligibility": false
},
"birthDate": "",
"coEmpCode": "",
"companyFEIN": "",
"companyName": "",
"currency": "",
"customBooleanFields": [
{
"category": "",
"label": "",
"value": false
}
],
"customDateFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customDropDownFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customNumberFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customTextFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"departmentPosition": {
"changeReason": "",
"clockBadgeNumber": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"employeeType": "",
"equalEmploymentOpportunityClass": "",
"isMinimumWageExempt": false,
"isOvertimeExempt": false,
"isSupervisorReviewer": false,
"isUnionDuesCollected": false,
"isUnionInitiationCollected": false,
"jobTitle": "",
"payGroup": "",
"positionCode": "",
"reviewerCompanyNumber": "",
"reviewerEmployeeId": "",
"shift": "",
"supervisorCompanyNumber": "",
"supervisorEmployeeId": "",
"tipped": "",
"unionAffiliationDate": "",
"unionCode": "",
"unionPosition": "",
"workersCompensation": ""
},
"disabilityDescription": "",
"emergencyContacts": [
{
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"email": "",
"firstName": "",
"homePhone": "",
"lastName": "",
"mobilePhone": "",
"notes": "",
"pager": "",
"primaryPhone": "",
"priority": "",
"relationship": "",
"state": "",
"syncEmployeeInfo": false,
"workExtension": "",
"workPhone": "",
"zip": ""
}
],
"employeeId": "",
"ethnicity": "",
"federalTax": {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"taxCalculationCode": "",
"w4FormYear": 0
},
"firstName": "",
"gender": "",
"homeAddress": {
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"mobilePhone": "",
"phone": "",
"postalCode": "",
"state": ""
},
"isHighlyCompensated": false,
"isSmoker": false,
"lastName": "",
"localTax": [
{
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"residentPSD": "",
"taxCode": "",
"workPSD": ""
}
],
"mainDirectDeposit": {
"accountNumber": "",
"accountType": "",
"blockSpecial": false,
"isSkipPreNote": false,
"nameOnAccount": "",
"preNoteDate": "",
"routingNumber": ""
},
"maritalStatus": "",
"middleName": "",
"nonPrimaryStateTax": {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"reciprocityCode": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
},
"ownerPercent": "",
"preferredName": "",
"primaryPayRate": {
"annualSalary": "",
"baseRate": "",
"beginCheckDate": "",
"changeReason": "",
"defaultHours": "",
"effectiveDate": "",
"isAutoPay": false,
"payFrequency": "",
"payGrade": "",
"payRateNote": "",
"payType": "",
"ratePer": "",
"salary": ""
},
"primaryStateTax": {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
},
"priorLastName": "",
"salutation": "",
"ssn": "",
"status": {
"adjustedSeniorityDate": "",
"changeReason": "",
"effectiveDate": "",
"employeeStatus": "",
"hireDate": "",
"isEligibleForRehire": false,
"reHireDate": "",
"statusType": "",
"terminationDate": ""
},
"suffix": "",
"taxSetup": {
"fitwExemptNotes": "",
"fitwExemptReason": "",
"futaExemptNotes": "",
"futaExemptReason": "",
"isEmployee943": false,
"isPension": false,
"isStatutory": false,
"medExemptNotes": "",
"medExemptReason": "",
"sitwExemptNotes": "",
"sitwExemptReason": "",
"ssExemptNotes": "",
"ssExemptReason": "",
"suiExemptNotes": "",
"suiExemptReason": "",
"suiState": "",
"taxDistributionCode1099R": "",
"taxForm": ""
},
"veteranDescription": "",
"webTime": {
"badgeNumber": "",
"chargeRate": "",
"isTimeLaborEnabled": false
},
"workAddress": {
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"location": "",
"mailStop": "",
"mobilePhone": "",
"pager": "",
"phone": "",
"phoneExtension": "",
"postalCode": "",
"state": ""
},
"workEligibility": {
"alienOrAdmissionDocumentNumber": "",
"attestedDate": "",
"countryOfIssuance": "",
"foreignPassportNumber": "",
"i94AdmissionNumber": "",
"i9DateVerified": "",
"i9Notes": "",
"isI9Verified": false,
"isSsnVerified": false,
"ssnDateVerified": "",
"ssnNotes": "",
"visaType": "",
"workAuthorization": "",
"workUntil": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/companies/:companyId/employees");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"additionalDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"amount\": \"\",\n \"amountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"additionalRate\": [\n {\n \"changeReason\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"endCheckDate\": \"\",\n \"job\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"rateNotes\": \"\",\n \"ratePer\": \"\",\n \"shift\": \"\"\n }\n ],\n \"benefitSetup\": {\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n },\n \"birthDate\": \"\",\n \"coEmpCode\": \"\",\n \"companyFEIN\": \"\",\n \"companyName\": \"\",\n \"currency\": \"\",\n \"customBooleanFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": false\n }\n ],\n \"customDateFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customDropDownFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customNumberFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customTextFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"departmentPosition\": {\n \"changeReason\": \"\",\n \"clockBadgeNumber\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"employeeType\": \"\",\n \"equalEmploymentOpportunityClass\": \"\",\n \"isMinimumWageExempt\": false,\n \"isOvertimeExempt\": false,\n \"isSupervisorReviewer\": false,\n \"isUnionDuesCollected\": false,\n \"isUnionInitiationCollected\": false,\n \"jobTitle\": \"\",\n \"payGroup\": \"\",\n \"positionCode\": \"\",\n \"reviewerCompanyNumber\": \"\",\n \"reviewerEmployeeId\": \"\",\n \"shift\": \"\",\n \"supervisorCompanyNumber\": \"\",\n \"supervisorEmployeeId\": \"\",\n \"tipped\": \"\",\n \"unionAffiliationDate\": \"\",\n \"unionCode\": \"\",\n \"unionPosition\": \"\",\n \"workersCompensation\": \"\"\n },\n \"disabilityDescription\": \"\",\n \"emergencyContacts\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"homePhone\": \"\",\n \"lastName\": \"\",\n \"mobilePhone\": \"\",\n \"notes\": \"\",\n \"pager\": \"\",\n \"primaryPhone\": \"\",\n \"priority\": \"\",\n \"relationship\": \"\",\n \"state\": \"\",\n \"syncEmployeeInfo\": false,\n \"workExtension\": \"\",\n \"workPhone\": \"\",\n \"zip\": \"\"\n }\n ],\n \"employeeId\": \"\",\n \"ethnicity\": \"\",\n \"federalTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"taxCalculationCode\": \"\",\n \"w4FormYear\": 0\n },\n \"firstName\": \"\",\n \"gender\": \"\",\n \"homeAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"isHighlyCompensated\": false,\n \"isSmoker\": false,\n \"lastName\": \"\",\n \"localTax\": [\n {\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n }\n ],\n \"mainDirectDeposit\": {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n },\n \"maritalStatus\": \"\",\n \"middleName\": \"\",\n \"nonPrimaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"ownerPercent\": \"\",\n \"preferredName\": \"\",\n \"primaryPayRate\": {\n \"annualSalary\": \"\",\n \"baseRate\": \"\",\n \"beginCheckDate\": \"\",\n \"changeReason\": \"\",\n \"defaultHours\": \"\",\n \"effectiveDate\": \"\",\n \"isAutoPay\": false,\n \"payFrequency\": \"\",\n \"payGrade\": \"\",\n \"payRateNote\": \"\",\n \"payType\": \"\",\n \"ratePer\": \"\",\n \"salary\": \"\"\n },\n \"primaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"priorLastName\": \"\",\n \"salutation\": \"\",\n \"ssn\": \"\",\n \"status\": {\n \"adjustedSeniorityDate\": \"\",\n \"changeReason\": \"\",\n \"effectiveDate\": \"\",\n \"employeeStatus\": \"\",\n \"hireDate\": \"\",\n \"isEligibleForRehire\": false,\n \"reHireDate\": \"\",\n \"statusType\": \"\",\n \"terminationDate\": \"\"\n },\n \"suffix\": \"\",\n \"taxSetup\": {\n \"fitwExemptNotes\": \"\",\n \"fitwExemptReason\": \"\",\n \"futaExemptNotes\": \"\",\n \"futaExemptReason\": \"\",\n \"isEmployee943\": false,\n \"isPension\": false,\n \"isStatutory\": false,\n \"medExemptNotes\": \"\",\n \"medExemptReason\": \"\",\n \"sitwExemptNotes\": \"\",\n \"sitwExemptReason\": \"\",\n \"ssExemptNotes\": \"\",\n \"ssExemptReason\": \"\",\n \"suiExemptNotes\": \"\",\n \"suiExemptReason\": \"\",\n \"suiState\": \"\",\n \"taxDistributionCode1099R\": \"\",\n \"taxForm\": \"\"\n },\n \"veteranDescription\": \"\",\n \"webTime\": {\n \"badgeNumber\": \"\",\n \"chargeRate\": \"\",\n \"isTimeLaborEnabled\": false\n },\n \"workAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"location\": \"\",\n \"mailStop\": \"\",\n \"mobilePhone\": \"\",\n \"pager\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"workEligibility\": {\n \"alienOrAdmissionDocumentNumber\": \"\",\n \"attestedDate\": \"\",\n \"countryOfIssuance\": \"\",\n \"foreignPassportNumber\": \"\",\n \"i94AdmissionNumber\": \"\",\n \"i9DateVerified\": \"\",\n \"i9Notes\": \"\",\n \"isI9Verified\": false,\n \"isSsnVerified\": false,\n \"ssnDateVerified\": \"\",\n \"ssnNotes\": \"\",\n \"visaType\": \"\",\n \"workAuthorization\": \"\",\n \"workUntil\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v2/companies/:companyId/employees" {:content-type :json
:form-params {:additionalDirectDeposit [{:accountNumber ""
:accountType ""
:amount ""
:amountType ""
:blockSpecial false
:isSkipPreNote false
:nameOnAccount ""
:preNoteDate ""
:routingNumber ""}]
:additionalRate [{:changeReason ""
:costCenter1 ""
:costCenter2 ""
:costCenter3 ""
:effectiveDate ""
:endCheckDate ""
:job ""
:rate ""
:rateCode ""
:rateNotes ""
:ratePer ""
:shift ""}]
:benefitSetup {:benefitClass ""
:benefitClassEffectiveDate ""
:benefitSalary ""
:benefitSalaryEffectiveDate ""
:doNotApplyAdministrativePeriod false
:isMeasureAcaEligibility false}
:birthDate ""
:coEmpCode ""
:companyFEIN ""
:companyName ""
:currency ""
:customBooleanFields [{:category ""
:label ""
:value false}]
:customDateFields [{:category ""
:label ""
:value ""}]
:customDropDownFields [{:category ""
:label ""
:value ""}]
:customNumberFields [{:category ""
:label ""
:value ""}]
:customTextFields [{:category ""
:label ""
:value ""}]
:departmentPosition {:changeReason ""
:clockBadgeNumber ""
:costCenter1 ""
:costCenter2 ""
:costCenter3 ""
:effectiveDate ""
:employeeType ""
:equalEmploymentOpportunityClass ""
:isMinimumWageExempt false
:isOvertimeExempt false
:isSupervisorReviewer false
:isUnionDuesCollected false
:isUnionInitiationCollected false
:jobTitle ""
:payGroup ""
:positionCode ""
:reviewerCompanyNumber ""
:reviewerEmployeeId ""
:shift ""
:supervisorCompanyNumber ""
:supervisorEmployeeId ""
:tipped ""
:unionAffiliationDate ""
:unionCode ""
:unionPosition ""
:workersCompensation ""}
:disabilityDescription ""
:emergencyContacts [{:address1 ""
:address2 ""
:city ""
:country ""
:county ""
:email ""
:firstName ""
:homePhone ""
:lastName ""
:mobilePhone ""
:notes ""
:pager ""
:primaryPhone ""
:priority ""
:relationship ""
:state ""
:syncEmployeeInfo false
:workExtension ""
:workPhone ""
:zip ""}]
:employeeId ""
:ethnicity ""
:federalTax {:amount ""
:deductionsAmount ""
:dependentsAmount ""
:exemptions ""
:filingStatus ""
:higherRate false
:otherIncomeAmount ""
:percentage ""
:taxCalculationCode ""
:w4FormYear 0}
:firstName ""
:gender ""
:homeAddress {:address1 ""
:address2 ""
:city ""
:country ""
:county ""
:emailAddress ""
:mobilePhone ""
:phone ""
:postalCode ""
:state ""}
:isHighlyCompensated false
:isSmoker false
:lastName ""
:localTax [{:exemptions ""
:exemptions2 ""
:filingStatus ""
:residentPSD ""
:taxCode ""
:workPSD ""}]
:mainDirectDeposit {:accountNumber ""
:accountType ""
:blockSpecial false
:isSkipPreNote false
:nameOnAccount ""
:preNoteDate ""
:routingNumber ""}
:maritalStatus ""
:middleName ""
:nonPrimaryStateTax {:amount ""
:deductionsAmount ""
:dependentsAmount ""
:exemptions ""
:exemptions2 ""
:filingStatus ""
:higherRate false
:otherIncomeAmount ""
:percentage ""
:reciprocityCode ""
:specialCheckCalc ""
:taxCalculationCode ""
:taxCode ""
:w4FormYear 0}
:ownerPercent ""
:preferredName ""
:primaryPayRate {:annualSalary ""
:baseRate ""
:beginCheckDate ""
:changeReason ""
:defaultHours ""
:effectiveDate ""
:isAutoPay false
:payFrequency ""
:payGrade ""
:payRateNote ""
:payType ""
:ratePer ""
:salary ""}
:primaryStateTax {:amount ""
:deductionsAmount ""
:dependentsAmount ""
:exemptions ""
:exemptions2 ""
:filingStatus ""
:higherRate false
:otherIncomeAmount ""
:percentage ""
:specialCheckCalc ""
:taxCalculationCode ""
:taxCode ""
:w4FormYear 0}
:priorLastName ""
:salutation ""
:ssn ""
:status {:adjustedSeniorityDate ""
:changeReason ""
:effectiveDate ""
:employeeStatus ""
:hireDate ""
:isEligibleForRehire false
:reHireDate ""
:statusType ""
:terminationDate ""}
:suffix ""
:taxSetup {:fitwExemptNotes ""
:fitwExemptReason ""
:futaExemptNotes ""
:futaExemptReason ""
:isEmployee943 false
:isPension false
:isStatutory false
:medExemptNotes ""
:medExemptReason ""
:sitwExemptNotes ""
:sitwExemptReason ""
:ssExemptNotes ""
:ssExemptReason ""
:suiExemptNotes ""
:suiExemptReason ""
:suiState ""
:taxDistributionCode1099R ""
:taxForm ""}
:veteranDescription ""
:webTime {:badgeNumber ""
:chargeRate ""
:isTimeLaborEnabled false}
:workAddress {:address1 ""
:address2 ""
:city ""
:country ""
:county ""
:emailAddress ""
:location ""
:mailStop ""
:mobilePhone ""
:pager ""
:phone ""
:phoneExtension ""
:postalCode ""
:state ""}
:workEligibility {:alienOrAdmissionDocumentNumber ""
:attestedDate ""
:countryOfIssuance ""
:foreignPassportNumber ""
:i94AdmissionNumber ""
:i9DateVerified ""
:i9Notes ""
:isI9Verified false
:isSsnVerified false
:ssnDateVerified ""
:ssnNotes ""
:visaType ""
:workAuthorization ""
:workUntil ""}}})
require "http/client"
url = "{{baseUrl}}/v2/companies/:companyId/employees"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"additionalDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"amount\": \"\",\n \"amountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"additionalRate\": [\n {\n \"changeReason\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"endCheckDate\": \"\",\n \"job\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"rateNotes\": \"\",\n \"ratePer\": \"\",\n \"shift\": \"\"\n }\n ],\n \"benefitSetup\": {\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n },\n \"birthDate\": \"\",\n \"coEmpCode\": \"\",\n \"companyFEIN\": \"\",\n \"companyName\": \"\",\n \"currency\": \"\",\n \"customBooleanFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": false\n }\n ],\n \"customDateFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customDropDownFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customNumberFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customTextFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"departmentPosition\": {\n \"changeReason\": \"\",\n \"clockBadgeNumber\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"employeeType\": \"\",\n \"equalEmploymentOpportunityClass\": \"\",\n \"isMinimumWageExempt\": false,\n \"isOvertimeExempt\": false,\n \"isSupervisorReviewer\": false,\n \"isUnionDuesCollected\": false,\n \"isUnionInitiationCollected\": false,\n \"jobTitle\": \"\",\n \"payGroup\": \"\",\n \"positionCode\": \"\",\n \"reviewerCompanyNumber\": \"\",\n \"reviewerEmployeeId\": \"\",\n \"shift\": \"\",\n \"supervisorCompanyNumber\": \"\",\n \"supervisorEmployeeId\": \"\",\n \"tipped\": \"\",\n \"unionAffiliationDate\": \"\",\n \"unionCode\": \"\",\n \"unionPosition\": \"\",\n \"workersCompensation\": \"\"\n },\n \"disabilityDescription\": \"\",\n \"emergencyContacts\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"homePhone\": \"\",\n \"lastName\": \"\",\n \"mobilePhone\": \"\",\n \"notes\": \"\",\n \"pager\": \"\",\n \"primaryPhone\": \"\",\n \"priority\": \"\",\n \"relationship\": \"\",\n \"state\": \"\",\n \"syncEmployeeInfo\": false,\n \"workExtension\": \"\",\n \"workPhone\": \"\",\n \"zip\": \"\"\n }\n ],\n \"employeeId\": \"\",\n \"ethnicity\": \"\",\n \"federalTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"taxCalculationCode\": \"\",\n \"w4FormYear\": 0\n },\n \"firstName\": \"\",\n \"gender\": \"\",\n \"homeAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"isHighlyCompensated\": false,\n \"isSmoker\": false,\n \"lastName\": \"\",\n \"localTax\": [\n {\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n }\n ],\n \"mainDirectDeposit\": {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n },\n \"maritalStatus\": \"\",\n \"middleName\": \"\",\n \"nonPrimaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"ownerPercent\": \"\",\n \"preferredName\": \"\",\n \"primaryPayRate\": {\n \"annualSalary\": \"\",\n \"baseRate\": \"\",\n \"beginCheckDate\": \"\",\n \"changeReason\": \"\",\n \"defaultHours\": \"\",\n \"effectiveDate\": \"\",\n \"isAutoPay\": false,\n \"payFrequency\": \"\",\n \"payGrade\": \"\",\n \"payRateNote\": \"\",\n \"payType\": \"\",\n \"ratePer\": \"\",\n \"salary\": \"\"\n },\n \"primaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"priorLastName\": \"\",\n \"salutation\": \"\",\n \"ssn\": \"\",\n \"status\": {\n \"adjustedSeniorityDate\": \"\",\n \"changeReason\": \"\",\n \"effectiveDate\": \"\",\n \"employeeStatus\": \"\",\n \"hireDate\": \"\",\n \"isEligibleForRehire\": false,\n \"reHireDate\": \"\",\n \"statusType\": \"\",\n \"terminationDate\": \"\"\n },\n \"suffix\": \"\",\n \"taxSetup\": {\n \"fitwExemptNotes\": \"\",\n \"fitwExemptReason\": \"\",\n \"futaExemptNotes\": \"\",\n \"futaExemptReason\": \"\",\n \"isEmployee943\": false,\n \"isPension\": false,\n \"isStatutory\": false,\n \"medExemptNotes\": \"\",\n \"medExemptReason\": \"\",\n \"sitwExemptNotes\": \"\",\n \"sitwExemptReason\": \"\",\n \"ssExemptNotes\": \"\",\n \"ssExemptReason\": \"\",\n \"suiExemptNotes\": \"\",\n \"suiExemptReason\": \"\",\n \"suiState\": \"\",\n \"taxDistributionCode1099R\": \"\",\n \"taxForm\": \"\"\n },\n \"veteranDescription\": \"\",\n \"webTime\": {\n \"badgeNumber\": \"\",\n \"chargeRate\": \"\",\n \"isTimeLaborEnabled\": false\n },\n \"workAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"location\": \"\",\n \"mailStop\": \"\",\n \"mobilePhone\": \"\",\n \"pager\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"workEligibility\": {\n \"alienOrAdmissionDocumentNumber\": \"\",\n \"attestedDate\": \"\",\n \"countryOfIssuance\": \"\",\n \"foreignPassportNumber\": \"\",\n \"i94AdmissionNumber\": \"\",\n \"i9DateVerified\": \"\",\n \"i9Notes\": \"\",\n \"isI9Verified\": false,\n \"isSsnVerified\": false,\n \"ssnDateVerified\": \"\",\n \"ssnNotes\": \"\",\n \"visaType\": \"\",\n \"workAuthorization\": \"\",\n \"workUntil\": \"\"\n }\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v2/companies/:companyId/employees"),
Content = new StringContent("{\n \"additionalDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"amount\": \"\",\n \"amountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"additionalRate\": [\n {\n \"changeReason\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"endCheckDate\": \"\",\n \"job\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"rateNotes\": \"\",\n \"ratePer\": \"\",\n \"shift\": \"\"\n }\n ],\n \"benefitSetup\": {\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n },\n \"birthDate\": \"\",\n \"coEmpCode\": \"\",\n \"companyFEIN\": \"\",\n \"companyName\": \"\",\n \"currency\": \"\",\n \"customBooleanFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": false\n }\n ],\n \"customDateFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customDropDownFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customNumberFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customTextFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"departmentPosition\": {\n \"changeReason\": \"\",\n \"clockBadgeNumber\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"employeeType\": \"\",\n \"equalEmploymentOpportunityClass\": \"\",\n \"isMinimumWageExempt\": false,\n \"isOvertimeExempt\": false,\n \"isSupervisorReviewer\": false,\n \"isUnionDuesCollected\": false,\n \"isUnionInitiationCollected\": false,\n \"jobTitle\": \"\",\n \"payGroup\": \"\",\n \"positionCode\": \"\",\n \"reviewerCompanyNumber\": \"\",\n \"reviewerEmployeeId\": \"\",\n \"shift\": \"\",\n \"supervisorCompanyNumber\": \"\",\n \"supervisorEmployeeId\": \"\",\n \"tipped\": \"\",\n \"unionAffiliationDate\": \"\",\n \"unionCode\": \"\",\n \"unionPosition\": \"\",\n \"workersCompensation\": \"\"\n },\n \"disabilityDescription\": \"\",\n \"emergencyContacts\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"homePhone\": \"\",\n \"lastName\": \"\",\n \"mobilePhone\": \"\",\n \"notes\": \"\",\n \"pager\": \"\",\n \"primaryPhone\": \"\",\n \"priority\": \"\",\n \"relationship\": \"\",\n \"state\": \"\",\n \"syncEmployeeInfo\": false,\n \"workExtension\": \"\",\n \"workPhone\": \"\",\n \"zip\": \"\"\n }\n ],\n \"employeeId\": \"\",\n \"ethnicity\": \"\",\n \"federalTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"taxCalculationCode\": \"\",\n \"w4FormYear\": 0\n },\n \"firstName\": \"\",\n \"gender\": \"\",\n \"homeAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"isHighlyCompensated\": false,\n \"isSmoker\": false,\n \"lastName\": \"\",\n \"localTax\": [\n {\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n }\n ],\n \"mainDirectDeposit\": {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n },\n \"maritalStatus\": \"\",\n \"middleName\": \"\",\n \"nonPrimaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"ownerPercent\": \"\",\n \"preferredName\": \"\",\n \"primaryPayRate\": {\n \"annualSalary\": \"\",\n \"baseRate\": \"\",\n \"beginCheckDate\": \"\",\n \"changeReason\": \"\",\n \"defaultHours\": \"\",\n \"effectiveDate\": \"\",\n \"isAutoPay\": false,\n \"payFrequency\": \"\",\n \"payGrade\": \"\",\n \"payRateNote\": \"\",\n \"payType\": \"\",\n \"ratePer\": \"\",\n \"salary\": \"\"\n },\n \"primaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"priorLastName\": \"\",\n \"salutation\": \"\",\n \"ssn\": \"\",\n \"status\": {\n \"adjustedSeniorityDate\": \"\",\n \"changeReason\": \"\",\n \"effectiveDate\": \"\",\n \"employeeStatus\": \"\",\n \"hireDate\": \"\",\n \"isEligibleForRehire\": false,\n \"reHireDate\": \"\",\n \"statusType\": \"\",\n \"terminationDate\": \"\"\n },\n \"suffix\": \"\",\n \"taxSetup\": {\n \"fitwExemptNotes\": \"\",\n \"fitwExemptReason\": \"\",\n \"futaExemptNotes\": \"\",\n \"futaExemptReason\": \"\",\n \"isEmployee943\": false,\n \"isPension\": false,\n \"isStatutory\": false,\n \"medExemptNotes\": \"\",\n \"medExemptReason\": \"\",\n \"sitwExemptNotes\": \"\",\n \"sitwExemptReason\": \"\",\n \"ssExemptNotes\": \"\",\n \"ssExemptReason\": \"\",\n \"suiExemptNotes\": \"\",\n \"suiExemptReason\": \"\",\n \"suiState\": \"\",\n \"taxDistributionCode1099R\": \"\",\n \"taxForm\": \"\"\n },\n \"veteranDescription\": \"\",\n \"webTime\": {\n \"badgeNumber\": \"\",\n \"chargeRate\": \"\",\n \"isTimeLaborEnabled\": false\n },\n \"workAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"location\": \"\",\n \"mailStop\": \"\",\n \"mobilePhone\": \"\",\n \"pager\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"workEligibility\": {\n \"alienOrAdmissionDocumentNumber\": \"\",\n \"attestedDate\": \"\",\n \"countryOfIssuance\": \"\",\n \"foreignPassportNumber\": \"\",\n \"i94AdmissionNumber\": \"\",\n \"i9DateVerified\": \"\",\n \"i9Notes\": \"\",\n \"isI9Verified\": false,\n \"isSsnVerified\": false,\n \"ssnDateVerified\": \"\",\n \"ssnNotes\": \"\",\n \"visaType\": \"\",\n \"workAuthorization\": \"\",\n \"workUntil\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/companies/:companyId/employees");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"additionalDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"amount\": \"\",\n \"amountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"additionalRate\": [\n {\n \"changeReason\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"endCheckDate\": \"\",\n \"job\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"rateNotes\": \"\",\n \"ratePer\": \"\",\n \"shift\": \"\"\n }\n ],\n \"benefitSetup\": {\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n },\n \"birthDate\": \"\",\n \"coEmpCode\": \"\",\n \"companyFEIN\": \"\",\n \"companyName\": \"\",\n \"currency\": \"\",\n \"customBooleanFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": false\n }\n ],\n \"customDateFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customDropDownFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customNumberFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customTextFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"departmentPosition\": {\n \"changeReason\": \"\",\n \"clockBadgeNumber\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"employeeType\": \"\",\n \"equalEmploymentOpportunityClass\": \"\",\n \"isMinimumWageExempt\": false,\n \"isOvertimeExempt\": false,\n \"isSupervisorReviewer\": false,\n \"isUnionDuesCollected\": false,\n \"isUnionInitiationCollected\": false,\n \"jobTitle\": \"\",\n \"payGroup\": \"\",\n \"positionCode\": \"\",\n \"reviewerCompanyNumber\": \"\",\n \"reviewerEmployeeId\": \"\",\n \"shift\": \"\",\n \"supervisorCompanyNumber\": \"\",\n \"supervisorEmployeeId\": \"\",\n \"tipped\": \"\",\n \"unionAffiliationDate\": \"\",\n \"unionCode\": \"\",\n \"unionPosition\": \"\",\n \"workersCompensation\": \"\"\n },\n \"disabilityDescription\": \"\",\n \"emergencyContacts\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"homePhone\": \"\",\n \"lastName\": \"\",\n \"mobilePhone\": \"\",\n \"notes\": \"\",\n \"pager\": \"\",\n \"primaryPhone\": \"\",\n \"priority\": \"\",\n \"relationship\": \"\",\n \"state\": \"\",\n \"syncEmployeeInfo\": false,\n \"workExtension\": \"\",\n \"workPhone\": \"\",\n \"zip\": \"\"\n }\n ],\n \"employeeId\": \"\",\n \"ethnicity\": \"\",\n \"federalTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"taxCalculationCode\": \"\",\n \"w4FormYear\": 0\n },\n \"firstName\": \"\",\n \"gender\": \"\",\n \"homeAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"isHighlyCompensated\": false,\n \"isSmoker\": false,\n \"lastName\": \"\",\n \"localTax\": [\n {\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n }\n ],\n \"mainDirectDeposit\": {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n },\n \"maritalStatus\": \"\",\n \"middleName\": \"\",\n \"nonPrimaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"ownerPercent\": \"\",\n \"preferredName\": \"\",\n \"primaryPayRate\": {\n \"annualSalary\": \"\",\n \"baseRate\": \"\",\n \"beginCheckDate\": \"\",\n \"changeReason\": \"\",\n \"defaultHours\": \"\",\n \"effectiveDate\": \"\",\n \"isAutoPay\": false,\n \"payFrequency\": \"\",\n \"payGrade\": \"\",\n \"payRateNote\": \"\",\n \"payType\": \"\",\n \"ratePer\": \"\",\n \"salary\": \"\"\n },\n \"primaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"priorLastName\": \"\",\n \"salutation\": \"\",\n \"ssn\": \"\",\n \"status\": {\n \"adjustedSeniorityDate\": \"\",\n \"changeReason\": \"\",\n \"effectiveDate\": \"\",\n \"employeeStatus\": \"\",\n \"hireDate\": \"\",\n \"isEligibleForRehire\": false,\n \"reHireDate\": \"\",\n \"statusType\": \"\",\n \"terminationDate\": \"\"\n },\n \"suffix\": \"\",\n \"taxSetup\": {\n \"fitwExemptNotes\": \"\",\n \"fitwExemptReason\": \"\",\n \"futaExemptNotes\": \"\",\n \"futaExemptReason\": \"\",\n \"isEmployee943\": false,\n \"isPension\": false,\n \"isStatutory\": false,\n \"medExemptNotes\": \"\",\n \"medExemptReason\": \"\",\n \"sitwExemptNotes\": \"\",\n \"sitwExemptReason\": \"\",\n \"ssExemptNotes\": \"\",\n \"ssExemptReason\": \"\",\n \"suiExemptNotes\": \"\",\n \"suiExemptReason\": \"\",\n \"suiState\": \"\",\n \"taxDistributionCode1099R\": \"\",\n \"taxForm\": \"\"\n },\n \"veteranDescription\": \"\",\n \"webTime\": {\n \"badgeNumber\": \"\",\n \"chargeRate\": \"\",\n \"isTimeLaborEnabled\": false\n },\n \"workAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"location\": \"\",\n \"mailStop\": \"\",\n \"mobilePhone\": \"\",\n \"pager\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"workEligibility\": {\n \"alienOrAdmissionDocumentNumber\": \"\",\n \"attestedDate\": \"\",\n \"countryOfIssuance\": \"\",\n \"foreignPassportNumber\": \"\",\n \"i94AdmissionNumber\": \"\",\n \"i9DateVerified\": \"\",\n \"i9Notes\": \"\",\n \"isI9Verified\": false,\n \"isSsnVerified\": false,\n \"ssnDateVerified\": \"\",\n \"ssnNotes\": \"\",\n \"visaType\": \"\",\n \"workAuthorization\": \"\",\n \"workUntil\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/companies/:companyId/employees"
payload := strings.NewReader("{\n \"additionalDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"amount\": \"\",\n \"amountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"additionalRate\": [\n {\n \"changeReason\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"endCheckDate\": \"\",\n \"job\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"rateNotes\": \"\",\n \"ratePer\": \"\",\n \"shift\": \"\"\n }\n ],\n \"benefitSetup\": {\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n },\n \"birthDate\": \"\",\n \"coEmpCode\": \"\",\n \"companyFEIN\": \"\",\n \"companyName\": \"\",\n \"currency\": \"\",\n \"customBooleanFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": false\n }\n ],\n \"customDateFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customDropDownFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customNumberFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customTextFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"departmentPosition\": {\n \"changeReason\": \"\",\n \"clockBadgeNumber\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"employeeType\": \"\",\n \"equalEmploymentOpportunityClass\": \"\",\n \"isMinimumWageExempt\": false,\n \"isOvertimeExempt\": false,\n \"isSupervisorReviewer\": false,\n \"isUnionDuesCollected\": false,\n \"isUnionInitiationCollected\": false,\n \"jobTitle\": \"\",\n \"payGroup\": \"\",\n \"positionCode\": \"\",\n \"reviewerCompanyNumber\": \"\",\n \"reviewerEmployeeId\": \"\",\n \"shift\": \"\",\n \"supervisorCompanyNumber\": \"\",\n \"supervisorEmployeeId\": \"\",\n \"tipped\": \"\",\n \"unionAffiliationDate\": \"\",\n \"unionCode\": \"\",\n \"unionPosition\": \"\",\n \"workersCompensation\": \"\"\n },\n \"disabilityDescription\": \"\",\n \"emergencyContacts\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"homePhone\": \"\",\n \"lastName\": \"\",\n \"mobilePhone\": \"\",\n \"notes\": \"\",\n \"pager\": \"\",\n \"primaryPhone\": \"\",\n \"priority\": \"\",\n \"relationship\": \"\",\n \"state\": \"\",\n \"syncEmployeeInfo\": false,\n \"workExtension\": \"\",\n \"workPhone\": \"\",\n \"zip\": \"\"\n }\n ],\n \"employeeId\": \"\",\n \"ethnicity\": \"\",\n \"federalTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"taxCalculationCode\": \"\",\n \"w4FormYear\": 0\n },\n \"firstName\": \"\",\n \"gender\": \"\",\n \"homeAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"isHighlyCompensated\": false,\n \"isSmoker\": false,\n \"lastName\": \"\",\n \"localTax\": [\n {\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n }\n ],\n \"mainDirectDeposit\": {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n },\n \"maritalStatus\": \"\",\n \"middleName\": \"\",\n \"nonPrimaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"ownerPercent\": \"\",\n \"preferredName\": \"\",\n \"primaryPayRate\": {\n \"annualSalary\": \"\",\n \"baseRate\": \"\",\n \"beginCheckDate\": \"\",\n \"changeReason\": \"\",\n \"defaultHours\": \"\",\n \"effectiveDate\": \"\",\n \"isAutoPay\": false,\n \"payFrequency\": \"\",\n \"payGrade\": \"\",\n \"payRateNote\": \"\",\n \"payType\": \"\",\n \"ratePer\": \"\",\n \"salary\": \"\"\n },\n \"primaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"priorLastName\": \"\",\n \"salutation\": \"\",\n \"ssn\": \"\",\n \"status\": {\n \"adjustedSeniorityDate\": \"\",\n \"changeReason\": \"\",\n \"effectiveDate\": \"\",\n \"employeeStatus\": \"\",\n \"hireDate\": \"\",\n \"isEligibleForRehire\": false,\n \"reHireDate\": \"\",\n \"statusType\": \"\",\n \"terminationDate\": \"\"\n },\n \"suffix\": \"\",\n \"taxSetup\": {\n \"fitwExemptNotes\": \"\",\n \"fitwExemptReason\": \"\",\n \"futaExemptNotes\": \"\",\n \"futaExemptReason\": \"\",\n \"isEmployee943\": false,\n \"isPension\": false,\n \"isStatutory\": false,\n \"medExemptNotes\": \"\",\n \"medExemptReason\": \"\",\n \"sitwExemptNotes\": \"\",\n \"sitwExemptReason\": \"\",\n \"ssExemptNotes\": \"\",\n \"ssExemptReason\": \"\",\n \"suiExemptNotes\": \"\",\n \"suiExemptReason\": \"\",\n \"suiState\": \"\",\n \"taxDistributionCode1099R\": \"\",\n \"taxForm\": \"\"\n },\n \"veteranDescription\": \"\",\n \"webTime\": {\n \"badgeNumber\": \"\",\n \"chargeRate\": \"\",\n \"isTimeLaborEnabled\": false\n },\n \"workAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"location\": \"\",\n \"mailStop\": \"\",\n \"mobilePhone\": \"\",\n \"pager\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"workEligibility\": {\n \"alienOrAdmissionDocumentNumber\": \"\",\n \"attestedDate\": \"\",\n \"countryOfIssuance\": \"\",\n \"foreignPassportNumber\": \"\",\n \"i94AdmissionNumber\": \"\",\n \"i9DateVerified\": \"\",\n \"i9Notes\": \"\",\n \"isI9Verified\": false,\n \"isSsnVerified\": false,\n \"ssnDateVerified\": \"\",\n \"ssnNotes\": \"\",\n \"visaType\": \"\",\n \"workAuthorization\": \"\",\n \"workUntil\": \"\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v2/companies/:companyId/employees HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 6492
{
"additionalDirectDeposit": [
{
"accountNumber": "",
"accountType": "",
"amount": "",
"amountType": "",
"blockSpecial": false,
"isSkipPreNote": false,
"nameOnAccount": "",
"preNoteDate": "",
"routingNumber": ""
}
],
"additionalRate": [
{
"changeReason": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"endCheckDate": "",
"job": "",
"rate": "",
"rateCode": "",
"rateNotes": "",
"ratePer": "",
"shift": ""
}
],
"benefitSetup": {
"benefitClass": "",
"benefitClassEffectiveDate": "",
"benefitSalary": "",
"benefitSalaryEffectiveDate": "",
"doNotApplyAdministrativePeriod": false,
"isMeasureAcaEligibility": false
},
"birthDate": "",
"coEmpCode": "",
"companyFEIN": "",
"companyName": "",
"currency": "",
"customBooleanFields": [
{
"category": "",
"label": "",
"value": false
}
],
"customDateFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customDropDownFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customNumberFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customTextFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"departmentPosition": {
"changeReason": "",
"clockBadgeNumber": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"employeeType": "",
"equalEmploymentOpportunityClass": "",
"isMinimumWageExempt": false,
"isOvertimeExempt": false,
"isSupervisorReviewer": false,
"isUnionDuesCollected": false,
"isUnionInitiationCollected": false,
"jobTitle": "",
"payGroup": "",
"positionCode": "",
"reviewerCompanyNumber": "",
"reviewerEmployeeId": "",
"shift": "",
"supervisorCompanyNumber": "",
"supervisorEmployeeId": "",
"tipped": "",
"unionAffiliationDate": "",
"unionCode": "",
"unionPosition": "",
"workersCompensation": ""
},
"disabilityDescription": "",
"emergencyContacts": [
{
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"email": "",
"firstName": "",
"homePhone": "",
"lastName": "",
"mobilePhone": "",
"notes": "",
"pager": "",
"primaryPhone": "",
"priority": "",
"relationship": "",
"state": "",
"syncEmployeeInfo": false,
"workExtension": "",
"workPhone": "",
"zip": ""
}
],
"employeeId": "",
"ethnicity": "",
"federalTax": {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"taxCalculationCode": "",
"w4FormYear": 0
},
"firstName": "",
"gender": "",
"homeAddress": {
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"mobilePhone": "",
"phone": "",
"postalCode": "",
"state": ""
},
"isHighlyCompensated": false,
"isSmoker": false,
"lastName": "",
"localTax": [
{
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"residentPSD": "",
"taxCode": "",
"workPSD": ""
}
],
"mainDirectDeposit": {
"accountNumber": "",
"accountType": "",
"blockSpecial": false,
"isSkipPreNote": false,
"nameOnAccount": "",
"preNoteDate": "",
"routingNumber": ""
},
"maritalStatus": "",
"middleName": "",
"nonPrimaryStateTax": {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"reciprocityCode": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
},
"ownerPercent": "",
"preferredName": "",
"primaryPayRate": {
"annualSalary": "",
"baseRate": "",
"beginCheckDate": "",
"changeReason": "",
"defaultHours": "",
"effectiveDate": "",
"isAutoPay": false,
"payFrequency": "",
"payGrade": "",
"payRateNote": "",
"payType": "",
"ratePer": "",
"salary": ""
},
"primaryStateTax": {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
},
"priorLastName": "",
"salutation": "",
"ssn": "",
"status": {
"adjustedSeniorityDate": "",
"changeReason": "",
"effectiveDate": "",
"employeeStatus": "",
"hireDate": "",
"isEligibleForRehire": false,
"reHireDate": "",
"statusType": "",
"terminationDate": ""
},
"suffix": "",
"taxSetup": {
"fitwExemptNotes": "",
"fitwExemptReason": "",
"futaExemptNotes": "",
"futaExemptReason": "",
"isEmployee943": false,
"isPension": false,
"isStatutory": false,
"medExemptNotes": "",
"medExemptReason": "",
"sitwExemptNotes": "",
"sitwExemptReason": "",
"ssExemptNotes": "",
"ssExemptReason": "",
"suiExemptNotes": "",
"suiExemptReason": "",
"suiState": "",
"taxDistributionCode1099R": "",
"taxForm": ""
},
"veteranDescription": "",
"webTime": {
"badgeNumber": "",
"chargeRate": "",
"isTimeLaborEnabled": false
},
"workAddress": {
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"location": "",
"mailStop": "",
"mobilePhone": "",
"pager": "",
"phone": "",
"phoneExtension": "",
"postalCode": "",
"state": ""
},
"workEligibility": {
"alienOrAdmissionDocumentNumber": "",
"attestedDate": "",
"countryOfIssuance": "",
"foreignPassportNumber": "",
"i94AdmissionNumber": "",
"i9DateVerified": "",
"i9Notes": "",
"isI9Verified": false,
"isSsnVerified": false,
"ssnDateVerified": "",
"ssnNotes": "",
"visaType": "",
"workAuthorization": "",
"workUntil": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v2/companies/:companyId/employees")
.setHeader("content-type", "application/json")
.setBody("{\n \"additionalDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"amount\": \"\",\n \"amountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"additionalRate\": [\n {\n \"changeReason\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"endCheckDate\": \"\",\n \"job\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"rateNotes\": \"\",\n \"ratePer\": \"\",\n \"shift\": \"\"\n }\n ],\n \"benefitSetup\": {\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n },\n \"birthDate\": \"\",\n \"coEmpCode\": \"\",\n \"companyFEIN\": \"\",\n \"companyName\": \"\",\n \"currency\": \"\",\n \"customBooleanFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": false\n }\n ],\n \"customDateFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customDropDownFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customNumberFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customTextFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"departmentPosition\": {\n \"changeReason\": \"\",\n \"clockBadgeNumber\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"employeeType\": \"\",\n \"equalEmploymentOpportunityClass\": \"\",\n \"isMinimumWageExempt\": false,\n \"isOvertimeExempt\": false,\n \"isSupervisorReviewer\": false,\n \"isUnionDuesCollected\": false,\n \"isUnionInitiationCollected\": false,\n \"jobTitle\": \"\",\n \"payGroup\": \"\",\n \"positionCode\": \"\",\n \"reviewerCompanyNumber\": \"\",\n \"reviewerEmployeeId\": \"\",\n \"shift\": \"\",\n \"supervisorCompanyNumber\": \"\",\n \"supervisorEmployeeId\": \"\",\n \"tipped\": \"\",\n \"unionAffiliationDate\": \"\",\n \"unionCode\": \"\",\n \"unionPosition\": \"\",\n \"workersCompensation\": \"\"\n },\n \"disabilityDescription\": \"\",\n \"emergencyContacts\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"homePhone\": \"\",\n \"lastName\": \"\",\n \"mobilePhone\": \"\",\n \"notes\": \"\",\n \"pager\": \"\",\n \"primaryPhone\": \"\",\n \"priority\": \"\",\n \"relationship\": \"\",\n \"state\": \"\",\n \"syncEmployeeInfo\": false,\n \"workExtension\": \"\",\n \"workPhone\": \"\",\n \"zip\": \"\"\n }\n ],\n \"employeeId\": \"\",\n \"ethnicity\": \"\",\n \"federalTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"taxCalculationCode\": \"\",\n \"w4FormYear\": 0\n },\n \"firstName\": \"\",\n \"gender\": \"\",\n \"homeAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"isHighlyCompensated\": false,\n \"isSmoker\": false,\n \"lastName\": \"\",\n \"localTax\": [\n {\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n }\n ],\n \"mainDirectDeposit\": {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n },\n \"maritalStatus\": \"\",\n \"middleName\": \"\",\n \"nonPrimaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"ownerPercent\": \"\",\n \"preferredName\": \"\",\n \"primaryPayRate\": {\n \"annualSalary\": \"\",\n \"baseRate\": \"\",\n \"beginCheckDate\": \"\",\n \"changeReason\": \"\",\n \"defaultHours\": \"\",\n \"effectiveDate\": \"\",\n \"isAutoPay\": false,\n \"payFrequency\": \"\",\n \"payGrade\": \"\",\n \"payRateNote\": \"\",\n \"payType\": \"\",\n \"ratePer\": \"\",\n \"salary\": \"\"\n },\n \"primaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"priorLastName\": \"\",\n \"salutation\": \"\",\n \"ssn\": \"\",\n \"status\": {\n \"adjustedSeniorityDate\": \"\",\n \"changeReason\": \"\",\n \"effectiveDate\": \"\",\n \"employeeStatus\": \"\",\n \"hireDate\": \"\",\n \"isEligibleForRehire\": false,\n \"reHireDate\": \"\",\n \"statusType\": \"\",\n \"terminationDate\": \"\"\n },\n \"suffix\": \"\",\n \"taxSetup\": {\n \"fitwExemptNotes\": \"\",\n \"fitwExemptReason\": \"\",\n \"futaExemptNotes\": \"\",\n \"futaExemptReason\": \"\",\n \"isEmployee943\": false,\n \"isPension\": false,\n \"isStatutory\": false,\n \"medExemptNotes\": \"\",\n \"medExemptReason\": \"\",\n \"sitwExemptNotes\": \"\",\n \"sitwExemptReason\": \"\",\n \"ssExemptNotes\": \"\",\n \"ssExemptReason\": \"\",\n \"suiExemptNotes\": \"\",\n \"suiExemptReason\": \"\",\n \"suiState\": \"\",\n \"taxDistributionCode1099R\": \"\",\n \"taxForm\": \"\"\n },\n \"veteranDescription\": \"\",\n \"webTime\": {\n \"badgeNumber\": \"\",\n \"chargeRate\": \"\",\n \"isTimeLaborEnabled\": false\n },\n \"workAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"location\": \"\",\n \"mailStop\": \"\",\n \"mobilePhone\": \"\",\n \"pager\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"workEligibility\": {\n \"alienOrAdmissionDocumentNumber\": \"\",\n \"attestedDate\": \"\",\n \"countryOfIssuance\": \"\",\n \"foreignPassportNumber\": \"\",\n \"i94AdmissionNumber\": \"\",\n \"i9DateVerified\": \"\",\n \"i9Notes\": \"\",\n \"isI9Verified\": false,\n \"isSsnVerified\": false,\n \"ssnDateVerified\": \"\",\n \"ssnNotes\": \"\",\n \"visaType\": \"\",\n \"workAuthorization\": \"\",\n \"workUntil\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/companies/:companyId/employees"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"additionalDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"amount\": \"\",\n \"amountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"additionalRate\": [\n {\n \"changeReason\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"endCheckDate\": \"\",\n \"job\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"rateNotes\": \"\",\n \"ratePer\": \"\",\n \"shift\": \"\"\n }\n ],\n \"benefitSetup\": {\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n },\n \"birthDate\": \"\",\n \"coEmpCode\": \"\",\n \"companyFEIN\": \"\",\n \"companyName\": \"\",\n \"currency\": \"\",\n \"customBooleanFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": false\n }\n ],\n \"customDateFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customDropDownFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customNumberFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customTextFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"departmentPosition\": {\n \"changeReason\": \"\",\n \"clockBadgeNumber\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"employeeType\": \"\",\n \"equalEmploymentOpportunityClass\": \"\",\n \"isMinimumWageExempt\": false,\n \"isOvertimeExempt\": false,\n \"isSupervisorReviewer\": false,\n \"isUnionDuesCollected\": false,\n \"isUnionInitiationCollected\": false,\n \"jobTitle\": \"\",\n \"payGroup\": \"\",\n \"positionCode\": \"\",\n \"reviewerCompanyNumber\": \"\",\n \"reviewerEmployeeId\": \"\",\n \"shift\": \"\",\n \"supervisorCompanyNumber\": \"\",\n \"supervisorEmployeeId\": \"\",\n \"tipped\": \"\",\n \"unionAffiliationDate\": \"\",\n \"unionCode\": \"\",\n \"unionPosition\": \"\",\n \"workersCompensation\": \"\"\n },\n \"disabilityDescription\": \"\",\n \"emergencyContacts\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"homePhone\": \"\",\n \"lastName\": \"\",\n \"mobilePhone\": \"\",\n \"notes\": \"\",\n \"pager\": \"\",\n \"primaryPhone\": \"\",\n \"priority\": \"\",\n \"relationship\": \"\",\n \"state\": \"\",\n \"syncEmployeeInfo\": false,\n \"workExtension\": \"\",\n \"workPhone\": \"\",\n \"zip\": \"\"\n }\n ],\n \"employeeId\": \"\",\n \"ethnicity\": \"\",\n \"federalTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"taxCalculationCode\": \"\",\n \"w4FormYear\": 0\n },\n \"firstName\": \"\",\n \"gender\": \"\",\n \"homeAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"isHighlyCompensated\": false,\n \"isSmoker\": false,\n \"lastName\": \"\",\n \"localTax\": [\n {\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n }\n ],\n \"mainDirectDeposit\": {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n },\n \"maritalStatus\": \"\",\n \"middleName\": \"\",\n \"nonPrimaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"ownerPercent\": \"\",\n \"preferredName\": \"\",\n \"primaryPayRate\": {\n \"annualSalary\": \"\",\n \"baseRate\": \"\",\n \"beginCheckDate\": \"\",\n \"changeReason\": \"\",\n \"defaultHours\": \"\",\n \"effectiveDate\": \"\",\n \"isAutoPay\": false,\n \"payFrequency\": \"\",\n \"payGrade\": \"\",\n \"payRateNote\": \"\",\n \"payType\": \"\",\n \"ratePer\": \"\",\n \"salary\": \"\"\n },\n \"primaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"priorLastName\": \"\",\n \"salutation\": \"\",\n \"ssn\": \"\",\n \"status\": {\n \"adjustedSeniorityDate\": \"\",\n \"changeReason\": \"\",\n \"effectiveDate\": \"\",\n \"employeeStatus\": \"\",\n \"hireDate\": \"\",\n \"isEligibleForRehire\": false,\n \"reHireDate\": \"\",\n \"statusType\": \"\",\n \"terminationDate\": \"\"\n },\n \"suffix\": \"\",\n \"taxSetup\": {\n \"fitwExemptNotes\": \"\",\n \"fitwExemptReason\": \"\",\n \"futaExemptNotes\": \"\",\n \"futaExemptReason\": \"\",\n \"isEmployee943\": false,\n \"isPension\": false,\n \"isStatutory\": false,\n \"medExemptNotes\": \"\",\n \"medExemptReason\": \"\",\n \"sitwExemptNotes\": \"\",\n \"sitwExemptReason\": \"\",\n \"ssExemptNotes\": \"\",\n \"ssExemptReason\": \"\",\n \"suiExemptNotes\": \"\",\n \"suiExemptReason\": \"\",\n \"suiState\": \"\",\n \"taxDistributionCode1099R\": \"\",\n \"taxForm\": \"\"\n },\n \"veteranDescription\": \"\",\n \"webTime\": {\n \"badgeNumber\": \"\",\n \"chargeRate\": \"\",\n \"isTimeLaborEnabled\": false\n },\n \"workAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"location\": \"\",\n \"mailStop\": \"\",\n \"mobilePhone\": \"\",\n \"pager\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"workEligibility\": {\n \"alienOrAdmissionDocumentNumber\": \"\",\n \"attestedDate\": \"\",\n \"countryOfIssuance\": \"\",\n \"foreignPassportNumber\": \"\",\n \"i94AdmissionNumber\": \"\",\n \"i9DateVerified\": \"\",\n \"i9Notes\": \"\",\n \"isI9Verified\": false,\n \"isSsnVerified\": false,\n \"ssnDateVerified\": \"\",\n \"ssnNotes\": \"\",\n \"visaType\": \"\",\n \"workAuthorization\": \"\",\n \"workUntil\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"additionalDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"amount\": \"\",\n \"amountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"additionalRate\": [\n {\n \"changeReason\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"endCheckDate\": \"\",\n \"job\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"rateNotes\": \"\",\n \"ratePer\": \"\",\n \"shift\": \"\"\n }\n ],\n \"benefitSetup\": {\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n },\n \"birthDate\": \"\",\n \"coEmpCode\": \"\",\n \"companyFEIN\": \"\",\n \"companyName\": \"\",\n \"currency\": \"\",\n \"customBooleanFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": false\n }\n ],\n \"customDateFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customDropDownFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customNumberFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customTextFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"departmentPosition\": {\n \"changeReason\": \"\",\n \"clockBadgeNumber\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"employeeType\": \"\",\n \"equalEmploymentOpportunityClass\": \"\",\n \"isMinimumWageExempt\": false,\n \"isOvertimeExempt\": false,\n \"isSupervisorReviewer\": false,\n \"isUnionDuesCollected\": false,\n \"isUnionInitiationCollected\": false,\n \"jobTitle\": \"\",\n \"payGroup\": \"\",\n \"positionCode\": \"\",\n \"reviewerCompanyNumber\": \"\",\n \"reviewerEmployeeId\": \"\",\n \"shift\": \"\",\n \"supervisorCompanyNumber\": \"\",\n \"supervisorEmployeeId\": \"\",\n \"tipped\": \"\",\n \"unionAffiliationDate\": \"\",\n \"unionCode\": \"\",\n \"unionPosition\": \"\",\n \"workersCompensation\": \"\"\n },\n \"disabilityDescription\": \"\",\n \"emergencyContacts\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"homePhone\": \"\",\n \"lastName\": \"\",\n \"mobilePhone\": \"\",\n \"notes\": \"\",\n \"pager\": \"\",\n \"primaryPhone\": \"\",\n \"priority\": \"\",\n \"relationship\": \"\",\n \"state\": \"\",\n \"syncEmployeeInfo\": false,\n \"workExtension\": \"\",\n \"workPhone\": \"\",\n \"zip\": \"\"\n }\n ],\n \"employeeId\": \"\",\n \"ethnicity\": \"\",\n \"federalTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"taxCalculationCode\": \"\",\n \"w4FormYear\": 0\n },\n \"firstName\": \"\",\n \"gender\": \"\",\n \"homeAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"isHighlyCompensated\": false,\n \"isSmoker\": false,\n \"lastName\": \"\",\n \"localTax\": [\n {\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n }\n ],\n \"mainDirectDeposit\": {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n },\n \"maritalStatus\": \"\",\n \"middleName\": \"\",\n \"nonPrimaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"ownerPercent\": \"\",\n \"preferredName\": \"\",\n \"primaryPayRate\": {\n \"annualSalary\": \"\",\n \"baseRate\": \"\",\n \"beginCheckDate\": \"\",\n \"changeReason\": \"\",\n \"defaultHours\": \"\",\n \"effectiveDate\": \"\",\n \"isAutoPay\": false,\n \"payFrequency\": \"\",\n \"payGrade\": \"\",\n \"payRateNote\": \"\",\n \"payType\": \"\",\n \"ratePer\": \"\",\n \"salary\": \"\"\n },\n \"primaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"priorLastName\": \"\",\n \"salutation\": \"\",\n \"ssn\": \"\",\n \"status\": {\n \"adjustedSeniorityDate\": \"\",\n \"changeReason\": \"\",\n \"effectiveDate\": \"\",\n \"employeeStatus\": \"\",\n \"hireDate\": \"\",\n \"isEligibleForRehire\": false,\n \"reHireDate\": \"\",\n \"statusType\": \"\",\n \"terminationDate\": \"\"\n },\n \"suffix\": \"\",\n \"taxSetup\": {\n \"fitwExemptNotes\": \"\",\n \"fitwExemptReason\": \"\",\n \"futaExemptNotes\": \"\",\n \"futaExemptReason\": \"\",\n \"isEmployee943\": false,\n \"isPension\": false,\n \"isStatutory\": false,\n \"medExemptNotes\": \"\",\n \"medExemptReason\": \"\",\n \"sitwExemptNotes\": \"\",\n \"sitwExemptReason\": \"\",\n \"ssExemptNotes\": \"\",\n \"ssExemptReason\": \"\",\n \"suiExemptNotes\": \"\",\n \"suiExemptReason\": \"\",\n \"suiState\": \"\",\n \"taxDistributionCode1099R\": \"\",\n \"taxForm\": \"\"\n },\n \"veteranDescription\": \"\",\n \"webTime\": {\n \"badgeNumber\": \"\",\n \"chargeRate\": \"\",\n \"isTimeLaborEnabled\": false\n },\n \"workAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"location\": \"\",\n \"mailStop\": \"\",\n \"mobilePhone\": \"\",\n \"pager\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"workEligibility\": {\n \"alienOrAdmissionDocumentNumber\": \"\",\n \"attestedDate\": \"\",\n \"countryOfIssuance\": \"\",\n \"foreignPassportNumber\": \"\",\n \"i94AdmissionNumber\": \"\",\n \"i9DateVerified\": \"\",\n \"i9Notes\": \"\",\n \"isI9Verified\": false,\n \"isSsnVerified\": false,\n \"ssnDateVerified\": \"\",\n \"ssnNotes\": \"\",\n \"visaType\": \"\",\n \"workAuthorization\": \"\",\n \"workUntil\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v2/companies/:companyId/employees")
.header("content-type", "application/json")
.body("{\n \"additionalDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"amount\": \"\",\n \"amountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"additionalRate\": [\n {\n \"changeReason\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"endCheckDate\": \"\",\n \"job\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"rateNotes\": \"\",\n \"ratePer\": \"\",\n \"shift\": \"\"\n }\n ],\n \"benefitSetup\": {\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n },\n \"birthDate\": \"\",\n \"coEmpCode\": \"\",\n \"companyFEIN\": \"\",\n \"companyName\": \"\",\n \"currency\": \"\",\n \"customBooleanFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": false\n }\n ],\n \"customDateFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customDropDownFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customNumberFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customTextFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"departmentPosition\": {\n \"changeReason\": \"\",\n \"clockBadgeNumber\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"employeeType\": \"\",\n \"equalEmploymentOpportunityClass\": \"\",\n \"isMinimumWageExempt\": false,\n \"isOvertimeExempt\": false,\n \"isSupervisorReviewer\": false,\n \"isUnionDuesCollected\": false,\n \"isUnionInitiationCollected\": false,\n \"jobTitle\": \"\",\n \"payGroup\": \"\",\n \"positionCode\": \"\",\n \"reviewerCompanyNumber\": \"\",\n \"reviewerEmployeeId\": \"\",\n \"shift\": \"\",\n \"supervisorCompanyNumber\": \"\",\n \"supervisorEmployeeId\": \"\",\n \"tipped\": \"\",\n \"unionAffiliationDate\": \"\",\n \"unionCode\": \"\",\n \"unionPosition\": \"\",\n \"workersCompensation\": \"\"\n },\n \"disabilityDescription\": \"\",\n \"emergencyContacts\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"homePhone\": \"\",\n \"lastName\": \"\",\n \"mobilePhone\": \"\",\n \"notes\": \"\",\n \"pager\": \"\",\n \"primaryPhone\": \"\",\n \"priority\": \"\",\n \"relationship\": \"\",\n \"state\": \"\",\n \"syncEmployeeInfo\": false,\n \"workExtension\": \"\",\n \"workPhone\": \"\",\n \"zip\": \"\"\n }\n ],\n \"employeeId\": \"\",\n \"ethnicity\": \"\",\n \"federalTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"taxCalculationCode\": \"\",\n \"w4FormYear\": 0\n },\n \"firstName\": \"\",\n \"gender\": \"\",\n \"homeAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"isHighlyCompensated\": false,\n \"isSmoker\": false,\n \"lastName\": \"\",\n \"localTax\": [\n {\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n }\n ],\n \"mainDirectDeposit\": {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n },\n \"maritalStatus\": \"\",\n \"middleName\": \"\",\n \"nonPrimaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"ownerPercent\": \"\",\n \"preferredName\": \"\",\n \"primaryPayRate\": {\n \"annualSalary\": \"\",\n \"baseRate\": \"\",\n \"beginCheckDate\": \"\",\n \"changeReason\": \"\",\n \"defaultHours\": \"\",\n \"effectiveDate\": \"\",\n \"isAutoPay\": false,\n \"payFrequency\": \"\",\n \"payGrade\": \"\",\n \"payRateNote\": \"\",\n \"payType\": \"\",\n \"ratePer\": \"\",\n \"salary\": \"\"\n },\n \"primaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"priorLastName\": \"\",\n \"salutation\": \"\",\n \"ssn\": \"\",\n \"status\": {\n \"adjustedSeniorityDate\": \"\",\n \"changeReason\": \"\",\n \"effectiveDate\": \"\",\n \"employeeStatus\": \"\",\n \"hireDate\": \"\",\n \"isEligibleForRehire\": false,\n \"reHireDate\": \"\",\n \"statusType\": \"\",\n \"terminationDate\": \"\"\n },\n \"suffix\": \"\",\n \"taxSetup\": {\n \"fitwExemptNotes\": \"\",\n \"fitwExemptReason\": \"\",\n \"futaExemptNotes\": \"\",\n \"futaExemptReason\": \"\",\n \"isEmployee943\": false,\n \"isPension\": false,\n \"isStatutory\": false,\n \"medExemptNotes\": \"\",\n \"medExemptReason\": \"\",\n \"sitwExemptNotes\": \"\",\n \"sitwExemptReason\": \"\",\n \"ssExemptNotes\": \"\",\n \"ssExemptReason\": \"\",\n \"suiExemptNotes\": \"\",\n \"suiExemptReason\": \"\",\n \"suiState\": \"\",\n \"taxDistributionCode1099R\": \"\",\n \"taxForm\": \"\"\n },\n \"veteranDescription\": \"\",\n \"webTime\": {\n \"badgeNumber\": \"\",\n \"chargeRate\": \"\",\n \"isTimeLaborEnabled\": false\n },\n \"workAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"location\": \"\",\n \"mailStop\": \"\",\n \"mobilePhone\": \"\",\n \"pager\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"workEligibility\": {\n \"alienOrAdmissionDocumentNumber\": \"\",\n \"attestedDate\": \"\",\n \"countryOfIssuance\": \"\",\n \"foreignPassportNumber\": \"\",\n \"i94AdmissionNumber\": \"\",\n \"i9DateVerified\": \"\",\n \"i9Notes\": \"\",\n \"isI9Verified\": false,\n \"isSsnVerified\": false,\n \"ssnDateVerified\": \"\",\n \"ssnNotes\": \"\",\n \"visaType\": \"\",\n \"workAuthorization\": \"\",\n \"workUntil\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
additionalDirectDeposit: [
{
accountNumber: '',
accountType: '',
amount: '',
amountType: '',
blockSpecial: false,
isSkipPreNote: false,
nameOnAccount: '',
preNoteDate: '',
routingNumber: ''
}
],
additionalRate: [
{
changeReason: '',
costCenter1: '',
costCenter2: '',
costCenter3: '',
effectiveDate: '',
endCheckDate: '',
job: '',
rate: '',
rateCode: '',
rateNotes: '',
ratePer: '',
shift: ''
}
],
benefitSetup: {
benefitClass: '',
benefitClassEffectiveDate: '',
benefitSalary: '',
benefitSalaryEffectiveDate: '',
doNotApplyAdministrativePeriod: false,
isMeasureAcaEligibility: false
},
birthDate: '',
coEmpCode: '',
companyFEIN: '',
companyName: '',
currency: '',
customBooleanFields: [
{
category: '',
label: '',
value: false
}
],
customDateFields: [
{
category: '',
label: '',
value: ''
}
],
customDropDownFields: [
{
category: '',
label: '',
value: ''
}
],
customNumberFields: [
{
category: '',
label: '',
value: ''
}
],
customTextFields: [
{
category: '',
label: '',
value: ''
}
],
departmentPosition: {
changeReason: '',
clockBadgeNumber: '',
costCenter1: '',
costCenter2: '',
costCenter3: '',
effectiveDate: '',
employeeType: '',
equalEmploymentOpportunityClass: '',
isMinimumWageExempt: false,
isOvertimeExempt: false,
isSupervisorReviewer: false,
isUnionDuesCollected: false,
isUnionInitiationCollected: false,
jobTitle: '',
payGroup: '',
positionCode: '',
reviewerCompanyNumber: '',
reviewerEmployeeId: '',
shift: '',
supervisorCompanyNumber: '',
supervisorEmployeeId: '',
tipped: '',
unionAffiliationDate: '',
unionCode: '',
unionPosition: '',
workersCompensation: ''
},
disabilityDescription: '',
emergencyContacts: [
{
address1: '',
address2: '',
city: '',
country: '',
county: '',
email: '',
firstName: '',
homePhone: '',
lastName: '',
mobilePhone: '',
notes: '',
pager: '',
primaryPhone: '',
priority: '',
relationship: '',
state: '',
syncEmployeeInfo: false,
workExtension: '',
workPhone: '',
zip: ''
}
],
employeeId: '',
ethnicity: '',
federalTax: {
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
taxCalculationCode: '',
w4FormYear: 0
},
firstName: '',
gender: '',
homeAddress: {
address1: '',
address2: '',
city: '',
country: '',
county: '',
emailAddress: '',
mobilePhone: '',
phone: '',
postalCode: '',
state: ''
},
isHighlyCompensated: false,
isSmoker: false,
lastName: '',
localTax: [
{
exemptions: '',
exemptions2: '',
filingStatus: '',
residentPSD: '',
taxCode: '',
workPSD: ''
}
],
mainDirectDeposit: {
accountNumber: '',
accountType: '',
blockSpecial: false,
isSkipPreNote: false,
nameOnAccount: '',
preNoteDate: '',
routingNumber: ''
},
maritalStatus: '',
middleName: '',
nonPrimaryStateTax: {
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
exemptions2: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
reciprocityCode: '',
specialCheckCalc: '',
taxCalculationCode: '',
taxCode: '',
w4FormYear: 0
},
ownerPercent: '',
preferredName: '',
primaryPayRate: {
annualSalary: '',
baseRate: '',
beginCheckDate: '',
changeReason: '',
defaultHours: '',
effectiveDate: '',
isAutoPay: false,
payFrequency: '',
payGrade: '',
payRateNote: '',
payType: '',
ratePer: '',
salary: ''
},
primaryStateTax: {
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
exemptions2: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
specialCheckCalc: '',
taxCalculationCode: '',
taxCode: '',
w4FormYear: 0
},
priorLastName: '',
salutation: '',
ssn: '',
status: {
adjustedSeniorityDate: '',
changeReason: '',
effectiveDate: '',
employeeStatus: '',
hireDate: '',
isEligibleForRehire: false,
reHireDate: '',
statusType: '',
terminationDate: ''
},
suffix: '',
taxSetup: {
fitwExemptNotes: '',
fitwExemptReason: '',
futaExemptNotes: '',
futaExemptReason: '',
isEmployee943: false,
isPension: false,
isStatutory: false,
medExemptNotes: '',
medExemptReason: '',
sitwExemptNotes: '',
sitwExemptReason: '',
ssExemptNotes: '',
ssExemptReason: '',
suiExemptNotes: '',
suiExemptReason: '',
suiState: '',
taxDistributionCode1099R: '',
taxForm: ''
},
veteranDescription: '',
webTime: {
badgeNumber: '',
chargeRate: '',
isTimeLaborEnabled: false
},
workAddress: {
address1: '',
address2: '',
city: '',
country: '',
county: '',
emailAddress: '',
location: '',
mailStop: '',
mobilePhone: '',
pager: '',
phone: '',
phoneExtension: '',
postalCode: '',
state: ''
},
workEligibility: {
alienOrAdmissionDocumentNumber: '',
attestedDate: '',
countryOfIssuance: '',
foreignPassportNumber: '',
i94AdmissionNumber: '',
i9DateVerified: '',
i9Notes: '',
isI9Verified: false,
isSsnVerified: false,
ssnDateVerified: '',
ssnNotes: '',
visaType: '',
workAuthorization: '',
workUntil: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v2/companies/:companyId/employees');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/companies/:companyId/employees',
headers: {'content-type': 'application/json'},
data: {
additionalDirectDeposit: [
{
accountNumber: '',
accountType: '',
amount: '',
amountType: '',
blockSpecial: false,
isSkipPreNote: false,
nameOnAccount: '',
preNoteDate: '',
routingNumber: ''
}
],
additionalRate: [
{
changeReason: '',
costCenter1: '',
costCenter2: '',
costCenter3: '',
effectiveDate: '',
endCheckDate: '',
job: '',
rate: '',
rateCode: '',
rateNotes: '',
ratePer: '',
shift: ''
}
],
benefitSetup: {
benefitClass: '',
benefitClassEffectiveDate: '',
benefitSalary: '',
benefitSalaryEffectiveDate: '',
doNotApplyAdministrativePeriod: false,
isMeasureAcaEligibility: false
},
birthDate: '',
coEmpCode: '',
companyFEIN: '',
companyName: '',
currency: '',
customBooleanFields: [{category: '', label: '', value: false}],
customDateFields: [{category: '', label: '', value: ''}],
customDropDownFields: [{category: '', label: '', value: ''}],
customNumberFields: [{category: '', label: '', value: ''}],
customTextFields: [{category: '', label: '', value: ''}],
departmentPosition: {
changeReason: '',
clockBadgeNumber: '',
costCenter1: '',
costCenter2: '',
costCenter3: '',
effectiveDate: '',
employeeType: '',
equalEmploymentOpportunityClass: '',
isMinimumWageExempt: false,
isOvertimeExempt: false,
isSupervisorReviewer: false,
isUnionDuesCollected: false,
isUnionInitiationCollected: false,
jobTitle: '',
payGroup: '',
positionCode: '',
reviewerCompanyNumber: '',
reviewerEmployeeId: '',
shift: '',
supervisorCompanyNumber: '',
supervisorEmployeeId: '',
tipped: '',
unionAffiliationDate: '',
unionCode: '',
unionPosition: '',
workersCompensation: ''
},
disabilityDescription: '',
emergencyContacts: [
{
address1: '',
address2: '',
city: '',
country: '',
county: '',
email: '',
firstName: '',
homePhone: '',
lastName: '',
mobilePhone: '',
notes: '',
pager: '',
primaryPhone: '',
priority: '',
relationship: '',
state: '',
syncEmployeeInfo: false,
workExtension: '',
workPhone: '',
zip: ''
}
],
employeeId: '',
ethnicity: '',
federalTax: {
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
taxCalculationCode: '',
w4FormYear: 0
},
firstName: '',
gender: '',
homeAddress: {
address1: '',
address2: '',
city: '',
country: '',
county: '',
emailAddress: '',
mobilePhone: '',
phone: '',
postalCode: '',
state: ''
},
isHighlyCompensated: false,
isSmoker: false,
lastName: '',
localTax: [
{
exemptions: '',
exemptions2: '',
filingStatus: '',
residentPSD: '',
taxCode: '',
workPSD: ''
}
],
mainDirectDeposit: {
accountNumber: '',
accountType: '',
blockSpecial: false,
isSkipPreNote: false,
nameOnAccount: '',
preNoteDate: '',
routingNumber: ''
},
maritalStatus: '',
middleName: '',
nonPrimaryStateTax: {
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
exemptions2: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
reciprocityCode: '',
specialCheckCalc: '',
taxCalculationCode: '',
taxCode: '',
w4FormYear: 0
},
ownerPercent: '',
preferredName: '',
primaryPayRate: {
annualSalary: '',
baseRate: '',
beginCheckDate: '',
changeReason: '',
defaultHours: '',
effectiveDate: '',
isAutoPay: false,
payFrequency: '',
payGrade: '',
payRateNote: '',
payType: '',
ratePer: '',
salary: ''
},
primaryStateTax: {
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
exemptions2: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
specialCheckCalc: '',
taxCalculationCode: '',
taxCode: '',
w4FormYear: 0
},
priorLastName: '',
salutation: '',
ssn: '',
status: {
adjustedSeniorityDate: '',
changeReason: '',
effectiveDate: '',
employeeStatus: '',
hireDate: '',
isEligibleForRehire: false,
reHireDate: '',
statusType: '',
terminationDate: ''
},
suffix: '',
taxSetup: {
fitwExemptNotes: '',
fitwExemptReason: '',
futaExemptNotes: '',
futaExemptReason: '',
isEmployee943: false,
isPension: false,
isStatutory: false,
medExemptNotes: '',
medExemptReason: '',
sitwExemptNotes: '',
sitwExemptReason: '',
ssExemptNotes: '',
ssExemptReason: '',
suiExemptNotes: '',
suiExemptReason: '',
suiState: '',
taxDistributionCode1099R: '',
taxForm: ''
},
veteranDescription: '',
webTime: {badgeNumber: '', chargeRate: '', isTimeLaborEnabled: false},
workAddress: {
address1: '',
address2: '',
city: '',
country: '',
county: '',
emailAddress: '',
location: '',
mailStop: '',
mobilePhone: '',
pager: '',
phone: '',
phoneExtension: '',
postalCode: '',
state: ''
},
workEligibility: {
alienOrAdmissionDocumentNumber: '',
attestedDate: '',
countryOfIssuance: '',
foreignPassportNumber: '',
i94AdmissionNumber: '',
i9DateVerified: '',
i9Notes: '',
isI9Verified: false,
isSsnVerified: false,
ssnDateVerified: '',
ssnNotes: '',
visaType: '',
workAuthorization: '',
workUntil: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/companies/:companyId/employees';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"additionalDirectDeposit":[{"accountNumber":"","accountType":"","amount":"","amountType":"","blockSpecial":false,"isSkipPreNote":false,"nameOnAccount":"","preNoteDate":"","routingNumber":""}],"additionalRate":[{"changeReason":"","costCenter1":"","costCenter2":"","costCenter3":"","effectiveDate":"","endCheckDate":"","job":"","rate":"","rateCode":"","rateNotes":"","ratePer":"","shift":""}],"benefitSetup":{"benefitClass":"","benefitClassEffectiveDate":"","benefitSalary":"","benefitSalaryEffectiveDate":"","doNotApplyAdministrativePeriod":false,"isMeasureAcaEligibility":false},"birthDate":"","coEmpCode":"","companyFEIN":"","companyName":"","currency":"","customBooleanFields":[{"category":"","label":"","value":false}],"customDateFields":[{"category":"","label":"","value":""}],"customDropDownFields":[{"category":"","label":"","value":""}],"customNumberFields":[{"category":"","label":"","value":""}],"customTextFields":[{"category":"","label":"","value":""}],"departmentPosition":{"changeReason":"","clockBadgeNumber":"","costCenter1":"","costCenter2":"","costCenter3":"","effectiveDate":"","employeeType":"","equalEmploymentOpportunityClass":"","isMinimumWageExempt":false,"isOvertimeExempt":false,"isSupervisorReviewer":false,"isUnionDuesCollected":false,"isUnionInitiationCollected":false,"jobTitle":"","payGroup":"","positionCode":"","reviewerCompanyNumber":"","reviewerEmployeeId":"","shift":"","supervisorCompanyNumber":"","supervisorEmployeeId":"","tipped":"","unionAffiliationDate":"","unionCode":"","unionPosition":"","workersCompensation":""},"disabilityDescription":"","emergencyContacts":[{"address1":"","address2":"","city":"","country":"","county":"","email":"","firstName":"","homePhone":"","lastName":"","mobilePhone":"","notes":"","pager":"","primaryPhone":"","priority":"","relationship":"","state":"","syncEmployeeInfo":false,"workExtension":"","workPhone":"","zip":""}],"employeeId":"","ethnicity":"","federalTax":{"amount":"","deductionsAmount":"","dependentsAmount":"","exemptions":"","filingStatus":"","higherRate":false,"otherIncomeAmount":"","percentage":"","taxCalculationCode":"","w4FormYear":0},"firstName":"","gender":"","homeAddress":{"address1":"","address2":"","city":"","country":"","county":"","emailAddress":"","mobilePhone":"","phone":"","postalCode":"","state":""},"isHighlyCompensated":false,"isSmoker":false,"lastName":"","localTax":[{"exemptions":"","exemptions2":"","filingStatus":"","residentPSD":"","taxCode":"","workPSD":""}],"mainDirectDeposit":{"accountNumber":"","accountType":"","blockSpecial":false,"isSkipPreNote":false,"nameOnAccount":"","preNoteDate":"","routingNumber":""},"maritalStatus":"","middleName":"","nonPrimaryStateTax":{"amount":"","deductionsAmount":"","dependentsAmount":"","exemptions":"","exemptions2":"","filingStatus":"","higherRate":false,"otherIncomeAmount":"","percentage":"","reciprocityCode":"","specialCheckCalc":"","taxCalculationCode":"","taxCode":"","w4FormYear":0},"ownerPercent":"","preferredName":"","primaryPayRate":{"annualSalary":"","baseRate":"","beginCheckDate":"","changeReason":"","defaultHours":"","effectiveDate":"","isAutoPay":false,"payFrequency":"","payGrade":"","payRateNote":"","payType":"","ratePer":"","salary":""},"primaryStateTax":{"amount":"","deductionsAmount":"","dependentsAmount":"","exemptions":"","exemptions2":"","filingStatus":"","higherRate":false,"otherIncomeAmount":"","percentage":"","specialCheckCalc":"","taxCalculationCode":"","taxCode":"","w4FormYear":0},"priorLastName":"","salutation":"","ssn":"","status":{"adjustedSeniorityDate":"","changeReason":"","effectiveDate":"","employeeStatus":"","hireDate":"","isEligibleForRehire":false,"reHireDate":"","statusType":"","terminationDate":""},"suffix":"","taxSetup":{"fitwExemptNotes":"","fitwExemptReason":"","futaExemptNotes":"","futaExemptReason":"","isEmployee943":false,"isPension":false,"isStatutory":false,"medExemptNotes":"","medExemptReason":"","sitwExemptNotes":"","sitwExemptReason":"","ssExemptNotes":"","ssExemptReason":"","suiExemptNotes":"","suiExemptReason":"","suiState":"","taxDistributionCode1099R":"","taxForm":""},"veteranDescription":"","webTime":{"badgeNumber":"","chargeRate":"","isTimeLaborEnabled":false},"workAddress":{"address1":"","address2":"","city":"","country":"","county":"","emailAddress":"","location":"","mailStop":"","mobilePhone":"","pager":"","phone":"","phoneExtension":"","postalCode":"","state":""},"workEligibility":{"alienOrAdmissionDocumentNumber":"","attestedDate":"","countryOfIssuance":"","foreignPassportNumber":"","i94AdmissionNumber":"","i9DateVerified":"","i9Notes":"","isI9Verified":false,"isSsnVerified":false,"ssnDateVerified":"","ssnNotes":"","visaType":"","workAuthorization":"","workUntil":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/companies/:companyId/employees',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "additionalDirectDeposit": [\n {\n "accountNumber": "",\n "accountType": "",\n "amount": "",\n "amountType": "",\n "blockSpecial": false,\n "isSkipPreNote": false,\n "nameOnAccount": "",\n "preNoteDate": "",\n "routingNumber": ""\n }\n ],\n "additionalRate": [\n {\n "changeReason": "",\n "costCenter1": "",\n "costCenter2": "",\n "costCenter3": "",\n "effectiveDate": "",\n "endCheckDate": "",\n "job": "",\n "rate": "",\n "rateCode": "",\n "rateNotes": "",\n "ratePer": "",\n "shift": ""\n }\n ],\n "benefitSetup": {\n "benefitClass": "",\n "benefitClassEffectiveDate": "",\n "benefitSalary": "",\n "benefitSalaryEffectiveDate": "",\n "doNotApplyAdministrativePeriod": false,\n "isMeasureAcaEligibility": false\n },\n "birthDate": "",\n "coEmpCode": "",\n "companyFEIN": "",\n "companyName": "",\n "currency": "",\n "customBooleanFields": [\n {\n "category": "",\n "label": "",\n "value": false\n }\n ],\n "customDateFields": [\n {\n "category": "",\n "label": "",\n "value": ""\n }\n ],\n "customDropDownFields": [\n {\n "category": "",\n "label": "",\n "value": ""\n }\n ],\n "customNumberFields": [\n {\n "category": "",\n "label": "",\n "value": ""\n }\n ],\n "customTextFields": [\n {\n "category": "",\n "label": "",\n "value": ""\n }\n ],\n "departmentPosition": {\n "changeReason": "",\n "clockBadgeNumber": "",\n "costCenter1": "",\n "costCenter2": "",\n "costCenter3": "",\n "effectiveDate": "",\n "employeeType": "",\n "equalEmploymentOpportunityClass": "",\n "isMinimumWageExempt": false,\n "isOvertimeExempt": false,\n "isSupervisorReviewer": false,\n "isUnionDuesCollected": false,\n "isUnionInitiationCollected": false,\n "jobTitle": "",\n "payGroup": "",\n "positionCode": "",\n "reviewerCompanyNumber": "",\n "reviewerEmployeeId": "",\n "shift": "",\n "supervisorCompanyNumber": "",\n "supervisorEmployeeId": "",\n "tipped": "",\n "unionAffiliationDate": "",\n "unionCode": "",\n "unionPosition": "",\n "workersCompensation": ""\n },\n "disabilityDescription": "",\n "emergencyContacts": [\n {\n "address1": "",\n "address2": "",\n "city": "",\n "country": "",\n "county": "",\n "email": "",\n "firstName": "",\n "homePhone": "",\n "lastName": "",\n "mobilePhone": "",\n "notes": "",\n "pager": "",\n "primaryPhone": "",\n "priority": "",\n "relationship": "",\n "state": "",\n "syncEmployeeInfo": false,\n "workExtension": "",\n "workPhone": "",\n "zip": ""\n }\n ],\n "employeeId": "",\n "ethnicity": "",\n "federalTax": {\n "amount": "",\n "deductionsAmount": "",\n "dependentsAmount": "",\n "exemptions": "",\n "filingStatus": "",\n "higherRate": false,\n "otherIncomeAmount": "",\n "percentage": "",\n "taxCalculationCode": "",\n "w4FormYear": 0\n },\n "firstName": "",\n "gender": "",\n "homeAddress": {\n "address1": "",\n "address2": "",\n "city": "",\n "country": "",\n "county": "",\n "emailAddress": "",\n "mobilePhone": "",\n "phone": "",\n "postalCode": "",\n "state": ""\n },\n "isHighlyCompensated": false,\n "isSmoker": false,\n "lastName": "",\n "localTax": [\n {\n "exemptions": "",\n "exemptions2": "",\n "filingStatus": "",\n "residentPSD": "",\n "taxCode": "",\n "workPSD": ""\n }\n ],\n "mainDirectDeposit": {\n "accountNumber": "",\n "accountType": "",\n "blockSpecial": false,\n "isSkipPreNote": false,\n "nameOnAccount": "",\n "preNoteDate": "",\n "routingNumber": ""\n },\n "maritalStatus": "",\n "middleName": "",\n "nonPrimaryStateTax": {\n "amount": "",\n "deductionsAmount": "",\n "dependentsAmount": "",\n "exemptions": "",\n "exemptions2": "",\n "filingStatus": "",\n "higherRate": false,\n "otherIncomeAmount": "",\n "percentage": "",\n "reciprocityCode": "",\n "specialCheckCalc": "",\n "taxCalculationCode": "",\n "taxCode": "",\n "w4FormYear": 0\n },\n "ownerPercent": "",\n "preferredName": "",\n "primaryPayRate": {\n "annualSalary": "",\n "baseRate": "",\n "beginCheckDate": "",\n "changeReason": "",\n "defaultHours": "",\n "effectiveDate": "",\n "isAutoPay": false,\n "payFrequency": "",\n "payGrade": "",\n "payRateNote": "",\n "payType": "",\n "ratePer": "",\n "salary": ""\n },\n "primaryStateTax": {\n "amount": "",\n "deductionsAmount": "",\n "dependentsAmount": "",\n "exemptions": "",\n "exemptions2": "",\n "filingStatus": "",\n "higherRate": false,\n "otherIncomeAmount": "",\n "percentage": "",\n "specialCheckCalc": "",\n "taxCalculationCode": "",\n "taxCode": "",\n "w4FormYear": 0\n },\n "priorLastName": "",\n "salutation": "",\n "ssn": "",\n "status": {\n "adjustedSeniorityDate": "",\n "changeReason": "",\n "effectiveDate": "",\n "employeeStatus": "",\n "hireDate": "",\n "isEligibleForRehire": false,\n "reHireDate": "",\n "statusType": "",\n "terminationDate": ""\n },\n "suffix": "",\n "taxSetup": {\n "fitwExemptNotes": "",\n "fitwExemptReason": "",\n "futaExemptNotes": "",\n "futaExemptReason": "",\n "isEmployee943": false,\n "isPension": false,\n "isStatutory": false,\n "medExemptNotes": "",\n "medExemptReason": "",\n "sitwExemptNotes": "",\n "sitwExemptReason": "",\n "ssExemptNotes": "",\n "ssExemptReason": "",\n "suiExemptNotes": "",\n "suiExemptReason": "",\n "suiState": "",\n "taxDistributionCode1099R": "",\n "taxForm": ""\n },\n "veteranDescription": "",\n "webTime": {\n "badgeNumber": "",\n "chargeRate": "",\n "isTimeLaborEnabled": false\n },\n "workAddress": {\n "address1": "",\n "address2": "",\n "city": "",\n "country": "",\n "county": "",\n "emailAddress": "",\n "location": "",\n "mailStop": "",\n "mobilePhone": "",\n "pager": "",\n "phone": "",\n "phoneExtension": "",\n "postalCode": "",\n "state": ""\n },\n "workEligibility": {\n "alienOrAdmissionDocumentNumber": "",\n "attestedDate": "",\n "countryOfIssuance": "",\n "foreignPassportNumber": "",\n "i94AdmissionNumber": "",\n "i9DateVerified": "",\n "i9Notes": "",\n "isI9Verified": false,\n "isSsnVerified": false,\n "ssnDateVerified": "",\n "ssnNotes": "",\n "visaType": "",\n "workAuthorization": "",\n "workUntil": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"additionalDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"amount\": \"\",\n \"amountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"additionalRate\": [\n {\n \"changeReason\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"endCheckDate\": \"\",\n \"job\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"rateNotes\": \"\",\n \"ratePer\": \"\",\n \"shift\": \"\"\n }\n ],\n \"benefitSetup\": {\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n },\n \"birthDate\": \"\",\n \"coEmpCode\": \"\",\n \"companyFEIN\": \"\",\n \"companyName\": \"\",\n \"currency\": \"\",\n \"customBooleanFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": false\n }\n ],\n \"customDateFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customDropDownFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customNumberFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customTextFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"departmentPosition\": {\n \"changeReason\": \"\",\n \"clockBadgeNumber\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"employeeType\": \"\",\n \"equalEmploymentOpportunityClass\": \"\",\n \"isMinimumWageExempt\": false,\n \"isOvertimeExempt\": false,\n \"isSupervisorReviewer\": false,\n \"isUnionDuesCollected\": false,\n \"isUnionInitiationCollected\": false,\n \"jobTitle\": \"\",\n \"payGroup\": \"\",\n \"positionCode\": \"\",\n \"reviewerCompanyNumber\": \"\",\n \"reviewerEmployeeId\": \"\",\n \"shift\": \"\",\n \"supervisorCompanyNumber\": \"\",\n \"supervisorEmployeeId\": \"\",\n \"tipped\": \"\",\n \"unionAffiliationDate\": \"\",\n \"unionCode\": \"\",\n \"unionPosition\": \"\",\n \"workersCompensation\": \"\"\n },\n \"disabilityDescription\": \"\",\n \"emergencyContacts\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"homePhone\": \"\",\n \"lastName\": \"\",\n \"mobilePhone\": \"\",\n \"notes\": \"\",\n \"pager\": \"\",\n \"primaryPhone\": \"\",\n \"priority\": \"\",\n \"relationship\": \"\",\n \"state\": \"\",\n \"syncEmployeeInfo\": false,\n \"workExtension\": \"\",\n \"workPhone\": \"\",\n \"zip\": \"\"\n }\n ],\n \"employeeId\": \"\",\n \"ethnicity\": \"\",\n \"federalTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"taxCalculationCode\": \"\",\n \"w4FormYear\": 0\n },\n \"firstName\": \"\",\n \"gender\": \"\",\n \"homeAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"isHighlyCompensated\": false,\n \"isSmoker\": false,\n \"lastName\": \"\",\n \"localTax\": [\n {\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n }\n ],\n \"mainDirectDeposit\": {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n },\n \"maritalStatus\": \"\",\n \"middleName\": \"\",\n \"nonPrimaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"ownerPercent\": \"\",\n \"preferredName\": \"\",\n \"primaryPayRate\": {\n \"annualSalary\": \"\",\n \"baseRate\": \"\",\n \"beginCheckDate\": \"\",\n \"changeReason\": \"\",\n \"defaultHours\": \"\",\n \"effectiveDate\": \"\",\n \"isAutoPay\": false,\n \"payFrequency\": \"\",\n \"payGrade\": \"\",\n \"payRateNote\": \"\",\n \"payType\": \"\",\n \"ratePer\": \"\",\n \"salary\": \"\"\n },\n \"primaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"priorLastName\": \"\",\n \"salutation\": \"\",\n \"ssn\": \"\",\n \"status\": {\n \"adjustedSeniorityDate\": \"\",\n \"changeReason\": \"\",\n \"effectiveDate\": \"\",\n \"employeeStatus\": \"\",\n \"hireDate\": \"\",\n \"isEligibleForRehire\": false,\n \"reHireDate\": \"\",\n \"statusType\": \"\",\n \"terminationDate\": \"\"\n },\n \"suffix\": \"\",\n \"taxSetup\": {\n \"fitwExemptNotes\": \"\",\n \"fitwExemptReason\": \"\",\n \"futaExemptNotes\": \"\",\n \"futaExemptReason\": \"\",\n \"isEmployee943\": false,\n \"isPension\": false,\n \"isStatutory\": false,\n \"medExemptNotes\": \"\",\n \"medExemptReason\": \"\",\n \"sitwExemptNotes\": \"\",\n \"sitwExemptReason\": \"\",\n \"ssExemptNotes\": \"\",\n \"ssExemptReason\": \"\",\n \"suiExemptNotes\": \"\",\n \"suiExemptReason\": \"\",\n \"suiState\": \"\",\n \"taxDistributionCode1099R\": \"\",\n \"taxForm\": \"\"\n },\n \"veteranDescription\": \"\",\n \"webTime\": {\n \"badgeNumber\": \"\",\n \"chargeRate\": \"\",\n \"isTimeLaborEnabled\": false\n },\n \"workAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"location\": \"\",\n \"mailStop\": \"\",\n \"mobilePhone\": \"\",\n \"pager\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"workEligibility\": {\n \"alienOrAdmissionDocumentNumber\": \"\",\n \"attestedDate\": \"\",\n \"countryOfIssuance\": \"\",\n \"foreignPassportNumber\": \"\",\n \"i94AdmissionNumber\": \"\",\n \"i9DateVerified\": \"\",\n \"i9Notes\": \"\",\n \"isI9Verified\": false,\n \"isSsnVerified\": false,\n \"ssnDateVerified\": \"\",\n \"ssnNotes\": \"\",\n \"visaType\": \"\",\n \"workAuthorization\": \"\",\n \"workUntil\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/companies/:companyId/employees',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
additionalDirectDeposit: [
{
accountNumber: '',
accountType: '',
amount: '',
amountType: '',
blockSpecial: false,
isSkipPreNote: false,
nameOnAccount: '',
preNoteDate: '',
routingNumber: ''
}
],
additionalRate: [
{
changeReason: '',
costCenter1: '',
costCenter2: '',
costCenter3: '',
effectiveDate: '',
endCheckDate: '',
job: '',
rate: '',
rateCode: '',
rateNotes: '',
ratePer: '',
shift: ''
}
],
benefitSetup: {
benefitClass: '',
benefitClassEffectiveDate: '',
benefitSalary: '',
benefitSalaryEffectiveDate: '',
doNotApplyAdministrativePeriod: false,
isMeasureAcaEligibility: false
},
birthDate: '',
coEmpCode: '',
companyFEIN: '',
companyName: '',
currency: '',
customBooleanFields: [{category: '', label: '', value: false}],
customDateFields: [{category: '', label: '', value: ''}],
customDropDownFields: [{category: '', label: '', value: ''}],
customNumberFields: [{category: '', label: '', value: ''}],
customTextFields: [{category: '', label: '', value: ''}],
departmentPosition: {
changeReason: '',
clockBadgeNumber: '',
costCenter1: '',
costCenter2: '',
costCenter3: '',
effectiveDate: '',
employeeType: '',
equalEmploymentOpportunityClass: '',
isMinimumWageExempt: false,
isOvertimeExempt: false,
isSupervisorReviewer: false,
isUnionDuesCollected: false,
isUnionInitiationCollected: false,
jobTitle: '',
payGroup: '',
positionCode: '',
reviewerCompanyNumber: '',
reviewerEmployeeId: '',
shift: '',
supervisorCompanyNumber: '',
supervisorEmployeeId: '',
tipped: '',
unionAffiliationDate: '',
unionCode: '',
unionPosition: '',
workersCompensation: ''
},
disabilityDescription: '',
emergencyContacts: [
{
address1: '',
address2: '',
city: '',
country: '',
county: '',
email: '',
firstName: '',
homePhone: '',
lastName: '',
mobilePhone: '',
notes: '',
pager: '',
primaryPhone: '',
priority: '',
relationship: '',
state: '',
syncEmployeeInfo: false,
workExtension: '',
workPhone: '',
zip: ''
}
],
employeeId: '',
ethnicity: '',
federalTax: {
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
taxCalculationCode: '',
w4FormYear: 0
},
firstName: '',
gender: '',
homeAddress: {
address1: '',
address2: '',
city: '',
country: '',
county: '',
emailAddress: '',
mobilePhone: '',
phone: '',
postalCode: '',
state: ''
},
isHighlyCompensated: false,
isSmoker: false,
lastName: '',
localTax: [
{
exemptions: '',
exemptions2: '',
filingStatus: '',
residentPSD: '',
taxCode: '',
workPSD: ''
}
],
mainDirectDeposit: {
accountNumber: '',
accountType: '',
blockSpecial: false,
isSkipPreNote: false,
nameOnAccount: '',
preNoteDate: '',
routingNumber: ''
},
maritalStatus: '',
middleName: '',
nonPrimaryStateTax: {
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
exemptions2: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
reciprocityCode: '',
specialCheckCalc: '',
taxCalculationCode: '',
taxCode: '',
w4FormYear: 0
},
ownerPercent: '',
preferredName: '',
primaryPayRate: {
annualSalary: '',
baseRate: '',
beginCheckDate: '',
changeReason: '',
defaultHours: '',
effectiveDate: '',
isAutoPay: false,
payFrequency: '',
payGrade: '',
payRateNote: '',
payType: '',
ratePer: '',
salary: ''
},
primaryStateTax: {
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
exemptions2: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
specialCheckCalc: '',
taxCalculationCode: '',
taxCode: '',
w4FormYear: 0
},
priorLastName: '',
salutation: '',
ssn: '',
status: {
adjustedSeniorityDate: '',
changeReason: '',
effectiveDate: '',
employeeStatus: '',
hireDate: '',
isEligibleForRehire: false,
reHireDate: '',
statusType: '',
terminationDate: ''
},
suffix: '',
taxSetup: {
fitwExemptNotes: '',
fitwExemptReason: '',
futaExemptNotes: '',
futaExemptReason: '',
isEmployee943: false,
isPension: false,
isStatutory: false,
medExemptNotes: '',
medExemptReason: '',
sitwExemptNotes: '',
sitwExemptReason: '',
ssExemptNotes: '',
ssExemptReason: '',
suiExemptNotes: '',
suiExemptReason: '',
suiState: '',
taxDistributionCode1099R: '',
taxForm: ''
},
veteranDescription: '',
webTime: {badgeNumber: '', chargeRate: '', isTimeLaborEnabled: false},
workAddress: {
address1: '',
address2: '',
city: '',
country: '',
county: '',
emailAddress: '',
location: '',
mailStop: '',
mobilePhone: '',
pager: '',
phone: '',
phoneExtension: '',
postalCode: '',
state: ''
},
workEligibility: {
alienOrAdmissionDocumentNumber: '',
attestedDate: '',
countryOfIssuance: '',
foreignPassportNumber: '',
i94AdmissionNumber: '',
i9DateVerified: '',
i9Notes: '',
isI9Verified: false,
isSsnVerified: false,
ssnDateVerified: '',
ssnNotes: '',
visaType: '',
workAuthorization: '',
workUntil: ''
}
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/companies/:companyId/employees',
headers: {'content-type': 'application/json'},
body: {
additionalDirectDeposit: [
{
accountNumber: '',
accountType: '',
amount: '',
amountType: '',
blockSpecial: false,
isSkipPreNote: false,
nameOnAccount: '',
preNoteDate: '',
routingNumber: ''
}
],
additionalRate: [
{
changeReason: '',
costCenter1: '',
costCenter2: '',
costCenter3: '',
effectiveDate: '',
endCheckDate: '',
job: '',
rate: '',
rateCode: '',
rateNotes: '',
ratePer: '',
shift: ''
}
],
benefitSetup: {
benefitClass: '',
benefitClassEffectiveDate: '',
benefitSalary: '',
benefitSalaryEffectiveDate: '',
doNotApplyAdministrativePeriod: false,
isMeasureAcaEligibility: false
},
birthDate: '',
coEmpCode: '',
companyFEIN: '',
companyName: '',
currency: '',
customBooleanFields: [{category: '', label: '', value: false}],
customDateFields: [{category: '', label: '', value: ''}],
customDropDownFields: [{category: '', label: '', value: ''}],
customNumberFields: [{category: '', label: '', value: ''}],
customTextFields: [{category: '', label: '', value: ''}],
departmentPosition: {
changeReason: '',
clockBadgeNumber: '',
costCenter1: '',
costCenter2: '',
costCenter3: '',
effectiveDate: '',
employeeType: '',
equalEmploymentOpportunityClass: '',
isMinimumWageExempt: false,
isOvertimeExempt: false,
isSupervisorReviewer: false,
isUnionDuesCollected: false,
isUnionInitiationCollected: false,
jobTitle: '',
payGroup: '',
positionCode: '',
reviewerCompanyNumber: '',
reviewerEmployeeId: '',
shift: '',
supervisorCompanyNumber: '',
supervisorEmployeeId: '',
tipped: '',
unionAffiliationDate: '',
unionCode: '',
unionPosition: '',
workersCompensation: ''
},
disabilityDescription: '',
emergencyContacts: [
{
address1: '',
address2: '',
city: '',
country: '',
county: '',
email: '',
firstName: '',
homePhone: '',
lastName: '',
mobilePhone: '',
notes: '',
pager: '',
primaryPhone: '',
priority: '',
relationship: '',
state: '',
syncEmployeeInfo: false,
workExtension: '',
workPhone: '',
zip: ''
}
],
employeeId: '',
ethnicity: '',
federalTax: {
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
taxCalculationCode: '',
w4FormYear: 0
},
firstName: '',
gender: '',
homeAddress: {
address1: '',
address2: '',
city: '',
country: '',
county: '',
emailAddress: '',
mobilePhone: '',
phone: '',
postalCode: '',
state: ''
},
isHighlyCompensated: false,
isSmoker: false,
lastName: '',
localTax: [
{
exemptions: '',
exemptions2: '',
filingStatus: '',
residentPSD: '',
taxCode: '',
workPSD: ''
}
],
mainDirectDeposit: {
accountNumber: '',
accountType: '',
blockSpecial: false,
isSkipPreNote: false,
nameOnAccount: '',
preNoteDate: '',
routingNumber: ''
},
maritalStatus: '',
middleName: '',
nonPrimaryStateTax: {
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
exemptions2: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
reciprocityCode: '',
specialCheckCalc: '',
taxCalculationCode: '',
taxCode: '',
w4FormYear: 0
},
ownerPercent: '',
preferredName: '',
primaryPayRate: {
annualSalary: '',
baseRate: '',
beginCheckDate: '',
changeReason: '',
defaultHours: '',
effectiveDate: '',
isAutoPay: false,
payFrequency: '',
payGrade: '',
payRateNote: '',
payType: '',
ratePer: '',
salary: ''
},
primaryStateTax: {
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
exemptions2: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
specialCheckCalc: '',
taxCalculationCode: '',
taxCode: '',
w4FormYear: 0
},
priorLastName: '',
salutation: '',
ssn: '',
status: {
adjustedSeniorityDate: '',
changeReason: '',
effectiveDate: '',
employeeStatus: '',
hireDate: '',
isEligibleForRehire: false,
reHireDate: '',
statusType: '',
terminationDate: ''
},
suffix: '',
taxSetup: {
fitwExemptNotes: '',
fitwExemptReason: '',
futaExemptNotes: '',
futaExemptReason: '',
isEmployee943: false,
isPension: false,
isStatutory: false,
medExemptNotes: '',
medExemptReason: '',
sitwExemptNotes: '',
sitwExemptReason: '',
ssExemptNotes: '',
ssExemptReason: '',
suiExemptNotes: '',
suiExemptReason: '',
suiState: '',
taxDistributionCode1099R: '',
taxForm: ''
},
veteranDescription: '',
webTime: {badgeNumber: '', chargeRate: '', isTimeLaborEnabled: false},
workAddress: {
address1: '',
address2: '',
city: '',
country: '',
county: '',
emailAddress: '',
location: '',
mailStop: '',
mobilePhone: '',
pager: '',
phone: '',
phoneExtension: '',
postalCode: '',
state: ''
},
workEligibility: {
alienOrAdmissionDocumentNumber: '',
attestedDate: '',
countryOfIssuance: '',
foreignPassportNumber: '',
i94AdmissionNumber: '',
i9DateVerified: '',
i9Notes: '',
isI9Verified: false,
isSsnVerified: false,
ssnDateVerified: '',
ssnNotes: '',
visaType: '',
workAuthorization: '',
workUntil: ''
}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v2/companies/:companyId/employees');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
additionalDirectDeposit: [
{
accountNumber: '',
accountType: '',
amount: '',
amountType: '',
blockSpecial: false,
isSkipPreNote: false,
nameOnAccount: '',
preNoteDate: '',
routingNumber: ''
}
],
additionalRate: [
{
changeReason: '',
costCenter1: '',
costCenter2: '',
costCenter3: '',
effectiveDate: '',
endCheckDate: '',
job: '',
rate: '',
rateCode: '',
rateNotes: '',
ratePer: '',
shift: ''
}
],
benefitSetup: {
benefitClass: '',
benefitClassEffectiveDate: '',
benefitSalary: '',
benefitSalaryEffectiveDate: '',
doNotApplyAdministrativePeriod: false,
isMeasureAcaEligibility: false
},
birthDate: '',
coEmpCode: '',
companyFEIN: '',
companyName: '',
currency: '',
customBooleanFields: [
{
category: '',
label: '',
value: false
}
],
customDateFields: [
{
category: '',
label: '',
value: ''
}
],
customDropDownFields: [
{
category: '',
label: '',
value: ''
}
],
customNumberFields: [
{
category: '',
label: '',
value: ''
}
],
customTextFields: [
{
category: '',
label: '',
value: ''
}
],
departmentPosition: {
changeReason: '',
clockBadgeNumber: '',
costCenter1: '',
costCenter2: '',
costCenter3: '',
effectiveDate: '',
employeeType: '',
equalEmploymentOpportunityClass: '',
isMinimumWageExempt: false,
isOvertimeExempt: false,
isSupervisorReviewer: false,
isUnionDuesCollected: false,
isUnionInitiationCollected: false,
jobTitle: '',
payGroup: '',
positionCode: '',
reviewerCompanyNumber: '',
reviewerEmployeeId: '',
shift: '',
supervisorCompanyNumber: '',
supervisorEmployeeId: '',
tipped: '',
unionAffiliationDate: '',
unionCode: '',
unionPosition: '',
workersCompensation: ''
},
disabilityDescription: '',
emergencyContacts: [
{
address1: '',
address2: '',
city: '',
country: '',
county: '',
email: '',
firstName: '',
homePhone: '',
lastName: '',
mobilePhone: '',
notes: '',
pager: '',
primaryPhone: '',
priority: '',
relationship: '',
state: '',
syncEmployeeInfo: false,
workExtension: '',
workPhone: '',
zip: ''
}
],
employeeId: '',
ethnicity: '',
federalTax: {
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
taxCalculationCode: '',
w4FormYear: 0
},
firstName: '',
gender: '',
homeAddress: {
address1: '',
address2: '',
city: '',
country: '',
county: '',
emailAddress: '',
mobilePhone: '',
phone: '',
postalCode: '',
state: ''
},
isHighlyCompensated: false,
isSmoker: false,
lastName: '',
localTax: [
{
exemptions: '',
exemptions2: '',
filingStatus: '',
residentPSD: '',
taxCode: '',
workPSD: ''
}
],
mainDirectDeposit: {
accountNumber: '',
accountType: '',
blockSpecial: false,
isSkipPreNote: false,
nameOnAccount: '',
preNoteDate: '',
routingNumber: ''
},
maritalStatus: '',
middleName: '',
nonPrimaryStateTax: {
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
exemptions2: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
reciprocityCode: '',
specialCheckCalc: '',
taxCalculationCode: '',
taxCode: '',
w4FormYear: 0
},
ownerPercent: '',
preferredName: '',
primaryPayRate: {
annualSalary: '',
baseRate: '',
beginCheckDate: '',
changeReason: '',
defaultHours: '',
effectiveDate: '',
isAutoPay: false,
payFrequency: '',
payGrade: '',
payRateNote: '',
payType: '',
ratePer: '',
salary: ''
},
primaryStateTax: {
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
exemptions2: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
specialCheckCalc: '',
taxCalculationCode: '',
taxCode: '',
w4FormYear: 0
},
priorLastName: '',
salutation: '',
ssn: '',
status: {
adjustedSeniorityDate: '',
changeReason: '',
effectiveDate: '',
employeeStatus: '',
hireDate: '',
isEligibleForRehire: false,
reHireDate: '',
statusType: '',
terminationDate: ''
},
suffix: '',
taxSetup: {
fitwExemptNotes: '',
fitwExemptReason: '',
futaExemptNotes: '',
futaExemptReason: '',
isEmployee943: false,
isPension: false,
isStatutory: false,
medExemptNotes: '',
medExemptReason: '',
sitwExemptNotes: '',
sitwExemptReason: '',
ssExemptNotes: '',
ssExemptReason: '',
suiExemptNotes: '',
suiExemptReason: '',
suiState: '',
taxDistributionCode1099R: '',
taxForm: ''
},
veteranDescription: '',
webTime: {
badgeNumber: '',
chargeRate: '',
isTimeLaborEnabled: false
},
workAddress: {
address1: '',
address2: '',
city: '',
country: '',
county: '',
emailAddress: '',
location: '',
mailStop: '',
mobilePhone: '',
pager: '',
phone: '',
phoneExtension: '',
postalCode: '',
state: ''
},
workEligibility: {
alienOrAdmissionDocumentNumber: '',
attestedDate: '',
countryOfIssuance: '',
foreignPassportNumber: '',
i94AdmissionNumber: '',
i9DateVerified: '',
i9Notes: '',
isI9Verified: false,
isSsnVerified: false,
ssnDateVerified: '',
ssnNotes: '',
visaType: '',
workAuthorization: '',
workUntil: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/companies/:companyId/employees',
headers: {'content-type': 'application/json'},
data: {
additionalDirectDeposit: [
{
accountNumber: '',
accountType: '',
amount: '',
amountType: '',
blockSpecial: false,
isSkipPreNote: false,
nameOnAccount: '',
preNoteDate: '',
routingNumber: ''
}
],
additionalRate: [
{
changeReason: '',
costCenter1: '',
costCenter2: '',
costCenter3: '',
effectiveDate: '',
endCheckDate: '',
job: '',
rate: '',
rateCode: '',
rateNotes: '',
ratePer: '',
shift: ''
}
],
benefitSetup: {
benefitClass: '',
benefitClassEffectiveDate: '',
benefitSalary: '',
benefitSalaryEffectiveDate: '',
doNotApplyAdministrativePeriod: false,
isMeasureAcaEligibility: false
},
birthDate: '',
coEmpCode: '',
companyFEIN: '',
companyName: '',
currency: '',
customBooleanFields: [{category: '', label: '', value: false}],
customDateFields: [{category: '', label: '', value: ''}],
customDropDownFields: [{category: '', label: '', value: ''}],
customNumberFields: [{category: '', label: '', value: ''}],
customTextFields: [{category: '', label: '', value: ''}],
departmentPosition: {
changeReason: '',
clockBadgeNumber: '',
costCenter1: '',
costCenter2: '',
costCenter3: '',
effectiveDate: '',
employeeType: '',
equalEmploymentOpportunityClass: '',
isMinimumWageExempt: false,
isOvertimeExempt: false,
isSupervisorReviewer: false,
isUnionDuesCollected: false,
isUnionInitiationCollected: false,
jobTitle: '',
payGroup: '',
positionCode: '',
reviewerCompanyNumber: '',
reviewerEmployeeId: '',
shift: '',
supervisorCompanyNumber: '',
supervisorEmployeeId: '',
tipped: '',
unionAffiliationDate: '',
unionCode: '',
unionPosition: '',
workersCompensation: ''
},
disabilityDescription: '',
emergencyContacts: [
{
address1: '',
address2: '',
city: '',
country: '',
county: '',
email: '',
firstName: '',
homePhone: '',
lastName: '',
mobilePhone: '',
notes: '',
pager: '',
primaryPhone: '',
priority: '',
relationship: '',
state: '',
syncEmployeeInfo: false,
workExtension: '',
workPhone: '',
zip: ''
}
],
employeeId: '',
ethnicity: '',
federalTax: {
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
taxCalculationCode: '',
w4FormYear: 0
},
firstName: '',
gender: '',
homeAddress: {
address1: '',
address2: '',
city: '',
country: '',
county: '',
emailAddress: '',
mobilePhone: '',
phone: '',
postalCode: '',
state: ''
},
isHighlyCompensated: false,
isSmoker: false,
lastName: '',
localTax: [
{
exemptions: '',
exemptions2: '',
filingStatus: '',
residentPSD: '',
taxCode: '',
workPSD: ''
}
],
mainDirectDeposit: {
accountNumber: '',
accountType: '',
blockSpecial: false,
isSkipPreNote: false,
nameOnAccount: '',
preNoteDate: '',
routingNumber: ''
},
maritalStatus: '',
middleName: '',
nonPrimaryStateTax: {
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
exemptions2: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
reciprocityCode: '',
specialCheckCalc: '',
taxCalculationCode: '',
taxCode: '',
w4FormYear: 0
},
ownerPercent: '',
preferredName: '',
primaryPayRate: {
annualSalary: '',
baseRate: '',
beginCheckDate: '',
changeReason: '',
defaultHours: '',
effectiveDate: '',
isAutoPay: false,
payFrequency: '',
payGrade: '',
payRateNote: '',
payType: '',
ratePer: '',
salary: ''
},
primaryStateTax: {
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
exemptions2: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
specialCheckCalc: '',
taxCalculationCode: '',
taxCode: '',
w4FormYear: 0
},
priorLastName: '',
salutation: '',
ssn: '',
status: {
adjustedSeniorityDate: '',
changeReason: '',
effectiveDate: '',
employeeStatus: '',
hireDate: '',
isEligibleForRehire: false,
reHireDate: '',
statusType: '',
terminationDate: ''
},
suffix: '',
taxSetup: {
fitwExemptNotes: '',
fitwExemptReason: '',
futaExemptNotes: '',
futaExemptReason: '',
isEmployee943: false,
isPension: false,
isStatutory: false,
medExemptNotes: '',
medExemptReason: '',
sitwExemptNotes: '',
sitwExemptReason: '',
ssExemptNotes: '',
ssExemptReason: '',
suiExemptNotes: '',
suiExemptReason: '',
suiState: '',
taxDistributionCode1099R: '',
taxForm: ''
},
veteranDescription: '',
webTime: {badgeNumber: '', chargeRate: '', isTimeLaborEnabled: false},
workAddress: {
address1: '',
address2: '',
city: '',
country: '',
county: '',
emailAddress: '',
location: '',
mailStop: '',
mobilePhone: '',
pager: '',
phone: '',
phoneExtension: '',
postalCode: '',
state: ''
},
workEligibility: {
alienOrAdmissionDocumentNumber: '',
attestedDate: '',
countryOfIssuance: '',
foreignPassportNumber: '',
i94AdmissionNumber: '',
i9DateVerified: '',
i9Notes: '',
isI9Verified: false,
isSsnVerified: false,
ssnDateVerified: '',
ssnNotes: '',
visaType: '',
workAuthorization: '',
workUntil: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/companies/:companyId/employees';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"additionalDirectDeposit":[{"accountNumber":"","accountType":"","amount":"","amountType":"","blockSpecial":false,"isSkipPreNote":false,"nameOnAccount":"","preNoteDate":"","routingNumber":""}],"additionalRate":[{"changeReason":"","costCenter1":"","costCenter2":"","costCenter3":"","effectiveDate":"","endCheckDate":"","job":"","rate":"","rateCode":"","rateNotes":"","ratePer":"","shift":""}],"benefitSetup":{"benefitClass":"","benefitClassEffectiveDate":"","benefitSalary":"","benefitSalaryEffectiveDate":"","doNotApplyAdministrativePeriod":false,"isMeasureAcaEligibility":false},"birthDate":"","coEmpCode":"","companyFEIN":"","companyName":"","currency":"","customBooleanFields":[{"category":"","label":"","value":false}],"customDateFields":[{"category":"","label":"","value":""}],"customDropDownFields":[{"category":"","label":"","value":""}],"customNumberFields":[{"category":"","label":"","value":""}],"customTextFields":[{"category":"","label":"","value":""}],"departmentPosition":{"changeReason":"","clockBadgeNumber":"","costCenter1":"","costCenter2":"","costCenter3":"","effectiveDate":"","employeeType":"","equalEmploymentOpportunityClass":"","isMinimumWageExempt":false,"isOvertimeExempt":false,"isSupervisorReviewer":false,"isUnionDuesCollected":false,"isUnionInitiationCollected":false,"jobTitle":"","payGroup":"","positionCode":"","reviewerCompanyNumber":"","reviewerEmployeeId":"","shift":"","supervisorCompanyNumber":"","supervisorEmployeeId":"","tipped":"","unionAffiliationDate":"","unionCode":"","unionPosition":"","workersCompensation":""},"disabilityDescription":"","emergencyContacts":[{"address1":"","address2":"","city":"","country":"","county":"","email":"","firstName":"","homePhone":"","lastName":"","mobilePhone":"","notes":"","pager":"","primaryPhone":"","priority":"","relationship":"","state":"","syncEmployeeInfo":false,"workExtension":"","workPhone":"","zip":""}],"employeeId":"","ethnicity":"","federalTax":{"amount":"","deductionsAmount":"","dependentsAmount":"","exemptions":"","filingStatus":"","higherRate":false,"otherIncomeAmount":"","percentage":"","taxCalculationCode":"","w4FormYear":0},"firstName":"","gender":"","homeAddress":{"address1":"","address2":"","city":"","country":"","county":"","emailAddress":"","mobilePhone":"","phone":"","postalCode":"","state":""},"isHighlyCompensated":false,"isSmoker":false,"lastName":"","localTax":[{"exemptions":"","exemptions2":"","filingStatus":"","residentPSD":"","taxCode":"","workPSD":""}],"mainDirectDeposit":{"accountNumber":"","accountType":"","blockSpecial":false,"isSkipPreNote":false,"nameOnAccount":"","preNoteDate":"","routingNumber":""},"maritalStatus":"","middleName":"","nonPrimaryStateTax":{"amount":"","deductionsAmount":"","dependentsAmount":"","exemptions":"","exemptions2":"","filingStatus":"","higherRate":false,"otherIncomeAmount":"","percentage":"","reciprocityCode":"","specialCheckCalc":"","taxCalculationCode":"","taxCode":"","w4FormYear":0},"ownerPercent":"","preferredName":"","primaryPayRate":{"annualSalary":"","baseRate":"","beginCheckDate":"","changeReason":"","defaultHours":"","effectiveDate":"","isAutoPay":false,"payFrequency":"","payGrade":"","payRateNote":"","payType":"","ratePer":"","salary":""},"primaryStateTax":{"amount":"","deductionsAmount":"","dependentsAmount":"","exemptions":"","exemptions2":"","filingStatus":"","higherRate":false,"otherIncomeAmount":"","percentage":"","specialCheckCalc":"","taxCalculationCode":"","taxCode":"","w4FormYear":0},"priorLastName":"","salutation":"","ssn":"","status":{"adjustedSeniorityDate":"","changeReason":"","effectiveDate":"","employeeStatus":"","hireDate":"","isEligibleForRehire":false,"reHireDate":"","statusType":"","terminationDate":""},"suffix":"","taxSetup":{"fitwExemptNotes":"","fitwExemptReason":"","futaExemptNotes":"","futaExemptReason":"","isEmployee943":false,"isPension":false,"isStatutory":false,"medExemptNotes":"","medExemptReason":"","sitwExemptNotes":"","sitwExemptReason":"","ssExemptNotes":"","ssExemptReason":"","suiExemptNotes":"","suiExemptReason":"","suiState":"","taxDistributionCode1099R":"","taxForm":""},"veteranDescription":"","webTime":{"badgeNumber":"","chargeRate":"","isTimeLaborEnabled":false},"workAddress":{"address1":"","address2":"","city":"","country":"","county":"","emailAddress":"","location":"","mailStop":"","mobilePhone":"","pager":"","phone":"","phoneExtension":"","postalCode":"","state":""},"workEligibility":{"alienOrAdmissionDocumentNumber":"","attestedDate":"","countryOfIssuance":"","foreignPassportNumber":"","i94AdmissionNumber":"","i9DateVerified":"","i9Notes":"","isI9Verified":false,"isSsnVerified":false,"ssnDateVerified":"","ssnNotes":"","visaType":"","workAuthorization":"","workUntil":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"additionalDirectDeposit": @[ @{ @"accountNumber": @"", @"accountType": @"", @"amount": @"", @"amountType": @"", @"blockSpecial": @NO, @"isSkipPreNote": @NO, @"nameOnAccount": @"", @"preNoteDate": @"", @"routingNumber": @"" } ],
@"additionalRate": @[ @{ @"changeReason": @"", @"costCenter1": @"", @"costCenter2": @"", @"costCenter3": @"", @"effectiveDate": @"", @"endCheckDate": @"", @"job": @"", @"rate": @"", @"rateCode": @"", @"rateNotes": @"", @"ratePer": @"", @"shift": @"" } ],
@"benefitSetup": @{ @"benefitClass": @"", @"benefitClassEffectiveDate": @"", @"benefitSalary": @"", @"benefitSalaryEffectiveDate": @"", @"doNotApplyAdministrativePeriod": @NO, @"isMeasureAcaEligibility": @NO },
@"birthDate": @"",
@"coEmpCode": @"",
@"companyFEIN": @"",
@"companyName": @"",
@"currency": @"",
@"customBooleanFields": @[ @{ @"category": @"", @"label": @"", @"value": @NO } ],
@"customDateFields": @[ @{ @"category": @"", @"label": @"", @"value": @"" } ],
@"customDropDownFields": @[ @{ @"category": @"", @"label": @"", @"value": @"" } ],
@"customNumberFields": @[ @{ @"category": @"", @"label": @"", @"value": @"" } ],
@"customTextFields": @[ @{ @"category": @"", @"label": @"", @"value": @"" } ],
@"departmentPosition": @{ @"changeReason": @"", @"clockBadgeNumber": @"", @"costCenter1": @"", @"costCenter2": @"", @"costCenter3": @"", @"effectiveDate": @"", @"employeeType": @"", @"equalEmploymentOpportunityClass": @"", @"isMinimumWageExempt": @NO, @"isOvertimeExempt": @NO, @"isSupervisorReviewer": @NO, @"isUnionDuesCollected": @NO, @"isUnionInitiationCollected": @NO, @"jobTitle": @"", @"payGroup": @"", @"positionCode": @"", @"reviewerCompanyNumber": @"", @"reviewerEmployeeId": @"", @"shift": @"", @"supervisorCompanyNumber": @"", @"supervisorEmployeeId": @"", @"tipped": @"", @"unionAffiliationDate": @"", @"unionCode": @"", @"unionPosition": @"", @"workersCompensation": @"" },
@"disabilityDescription": @"",
@"emergencyContacts": @[ @{ @"address1": @"", @"address2": @"", @"city": @"", @"country": @"", @"county": @"", @"email": @"", @"firstName": @"", @"homePhone": @"", @"lastName": @"", @"mobilePhone": @"", @"notes": @"", @"pager": @"", @"primaryPhone": @"", @"priority": @"", @"relationship": @"", @"state": @"", @"syncEmployeeInfo": @NO, @"workExtension": @"", @"workPhone": @"", @"zip": @"" } ],
@"employeeId": @"",
@"ethnicity": @"",
@"federalTax": @{ @"amount": @"", @"deductionsAmount": @"", @"dependentsAmount": @"", @"exemptions": @"", @"filingStatus": @"", @"higherRate": @NO, @"otherIncomeAmount": @"", @"percentage": @"", @"taxCalculationCode": @"", @"w4FormYear": @0 },
@"firstName": @"",
@"gender": @"",
@"homeAddress": @{ @"address1": @"", @"address2": @"", @"city": @"", @"country": @"", @"county": @"", @"emailAddress": @"", @"mobilePhone": @"", @"phone": @"", @"postalCode": @"", @"state": @"" },
@"isHighlyCompensated": @NO,
@"isSmoker": @NO,
@"lastName": @"",
@"localTax": @[ @{ @"exemptions": @"", @"exemptions2": @"", @"filingStatus": @"", @"residentPSD": @"", @"taxCode": @"", @"workPSD": @"" } ],
@"mainDirectDeposit": @{ @"accountNumber": @"", @"accountType": @"", @"blockSpecial": @NO, @"isSkipPreNote": @NO, @"nameOnAccount": @"", @"preNoteDate": @"", @"routingNumber": @"" },
@"maritalStatus": @"",
@"middleName": @"",
@"nonPrimaryStateTax": @{ @"amount": @"", @"deductionsAmount": @"", @"dependentsAmount": @"", @"exemptions": @"", @"exemptions2": @"", @"filingStatus": @"", @"higherRate": @NO, @"otherIncomeAmount": @"", @"percentage": @"", @"reciprocityCode": @"", @"specialCheckCalc": @"", @"taxCalculationCode": @"", @"taxCode": @"", @"w4FormYear": @0 },
@"ownerPercent": @"",
@"preferredName": @"",
@"primaryPayRate": @{ @"annualSalary": @"", @"baseRate": @"", @"beginCheckDate": @"", @"changeReason": @"", @"defaultHours": @"", @"effectiveDate": @"", @"isAutoPay": @NO, @"payFrequency": @"", @"payGrade": @"", @"payRateNote": @"", @"payType": @"", @"ratePer": @"", @"salary": @"" },
@"primaryStateTax": @{ @"amount": @"", @"deductionsAmount": @"", @"dependentsAmount": @"", @"exemptions": @"", @"exemptions2": @"", @"filingStatus": @"", @"higherRate": @NO, @"otherIncomeAmount": @"", @"percentage": @"", @"specialCheckCalc": @"", @"taxCalculationCode": @"", @"taxCode": @"", @"w4FormYear": @0 },
@"priorLastName": @"",
@"salutation": @"",
@"ssn": @"",
@"status": @{ @"adjustedSeniorityDate": @"", @"changeReason": @"", @"effectiveDate": @"", @"employeeStatus": @"", @"hireDate": @"", @"isEligibleForRehire": @NO, @"reHireDate": @"", @"statusType": @"", @"terminationDate": @"" },
@"suffix": @"",
@"taxSetup": @{ @"fitwExemptNotes": @"", @"fitwExemptReason": @"", @"futaExemptNotes": @"", @"futaExemptReason": @"", @"isEmployee943": @NO, @"isPension": @NO, @"isStatutory": @NO, @"medExemptNotes": @"", @"medExemptReason": @"", @"sitwExemptNotes": @"", @"sitwExemptReason": @"", @"ssExemptNotes": @"", @"ssExemptReason": @"", @"suiExemptNotes": @"", @"suiExemptReason": @"", @"suiState": @"", @"taxDistributionCode1099R": @"", @"taxForm": @"" },
@"veteranDescription": @"",
@"webTime": @{ @"badgeNumber": @"", @"chargeRate": @"", @"isTimeLaborEnabled": @NO },
@"workAddress": @{ @"address1": @"", @"address2": @"", @"city": @"", @"country": @"", @"county": @"", @"emailAddress": @"", @"location": @"", @"mailStop": @"", @"mobilePhone": @"", @"pager": @"", @"phone": @"", @"phoneExtension": @"", @"postalCode": @"", @"state": @"" },
@"workEligibility": @{ @"alienOrAdmissionDocumentNumber": @"", @"attestedDate": @"", @"countryOfIssuance": @"", @"foreignPassportNumber": @"", @"i94AdmissionNumber": @"", @"i9DateVerified": @"", @"i9Notes": @"", @"isI9Verified": @NO, @"isSsnVerified": @NO, @"ssnDateVerified": @"", @"ssnNotes": @"", @"visaType": @"", @"workAuthorization": @"", @"workUntil": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/companies/:companyId/employees"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/companies/:companyId/employees" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"additionalDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"amount\": \"\",\n \"amountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"additionalRate\": [\n {\n \"changeReason\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"endCheckDate\": \"\",\n \"job\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"rateNotes\": \"\",\n \"ratePer\": \"\",\n \"shift\": \"\"\n }\n ],\n \"benefitSetup\": {\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n },\n \"birthDate\": \"\",\n \"coEmpCode\": \"\",\n \"companyFEIN\": \"\",\n \"companyName\": \"\",\n \"currency\": \"\",\n \"customBooleanFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": false\n }\n ],\n \"customDateFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customDropDownFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customNumberFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customTextFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"departmentPosition\": {\n \"changeReason\": \"\",\n \"clockBadgeNumber\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"employeeType\": \"\",\n \"equalEmploymentOpportunityClass\": \"\",\n \"isMinimumWageExempt\": false,\n \"isOvertimeExempt\": false,\n \"isSupervisorReviewer\": false,\n \"isUnionDuesCollected\": false,\n \"isUnionInitiationCollected\": false,\n \"jobTitle\": \"\",\n \"payGroup\": \"\",\n \"positionCode\": \"\",\n \"reviewerCompanyNumber\": \"\",\n \"reviewerEmployeeId\": \"\",\n \"shift\": \"\",\n \"supervisorCompanyNumber\": \"\",\n \"supervisorEmployeeId\": \"\",\n \"tipped\": \"\",\n \"unionAffiliationDate\": \"\",\n \"unionCode\": \"\",\n \"unionPosition\": \"\",\n \"workersCompensation\": \"\"\n },\n \"disabilityDescription\": \"\",\n \"emergencyContacts\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"homePhone\": \"\",\n \"lastName\": \"\",\n \"mobilePhone\": \"\",\n \"notes\": \"\",\n \"pager\": \"\",\n \"primaryPhone\": \"\",\n \"priority\": \"\",\n \"relationship\": \"\",\n \"state\": \"\",\n \"syncEmployeeInfo\": false,\n \"workExtension\": \"\",\n \"workPhone\": \"\",\n \"zip\": \"\"\n }\n ],\n \"employeeId\": \"\",\n \"ethnicity\": \"\",\n \"federalTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"taxCalculationCode\": \"\",\n \"w4FormYear\": 0\n },\n \"firstName\": \"\",\n \"gender\": \"\",\n \"homeAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"isHighlyCompensated\": false,\n \"isSmoker\": false,\n \"lastName\": \"\",\n \"localTax\": [\n {\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n }\n ],\n \"mainDirectDeposit\": {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n },\n \"maritalStatus\": \"\",\n \"middleName\": \"\",\n \"nonPrimaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"ownerPercent\": \"\",\n \"preferredName\": \"\",\n \"primaryPayRate\": {\n \"annualSalary\": \"\",\n \"baseRate\": \"\",\n \"beginCheckDate\": \"\",\n \"changeReason\": \"\",\n \"defaultHours\": \"\",\n \"effectiveDate\": \"\",\n \"isAutoPay\": false,\n \"payFrequency\": \"\",\n \"payGrade\": \"\",\n \"payRateNote\": \"\",\n \"payType\": \"\",\n \"ratePer\": \"\",\n \"salary\": \"\"\n },\n \"primaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"priorLastName\": \"\",\n \"salutation\": \"\",\n \"ssn\": \"\",\n \"status\": {\n \"adjustedSeniorityDate\": \"\",\n \"changeReason\": \"\",\n \"effectiveDate\": \"\",\n \"employeeStatus\": \"\",\n \"hireDate\": \"\",\n \"isEligibleForRehire\": false,\n \"reHireDate\": \"\",\n \"statusType\": \"\",\n \"terminationDate\": \"\"\n },\n \"suffix\": \"\",\n \"taxSetup\": {\n \"fitwExemptNotes\": \"\",\n \"fitwExemptReason\": \"\",\n \"futaExemptNotes\": \"\",\n \"futaExemptReason\": \"\",\n \"isEmployee943\": false,\n \"isPension\": false,\n \"isStatutory\": false,\n \"medExemptNotes\": \"\",\n \"medExemptReason\": \"\",\n \"sitwExemptNotes\": \"\",\n \"sitwExemptReason\": \"\",\n \"ssExemptNotes\": \"\",\n \"ssExemptReason\": \"\",\n \"suiExemptNotes\": \"\",\n \"suiExemptReason\": \"\",\n \"suiState\": \"\",\n \"taxDistributionCode1099R\": \"\",\n \"taxForm\": \"\"\n },\n \"veteranDescription\": \"\",\n \"webTime\": {\n \"badgeNumber\": \"\",\n \"chargeRate\": \"\",\n \"isTimeLaborEnabled\": false\n },\n \"workAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"location\": \"\",\n \"mailStop\": \"\",\n \"mobilePhone\": \"\",\n \"pager\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"workEligibility\": {\n \"alienOrAdmissionDocumentNumber\": \"\",\n \"attestedDate\": \"\",\n \"countryOfIssuance\": \"\",\n \"foreignPassportNumber\": \"\",\n \"i94AdmissionNumber\": \"\",\n \"i9DateVerified\": \"\",\n \"i9Notes\": \"\",\n \"isI9Verified\": false,\n \"isSsnVerified\": false,\n \"ssnDateVerified\": \"\",\n \"ssnNotes\": \"\",\n \"visaType\": \"\",\n \"workAuthorization\": \"\",\n \"workUntil\": \"\"\n }\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/companies/:companyId/employees",
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([
'additionalDirectDeposit' => [
[
'accountNumber' => '',
'accountType' => '',
'amount' => '',
'amountType' => '',
'blockSpecial' => null,
'isSkipPreNote' => null,
'nameOnAccount' => '',
'preNoteDate' => '',
'routingNumber' => ''
]
],
'additionalRate' => [
[
'changeReason' => '',
'costCenter1' => '',
'costCenter2' => '',
'costCenter3' => '',
'effectiveDate' => '',
'endCheckDate' => '',
'job' => '',
'rate' => '',
'rateCode' => '',
'rateNotes' => '',
'ratePer' => '',
'shift' => ''
]
],
'benefitSetup' => [
'benefitClass' => '',
'benefitClassEffectiveDate' => '',
'benefitSalary' => '',
'benefitSalaryEffectiveDate' => '',
'doNotApplyAdministrativePeriod' => null,
'isMeasureAcaEligibility' => null
],
'birthDate' => '',
'coEmpCode' => '',
'companyFEIN' => '',
'companyName' => '',
'currency' => '',
'customBooleanFields' => [
[
'category' => '',
'label' => '',
'value' => null
]
],
'customDateFields' => [
[
'category' => '',
'label' => '',
'value' => ''
]
],
'customDropDownFields' => [
[
'category' => '',
'label' => '',
'value' => ''
]
],
'customNumberFields' => [
[
'category' => '',
'label' => '',
'value' => ''
]
],
'customTextFields' => [
[
'category' => '',
'label' => '',
'value' => ''
]
],
'departmentPosition' => [
'changeReason' => '',
'clockBadgeNumber' => '',
'costCenter1' => '',
'costCenter2' => '',
'costCenter3' => '',
'effectiveDate' => '',
'employeeType' => '',
'equalEmploymentOpportunityClass' => '',
'isMinimumWageExempt' => null,
'isOvertimeExempt' => null,
'isSupervisorReviewer' => null,
'isUnionDuesCollected' => null,
'isUnionInitiationCollected' => null,
'jobTitle' => '',
'payGroup' => '',
'positionCode' => '',
'reviewerCompanyNumber' => '',
'reviewerEmployeeId' => '',
'shift' => '',
'supervisorCompanyNumber' => '',
'supervisorEmployeeId' => '',
'tipped' => '',
'unionAffiliationDate' => '',
'unionCode' => '',
'unionPosition' => '',
'workersCompensation' => ''
],
'disabilityDescription' => '',
'emergencyContacts' => [
[
'address1' => '',
'address2' => '',
'city' => '',
'country' => '',
'county' => '',
'email' => '',
'firstName' => '',
'homePhone' => '',
'lastName' => '',
'mobilePhone' => '',
'notes' => '',
'pager' => '',
'primaryPhone' => '',
'priority' => '',
'relationship' => '',
'state' => '',
'syncEmployeeInfo' => null,
'workExtension' => '',
'workPhone' => '',
'zip' => ''
]
],
'employeeId' => '',
'ethnicity' => '',
'federalTax' => [
'amount' => '',
'deductionsAmount' => '',
'dependentsAmount' => '',
'exemptions' => '',
'filingStatus' => '',
'higherRate' => null,
'otherIncomeAmount' => '',
'percentage' => '',
'taxCalculationCode' => '',
'w4FormYear' => 0
],
'firstName' => '',
'gender' => '',
'homeAddress' => [
'address1' => '',
'address2' => '',
'city' => '',
'country' => '',
'county' => '',
'emailAddress' => '',
'mobilePhone' => '',
'phone' => '',
'postalCode' => '',
'state' => ''
],
'isHighlyCompensated' => null,
'isSmoker' => null,
'lastName' => '',
'localTax' => [
[
'exemptions' => '',
'exemptions2' => '',
'filingStatus' => '',
'residentPSD' => '',
'taxCode' => '',
'workPSD' => ''
]
],
'mainDirectDeposit' => [
'accountNumber' => '',
'accountType' => '',
'blockSpecial' => null,
'isSkipPreNote' => null,
'nameOnAccount' => '',
'preNoteDate' => '',
'routingNumber' => ''
],
'maritalStatus' => '',
'middleName' => '',
'nonPrimaryStateTax' => [
'amount' => '',
'deductionsAmount' => '',
'dependentsAmount' => '',
'exemptions' => '',
'exemptions2' => '',
'filingStatus' => '',
'higherRate' => null,
'otherIncomeAmount' => '',
'percentage' => '',
'reciprocityCode' => '',
'specialCheckCalc' => '',
'taxCalculationCode' => '',
'taxCode' => '',
'w4FormYear' => 0
],
'ownerPercent' => '',
'preferredName' => '',
'primaryPayRate' => [
'annualSalary' => '',
'baseRate' => '',
'beginCheckDate' => '',
'changeReason' => '',
'defaultHours' => '',
'effectiveDate' => '',
'isAutoPay' => null,
'payFrequency' => '',
'payGrade' => '',
'payRateNote' => '',
'payType' => '',
'ratePer' => '',
'salary' => ''
],
'primaryStateTax' => [
'amount' => '',
'deductionsAmount' => '',
'dependentsAmount' => '',
'exemptions' => '',
'exemptions2' => '',
'filingStatus' => '',
'higherRate' => null,
'otherIncomeAmount' => '',
'percentage' => '',
'specialCheckCalc' => '',
'taxCalculationCode' => '',
'taxCode' => '',
'w4FormYear' => 0
],
'priorLastName' => '',
'salutation' => '',
'ssn' => '',
'status' => [
'adjustedSeniorityDate' => '',
'changeReason' => '',
'effectiveDate' => '',
'employeeStatus' => '',
'hireDate' => '',
'isEligibleForRehire' => null,
'reHireDate' => '',
'statusType' => '',
'terminationDate' => ''
],
'suffix' => '',
'taxSetup' => [
'fitwExemptNotes' => '',
'fitwExemptReason' => '',
'futaExemptNotes' => '',
'futaExemptReason' => '',
'isEmployee943' => null,
'isPension' => null,
'isStatutory' => null,
'medExemptNotes' => '',
'medExemptReason' => '',
'sitwExemptNotes' => '',
'sitwExemptReason' => '',
'ssExemptNotes' => '',
'ssExemptReason' => '',
'suiExemptNotes' => '',
'suiExemptReason' => '',
'suiState' => '',
'taxDistributionCode1099R' => '',
'taxForm' => ''
],
'veteranDescription' => '',
'webTime' => [
'badgeNumber' => '',
'chargeRate' => '',
'isTimeLaborEnabled' => null
],
'workAddress' => [
'address1' => '',
'address2' => '',
'city' => '',
'country' => '',
'county' => '',
'emailAddress' => '',
'location' => '',
'mailStop' => '',
'mobilePhone' => '',
'pager' => '',
'phone' => '',
'phoneExtension' => '',
'postalCode' => '',
'state' => ''
],
'workEligibility' => [
'alienOrAdmissionDocumentNumber' => '',
'attestedDate' => '',
'countryOfIssuance' => '',
'foreignPassportNumber' => '',
'i94AdmissionNumber' => '',
'i9DateVerified' => '',
'i9Notes' => '',
'isI9Verified' => null,
'isSsnVerified' => null,
'ssnDateVerified' => '',
'ssnNotes' => '',
'visaType' => '',
'workAuthorization' => '',
'workUntil' => ''
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v2/companies/:companyId/employees', [
'body' => '{
"additionalDirectDeposit": [
{
"accountNumber": "",
"accountType": "",
"amount": "",
"amountType": "",
"blockSpecial": false,
"isSkipPreNote": false,
"nameOnAccount": "",
"preNoteDate": "",
"routingNumber": ""
}
],
"additionalRate": [
{
"changeReason": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"endCheckDate": "",
"job": "",
"rate": "",
"rateCode": "",
"rateNotes": "",
"ratePer": "",
"shift": ""
}
],
"benefitSetup": {
"benefitClass": "",
"benefitClassEffectiveDate": "",
"benefitSalary": "",
"benefitSalaryEffectiveDate": "",
"doNotApplyAdministrativePeriod": false,
"isMeasureAcaEligibility": false
},
"birthDate": "",
"coEmpCode": "",
"companyFEIN": "",
"companyName": "",
"currency": "",
"customBooleanFields": [
{
"category": "",
"label": "",
"value": false
}
],
"customDateFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customDropDownFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customNumberFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customTextFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"departmentPosition": {
"changeReason": "",
"clockBadgeNumber": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"employeeType": "",
"equalEmploymentOpportunityClass": "",
"isMinimumWageExempt": false,
"isOvertimeExempt": false,
"isSupervisorReviewer": false,
"isUnionDuesCollected": false,
"isUnionInitiationCollected": false,
"jobTitle": "",
"payGroup": "",
"positionCode": "",
"reviewerCompanyNumber": "",
"reviewerEmployeeId": "",
"shift": "",
"supervisorCompanyNumber": "",
"supervisorEmployeeId": "",
"tipped": "",
"unionAffiliationDate": "",
"unionCode": "",
"unionPosition": "",
"workersCompensation": ""
},
"disabilityDescription": "",
"emergencyContacts": [
{
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"email": "",
"firstName": "",
"homePhone": "",
"lastName": "",
"mobilePhone": "",
"notes": "",
"pager": "",
"primaryPhone": "",
"priority": "",
"relationship": "",
"state": "",
"syncEmployeeInfo": false,
"workExtension": "",
"workPhone": "",
"zip": ""
}
],
"employeeId": "",
"ethnicity": "",
"federalTax": {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"taxCalculationCode": "",
"w4FormYear": 0
},
"firstName": "",
"gender": "",
"homeAddress": {
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"mobilePhone": "",
"phone": "",
"postalCode": "",
"state": ""
},
"isHighlyCompensated": false,
"isSmoker": false,
"lastName": "",
"localTax": [
{
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"residentPSD": "",
"taxCode": "",
"workPSD": ""
}
],
"mainDirectDeposit": {
"accountNumber": "",
"accountType": "",
"blockSpecial": false,
"isSkipPreNote": false,
"nameOnAccount": "",
"preNoteDate": "",
"routingNumber": ""
},
"maritalStatus": "",
"middleName": "",
"nonPrimaryStateTax": {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"reciprocityCode": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
},
"ownerPercent": "",
"preferredName": "",
"primaryPayRate": {
"annualSalary": "",
"baseRate": "",
"beginCheckDate": "",
"changeReason": "",
"defaultHours": "",
"effectiveDate": "",
"isAutoPay": false,
"payFrequency": "",
"payGrade": "",
"payRateNote": "",
"payType": "",
"ratePer": "",
"salary": ""
},
"primaryStateTax": {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
},
"priorLastName": "",
"salutation": "",
"ssn": "",
"status": {
"adjustedSeniorityDate": "",
"changeReason": "",
"effectiveDate": "",
"employeeStatus": "",
"hireDate": "",
"isEligibleForRehire": false,
"reHireDate": "",
"statusType": "",
"terminationDate": ""
},
"suffix": "",
"taxSetup": {
"fitwExemptNotes": "",
"fitwExemptReason": "",
"futaExemptNotes": "",
"futaExemptReason": "",
"isEmployee943": false,
"isPension": false,
"isStatutory": false,
"medExemptNotes": "",
"medExemptReason": "",
"sitwExemptNotes": "",
"sitwExemptReason": "",
"ssExemptNotes": "",
"ssExemptReason": "",
"suiExemptNotes": "",
"suiExemptReason": "",
"suiState": "",
"taxDistributionCode1099R": "",
"taxForm": ""
},
"veteranDescription": "",
"webTime": {
"badgeNumber": "",
"chargeRate": "",
"isTimeLaborEnabled": false
},
"workAddress": {
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"location": "",
"mailStop": "",
"mobilePhone": "",
"pager": "",
"phone": "",
"phoneExtension": "",
"postalCode": "",
"state": ""
},
"workEligibility": {
"alienOrAdmissionDocumentNumber": "",
"attestedDate": "",
"countryOfIssuance": "",
"foreignPassportNumber": "",
"i94AdmissionNumber": "",
"i9DateVerified": "",
"i9Notes": "",
"isI9Verified": false,
"isSsnVerified": false,
"ssnDateVerified": "",
"ssnNotes": "",
"visaType": "",
"workAuthorization": "",
"workUntil": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/companies/:companyId/employees');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'additionalDirectDeposit' => [
[
'accountNumber' => '',
'accountType' => '',
'amount' => '',
'amountType' => '',
'blockSpecial' => null,
'isSkipPreNote' => null,
'nameOnAccount' => '',
'preNoteDate' => '',
'routingNumber' => ''
]
],
'additionalRate' => [
[
'changeReason' => '',
'costCenter1' => '',
'costCenter2' => '',
'costCenter3' => '',
'effectiveDate' => '',
'endCheckDate' => '',
'job' => '',
'rate' => '',
'rateCode' => '',
'rateNotes' => '',
'ratePer' => '',
'shift' => ''
]
],
'benefitSetup' => [
'benefitClass' => '',
'benefitClassEffectiveDate' => '',
'benefitSalary' => '',
'benefitSalaryEffectiveDate' => '',
'doNotApplyAdministrativePeriod' => null,
'isMeasureAcaEligibility' => null
],
'birthDate' => '',
'coEmpCode' => '',
'companyFEIN' => '',
'companyName' => '',
'currency' => '',
'customBooleanFields' => [
[
'category' => '',
'label' => '',
'value' => null
]
],
'customDateFields' => [
[
'category' => '',
'label' => '',
'value' => ''
]
],
'customDropDownFields' => [
[
'category' => '',
'label' => '',
'value' => ''
]
],
'customNumberFields' => [
[
'category' => '',
'label' => '',
'value' => ''
]
],
'customTextFields' => [
[
'category' => '',
'label' => '',
'value' => ''
]
],
'departmentPosition' => [
'changeReason' => '',
'clockBadgeNumber' => '',
'costCenter1' => '',
'costCenter2' => '',
'costCenter3' => '',
'effectiveDate' => '',
'employeeType' => '',
'equalEmploymentOpportunityClass' => '',
'isMinimumWageExempt' => null,
'isOvertimeExempt' => null,
'isSupervisorReviewer' => null,
'isUnionDuesCollected' => null,
'isUnionInitiationCollected' => null,
'jobTitle' => '',
'payGroup' => '',
'positionCode' => '',
'reviewerCompanyNumber' => '',
'reviewerEmployeeId' => '',
'shift' => '',
'supervisorCompanyNumber' => '',
'supervisorEmployeeId' => '',
'tipped' => '',
'unionAffiliationDate' => '',
'unionCode' => '',
'unionPosition' => '',
'workersCompensation' => ''
],
'disabilityDescription' => '',
'emergencyContacts' => [
[
'address1' => '',
'address2' => '',
'city' => '',
'country' => '',
'county' => '',
'email' => '',
'firstName' => '',
'homePhone' => '',
'lastName' => '',
'mobilePhone' => '',
'notes' => '',
'pager' => '',
'primaryPhone' => '',
'priority' => '',
'relationship' => '',
'state' => '',
'syncEmployeeInfo' => null,
'workExtension' => '',
'workPhone' => '',
'zip' => ''
]
],
'employeeId' => '',
'ethnicity' => '',
'federalTax' => [
'amount' => '',
'deductionsAmount' => '',
'dependentsAmount' => '',
'exemptions' => '',
'filingStatus' => '',
'higherRate' => null,
'otherIncomeAmount' => '',
'percentage' => '',
'taxCalculationCode' => '',
'w4FormYear' => 0
],
'firstName' => '',
'gender' => '',
'homeAddress' => [
'address1' => '',
'address2' => '',
'city' => '',
'country' => '',
'county' => '',
'emailAddress' => '',
'mobilePhone' => '',
'phone' => '',
'postalCode' => '',
'state' => ''
],
'isHighlyCompensated' => null,
'isSmoker' => null,
'lastName' => '',
'localTax' => [
[
'exemptions' => '',
'exemptions2' => '',
'filingStatus' => '',
'residentPSD' => '',
'taxCode' => '',
'workPSD' => ''
]
],
'mainDirectDeposit' => [
'accountNumber' => '',
'accountType' => '',
'blockSpecial' => null,
'isSkipPreNote' => null,
'nameOnAccount' => '',
'preNoteDate' => '',
'routingNumber' => ''
],
'maritalStatus' => '',
'middleName' => '',
'nonPrimaryStateTax' => [
'amount' => '',
'deductionsAmount' => '',
'dependentsAmount' => '',
'exemptions' => '',
'exemptions2' => '',
'filingStatus' => '',
'higherRate' => null,
'otherIncomeAmount' => '',
'percentage' => '',
'reciprocityCode' => '',
'specialCheckCalc' => '',
'taxCalculationCode' => '',
'taxCode' => '',
'w4FormYear' => 0
],
'ownerPercent' => '',
'preferredName' => '',
'primaryPayRate' => [
'annualSalary' => '',
'baseRate' => '',
'beginCheckDate' => '',
'changeReason' => '',
'defaultHours' => '',
'effectiveDate' => '',
'isAutoPay' => null,
'payFrequency' => '',
'payGrade' => '',
'payRateNote' => '',
'payType' => '',
'ratePer' => '',
'salary' => ''
],
'primaryStateTax' => [
'amount' => '',
'deductionsAmount' => '',
'dependentsAmount' => '',
'exemptions' => '',
'exemptions2' => '',
'filingStatus' => '',
'higherRate' => null,
'otherIncomeAmount' => '',
'percentage' => '',
'specialCheckCalc' => '',
'taxCalculationCode' => '',
'taxCode' => '',
'w4FormYear' => 0
],
'priorLastName' => '',
'salutation' => '',
'ssn' => '',
'status' => [
'adjustedSeniorityDate' => '',
'changeReason' => '',
'effectiveDate' => '',
'employeeStatus' => '',
'hireDate' => '',
'isEligibleForRehire' => null,
'reHireDate' => '',
'statusType' => '',
'terminationDate' => ''
],
'suffix' => '',
'taxSetup' => [
'fitwExemptNotes' => '',
'fitwExemptReason' => '',
'futaExemptNotes' => '',
'futaExemptReason' => '',
'isEmployee943' => null,
'isPension' => null,
'isStatutory' => null,
'medExemptNotes' => '',
'medExemptReason' => '',
'sitwExemptNotes' => '',
'sitwExemptReason' => '',
'ssExemptNotes' => '',
'ssExemptReason' => '',
'suiExemptNotes' => '',
'suiExemptReason' => '',
'suiState' => '',
'taxDistributionCode1099R' => '',
'taxForm' => ''
],
'veteranDescription' => '',
'webTime' => [
'badgeNumber' => '',
'chargeRate' => '',
'isTimeLaborEnabled' => null
],
'workAddress' => [
'address1' => '',
'address2' => '',
'city' => '',
'country' => '',
'county' => '',
'emailAddress' => '',
'location' => '',
'mailStop' => '',
'mobilePhone' => '',
'pager' => '',
'phone' => '',
'phoneExtension' => '',
'postalCode' => '',
'state' => ''
],
'workEligibility' => [
'alienOrAdmissionDocumentNumber' => '',
'attestedDate' => '',
'countryOfIssuance' => '',
'foreignPassportNumber' => '',
'i94AdmissionNumber' => '',
'i9DateVerified' => '',
'i9Notes' => '',
'isI9Verified' => null,
'isSsnVerified' => null,
'ssnDateVerified' => '',
'ssnNotes' => '',
'visaType' => '',
'workAuthorization' => '',
'workUntil' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'additionalDirectDeposit' => [
[
'accountNumber' => '',
'accountType' => '',
'amount' => '',
'amountType' => '',
'blockSpecial' => null,
'isSkipPreNote' => null,
'nameOnAccount' => '',
'preNoteDate' => '',
'routingNumber' => ''
]
],
'additionalRate' => [
[
'changeReason' => '',
'costCenter1' => '',
'costCenter2' => '',
'costCenter3' => '',
'effectiveDate' => '',
'endCheckDate' => '',
'job' => '',
'rate' => '',
'rateCode' => '',
'rateNotes' => '',
'ratePer' => '',
'shift' => ''
]
],
'benefitSetup' => [
'benefitClass' => '',
'benefitClassEffectiveDate' => '',
'benefitSalary' => '',
'benefitSalaryEffectiveDate' => '',
'doNotApplyAdministrativePeriod' => null,
'isMeasureAcaEligibility' => null
],
'birthDate' => '',
'coEmpCode' => '',
'companyFEIN' => '',
'companyName' => '',
'currency' => '',
'customBooleanFields' => [
[
'category' => '',
'label' => '',
'value' => null
]
],
'customDateFields' => [
[
'category' => '',
'label' => '',
'value' => ''
]
],
'customDropDownFields' => [
[
'category' => '',
'label' => '',
'value' => ''
]
],
'customNumberFields' => [
[
'category' => '',
'label' => '',
'value' => ''
]
],
'customTextFields' => [
[
'category' => '',
'label' => '',
'value' => ''
]
],
'departmentPosition' => [
'changeReason' => '',
'clockBadgeNumber' => '',
'costCenter1' => '',
'costCenter2' => '',
'costCenter3' => '',
'effectiveDate' => '',
'employeeType' => '',
'equalEmploymentOpportunityClass' => '',
'isMinimumWageExempt' => null,
'isOvertimeExempt' => null,
'isSupervisorReviewer' => null,
'isUnionDuesCollected' => null,
'isUnionInitiationCollected' => null,
'jobTitle' => '',
'payGroup' => '',
'positionCode' => '',
'reviewerCompanyNumber' => '',
'reviewerEmployeeId' => '',
'shift' => '',
'supervisorCompanyNumber' => '',
'supervisorEmployeeId' => '',
'tipped' => '',
'unionAffiliationDate' => '',
'unionCode' => '',
'unionPosition' => '',
'workersCompensation' => ''
],
'disabilityDescription' => '',
'emergencyContacts' => [
[
'address1' => '',
'address2' => '',
'city' => '',
'country' => '',
'county' => '',
'email' => '',
'firstName' => '',
'homePhone' => '',
'lastName' => '',
'mobilePhone' => '',
'notes' => '',
'pager' => '',
'primaryPhone' => '',
'priority' => '',
'relationship' => '',
'state' => '',
'syncEmployeeInfo' => null,
'workExtension' => '',
'workPhone' => '',
'zip' => ''
]
],
'employeeId' => '',
'ethnicity' => '',
'federalTax' => [
'amount' => '',
'deductionsAmount' => '',
'dependentsAmount' => '',
'exemptions' => '',
'filingStatus' => '',
'higherRate' => null,
'otherIncomeAmount' => '',
'percentage' => '',
'taxCalculationCode' => '',
'w4FormYear' => 0
],
'firstName' => '',
'gender' => '',
'homeAddress' => [
'address1' => '',
'address2' => '',
'city' => '',
'country' => '',
'county' => '',
'emailAddress' => '',
'mobilePhone' => '',
'phone' => '',
'postalCode' => '',
'state' => ''
],
'isHighlyCompensated' => null,
'isSmoker' => null,
'lastName' => '',
'localTax' => [
[
'exemptions' => '',
'exemptions2' => '',
'filingStatus' => '',
'residentPSD' => '',
'taxCode' => '',
'workPSD' => ''
]
],
'mainDirectDeposit' => [
'accountNumber' => '',
'accountType' => '',
'blockSpecial' => null,
'isSkipPreNote' => null,
'nameOnAccount' => '',
'preNoteDate' => '',
'routingNumber' => ''
],
'maritalStatus' => '',
'middleName' => '',
'nonPrimaryStateTax' => [
'amount' => '',
'deductionsAmount' => '',
'dependentsAmount' => '',
'exemptions' => '',
'exemptions2' => '',
'filingStatus' => '',
'higherRate' => null,
'otherIncomeAmount' => '',
'percentage' => '',
'reciprocityCode' => '',
'specialCheckCalc' => '',
'taxCalculationCode' => '',
'taxCode' => '',
'w4FormYear' => 0
],
'ownerPercent' => '',
'preferredName' => '',
'primaryPayRate' => [
'annualSalary' => '',
'baseRate' => '',
'beginCheckDate' => '',
'changeReason' => '',
'defaultHours' => '',
'effectiveDate' => '',
'isAutoPay' => null,
'payFrequency' => '',
'payGrade' => '',
'payRateNote' => '',
'payType' => '',
'ratePer' => '',
'salary' => ''
],
'primaryStateTax' => [
'amount' => '',
'deductionsAmount' => '',
'dependentsAmount' => '',
'exemptions' => '',
'exemptions2' => '',
'filingStatus' => '',
'higherRate' => null,
'otherIncomeAmount' => '',
'percentage' => '',
'specialCheckCalc' => '',
'taxCalculationCode' => '',
'taxCode' => '',
'w4FormYear' => 0
],
'priorLastName' => '',
'salutation' => '',
'ssn' => '',
'status' => [
'adjustedSeniorityDate' => '',
'changeReason' => '',
'effectiveDate' => '',
'employeeStatus' => '',
'hireDate' => '',
'isEligibleForRehire' => null,
'reHireDate' => '',
'statusType' => '',
'terminationDate' => ''
],
'suffix' => '',
'taxSetup' => [
'fitwExemptNotes' => '',
'fitwExemptReason' => '',
'futaExemptNotes' => '',
'futaExemptReason' => '',
'isEmployee943' => null,
'isPension' => null,
'isStatutory' => null,
'medExemptNotes' => '',
'medExemptReason' => '',
'sitwExemptNotes' => '',
'sitwExemptReason' => '',
'ssExemptNotes' => '',
'ssExemptReason' => '',
'suiExemptNotes' => '',
'suiExemptReason' => '',
'suiState' => '',
'taxDistributionCode1099R' => '',
'taxForm' => ''
],
'veteranDescription' => '',
'webTime' => [
'badgeNumber' => '',
'chargeRate' => '',
'isTimeLaborEnabled' => null
],
'workAddress' => [
'address1' => '',
'address2' => '',
'city' => '',
'country' => '',
'county' => '',
'emailAddress' => '',
'location' => '',
'mailStop' => '',
'mobilePhone' => '',
'pager' => '',
'phone' => '',
'phoneExtension' => '',
'postalCode' => '',
'state' => ''
],
'workEligibility' => [
'alienOrAdmissionDocumentNumber' => '',
'attestedDate' => '',
'countryOfIssuance' => '',
'foreignPassportNumber' => '',
'i94AdmissionNumber' => '',
'i9DateVerified' => '',
'i9Notes' => '',
'isI9Verified' => null,
'isSsnVerified' => null,
'ssnDateVerified' => '',
'ssnNotes' => '',
'visaType' => '',
'workAuthorization' => '',
'workUntil' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/v2/companies/:companyId/employees');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/companies/:companyId/employees' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"additionalDirectDeposit": [
{
"accountNumber": "",
"accountType": "",
"amount": "",
"amountType": "",
"blockSpecial": false,
"isSkipPreNote": false,
"nameOnAccount": "",
"preNoteDate": "",
"routingNumber": ""
}
],
"additionalRate": [
{
"changeReason": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"endCheckDate": "",
"job": "",
"rate": "",
"rateCode": "",
"rateNotes": "",
"ratePer": "",
"shift": ""
}
],
"benefitSetup": {
"benefitClass": "",
"benefitClassEffectiveDate": "",
"benefitSalary": "",
"benefitSalaryEffectiveDate": "",
"doNotApplyAdministrativePeriod": false,
"isMeasureAcaEligibility": false
},
"birthDate": "",
"coEmpCode": "",
"companyFEIN": "",
"companyName": "",
"currency": "",
"customBooleanFields": [
{
"category": "",
"label": "",
"value": false
}
],
"customDateFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customDropDownFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customNumberFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customTextFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"departmentPosition": {
"changeReason": "",
"clockBadgeNumber": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"employeeType": "",
"equalEmploymentOpportunityClass": "",
"isMinimumWageExempt": false,
"isOvertimeExempt": false,
"isSupervisorReviewer": false,
"isUnionDuesCollected": false,
"isUnionInitiationCollected": false,
"jobTitle": "",
"payGroup": "",
"positionCode": "",
"reviewerCompanyNumber": "",
"reviewerEmployeeId": "",
"shift": "",
"supervisorCompanyNumber": "",
"supervisorEmployeeId": "",
"tipped": "",
"unionAffiliationDate": "",
"unionCode": "",
"unionPosition": "",
"workersCompensation": ""
},
"disabilityDescription": "",
"emergencyContacts": [
{
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"email": "",
"firstName": "",
"homePhone": "",
"lastName": "",
"mobilePhone": "",
"notes": "",
"pager": "",
"primaryPhone": "",
"priority": "",
"relationship": "",
"state": "",
"syncEmployeeInfo": false,
"workExtension": "",
"workPhone": "",
"zip": ""
}
],
"employeeId": "",
"ethnicity": "",
"federalTax": {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"taxCalculationCode": "",
"w4FormYear": 0
},
"firstName": "",
"gender": "",
"homeAddress": {
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"mobilePhone": "",
"phone": "",
"postalCode": "",
"state": ""
},
"isHighlyCompensated": false,
"isSmoker": false,
"lastName": "",
"localTax": [
{
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"residentPSD": "",
"taxCode": "",
"workPSD": ""
}
],
"mainDirectDeposit": {
"accountNumber": "",
"accountType": "",
"blockSpecial": false,
"isSkipPreNote": false,
"nameOnAccount": "",
"preNoteDate": "",
"routingNumber": ""
},
"maritalStatus": "",
"middleName": "",
"nonPrimaryStateTax": {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"reciprocityCode": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
},
"ownerPercent": "",
"preferredName": "",
"primaryPayRate": {
"annualSalary": "",
"baseRate": "",
"beginCheckDate": "",
"changeReason": "",
"defaultHours": "",
"effectiveDate": "",
"isAutoPay": false,
"payFrequency": "",
"payGrade": "",
"payRateNote": "",
"payType": "",
"ratePer": "",
"salary": ""
},
"primaryStateTax": {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
},
"priorLastName": "",
"salutation": "",
"ssn": "",
"status": {
"adjustedSeniorityDate": "",
"changeReason": "",
"effectiveDate": "",
"employeeStatus": "",
"hireDate": "",
"isEligibleForRehire": false,
"reHireDate": "",
"statusType": "",
"terminationDate": ""
},
"suffix": "",
"taxSetup": {
"fitwExemptNotes": "",
"fitwExemptReason": "",
"futaExemptNotes": "",
"futaExemptReason": "",
"isEmployee943": false,
"isPension": false,
"isStatutory": false,
"medExemptNotes": "",
"medExemptReason": "",
"sitwExemptNotes": "",
"sitwExemptReason": "",
"ssExemptNotes": "",
"ssExemptReason": "",
"suiExemptNotes": "",
"suiExemptReason": "",
"suiState": "",
"taxDistributionCode1099R": "",
"taxForm": ""
},
"veteranDescription": "",
"webTime": {
"badgeNumber": "",
"chargeRate": "",
"isTimeLaborEnabled": false
},
"workAddress": {
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"location": "",
"mailStop": "",
"mobilePhone": "",
"pager": "",
"phone": "",
"phoneExtension": "",
"postalCode": "",
"state": ""
},
"workEligibility": {
"alienOrAdmissionDocumentNumber": "",
"attestedDate": "",
"countryOfIssuance": "",
"foreignPassportNumber": "",
"i94AdmissionNumber": "",
"i9DateVerified": "",
"i9Notes": "",
"isI9Verified": false,
"isSsnVerified": false,
"ssnDateVerified": "",
"ssnNotes": "",
"visaType": "",
"workAuthorization": "",
"workUntil": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/companies/:companyId/employees' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"additionalDirectDeposit": [
{
"accountNumber": "",
"accountType": "",
"amount": "",
"amountType": "",
"blockSpecial": false,
"isSkipPreNote": false,
"nameOnAccount": "",
"preNoteDate": "",
"routingNumber": ""
}
],
"additionalRate": [
{
"changeReason": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"endCheckDate": "",
"job": "",
"rate": "",
"rateCode": "",
"rateNotes": "",
"ratePer": "",
"shift": ""
}
],
"benefitSetup": {
"benefitClass": "",
"benefitClassEffectiveDate": "",
"benefitSalary": "",
"benefitSalaryEffectiveDate": "",
"doNotApplyAdministrativePeriod": false,
"isMeasureAcaEligibility": false
},
"birthDate": "",
"coEmpCode": "",
"companyFEIN": "",
"companyName": "",
"currency": "",
"customBooleanFields": [
{
"category": "",
"label": "",
"value": false
}
],
"customDateFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customDropDownFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customNumberFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customTextFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"departmentPosition": {
"changeReason": "",
"clockBadgeNumber": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"employeeType": "",
"equalEmploymentOpportunityClass": "",
"isMinimumWageExempt": false,
"isOvertimeExempt": false,
"isSupervisorReviewer": false,
"isUnionDuesCollected": false,
"isUnionInitiationCollected": false,
"jobTitle": "",
"payGroup": "",
"positionCode": "",
"reviewerCompanyNumber": "",
"reviewerEmployeeId": "",
"shift": "",
"supervisorCompanyNumber": "",
"supervisorEmployeeId": "",
"tipped": "",
"unionAffiliationDate": "",
"unionCode": "",
"unionPosition": "",
"workersCompensation": ""
},
"disabilityDescription": "",
"emergencyContacts": [
{
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"email": "",
"firstName": "",
"homePhone": "",
"lastName": "",
"mobilePhone": "",
"notes": "",
"pager": "",
"primaryPhone": "",
"priority": "",
"relationship": "",
"state": "",
"syncEmployeeInfo": false,
"workExtension": "",
"workPhone": "",
"zip": ""
}
],
"employeeId": "",
"ethnicity": "",
"federalTax": {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"taxCalculationCode": "",
"w4FormYear": 0
},
"firstName": "",
"gender": "",
"homeAddress": {
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"mobilePhone": "",
"phone": "",
"postalCode": "",
"state": ""
},
"isHighlyCompensated": false,
"isSmoker": false,
"lastName": "",
"localTax": [
{
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"residentPSD": "",
"taxCode": "",
"workPSD": ""
}
],
"mainDirectDeposit": {
"accountNumber": "",
"accountType": "",
"blockSpecial": false,
"isSkipPreNote": false,
"nameOnAccount": "",
"preNoteDate": "",
"routingNumber": ""
},
"maritalStatus": "",
"middleName": "",
"nonPrimaryStateTax": {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"reciprocityCode": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
},
"ownerPercent": "",
"preferredName": "",
"primaryPayRate": {
"annualSalary": "",
"baseRate": "",
"beginCheckDate": "",
"changeReason": "",
"defaultHours": "",
"effectiveDate": "",
"isAutoPay": false,
"payFrequency": "",
"payGrade": "",
"payRateNote": "",
"payType": "",
"ratePer": "",
"salary": ""
},
"primaryStateTax": {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
},
"priorLastName": "",
"salutation": "",
"ssn": "",
"status": {
"adjustedSeniorityDate": "",
"changeReason": "",
"effectiveDate": "",
"employeeStatus": "",
"hireDate": "",
"isEligibleForRehire": false,
"reHireDate": "",
"statusType": "",
"terminationDate": ""
},
"suffix": "",
"taxSetup": {
"fitwExemptNotes": "",
"fitwExemptReason": "",
"futaExemptNotes": "",
"futaExemptReason": "",
"isEmployee943": false,
"isPension": false,
"isStatutory": false,
"medExemptNotes": "",
"medExemptReason": "",
"sitwExemptNotes": "",
"sitwExemptReason": "",
"ssExemptNotes": "",
"ssExemptReason": "",
"suiExemptNotes": "",
"suiExemptReason": "",
"suiState": "",
"taxDistributionCode1099R": "",
"taxForm": ""
},
"veteranDescription": "",
"webTime": {
"badgeNumber": "",
"chargeRate": "",
"isTimeLaborEnabled": false
},
"workAddress": {
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"location": "",
"mailStop": "",
"mobilePhone": "",
"pager": "",
"phone": "",
"phoneExtension": "",
"postalCode": "",
"state": ""
},
"workEligibility": {
"alienOrAdmissionDocumentNumber": "",
"attestedDate": "",
"countryOfIssuance": "",
"foreignPassportNumber": "",
"i94AdmissionNumber": "",
"i9DateVerified": "",
"i9Notes": "",
"isI9Verified": false,
"isSsnVerified": false,
"ssnDateVerified": "",
"ssnNotes": "",
"visaType": "",
"workAuthorization": "",
"workUntil": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"additionalDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"amount\": \"\",\n \"amountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"additionalRate\": [\n {\n \"changeReason\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"endCheckDate\": \"\",\n \"job\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"rateNotes\": \"\",\n \"ratePer\": \"\",\n \"shift\": \"\"\n }\n ],\n \"benefitSetup\": {\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n },\n \"birthDate\": \"\",\n \"coEmpCode\": \"\",\n \"companyFEIN\": \"\",\n \"companyName\": \"\",\n \"currency\": \"\",\n \"customBooleanFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": false\n }\n ],\n \"customDateFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customDropDownFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customNumberFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customTextFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"departmentPosition\": {\n \"changeReason\": \"\",\n \"clockBadgeNumber\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"employeeType\": \"\",\n \"equalEmploymentOpportunityClass\": \"\",\n \"isMinimumWageExempt\": false,\n \"isOvertimeExempt\": false,\n \"isSupervisorReviewer\": false,\n \"isUnionDuesCollected\": false,\n \"isUnionInitiationCollected\": false,\n \"jobTitle\": \"\",\n \"payGroup\": \"\",\n \"positionCode\": \"\",\n \"reviewerCompanyNumber\": \"\",\n \"reviewerEmployeeId\": \"\",\n \"shift\": \"\",\n \"supervisorCompanyNumber\": \"\",\n \"supervisorEmployeeId\": \"\",\n \"tipped\": \"\",\n \"unionAffiliationDate\": \"\",\n \"unionCode\": \"\",\n \"unionPosition\": \"\",\n \"workersCompensation\": \"\"\n },\n \"disabilityDescription\": \"\",\n \"emergencyContacts\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"homePhone\": \"\",\n \"lastName\": \"\",\n \"mobilePhone\": \"\",\n \"notes\": \"\",\n \"pager\": \"\",\n \"primaryPhone\": \"\",\n \"priority\": \"\",\n \"relationship\": \"\",\n \"state\": \"\",\n \"syncEmployeeInfo\": false,\n \"workExtension\": \"\",\n \"workPhone\": \"\",\n \"zip\": \"\"\n }\n ],\n \"employeeId\": \"\",\n \"ethnicity\": \"\",\n \"federalTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"taxCalculationCode\": \"\",\n \"w4FormYear\": 0\n },\n \"firstName\": \"\",\n \"gender\": \"\",\n \"homeAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"isHighlyCompensated\": false,\n \"isSmoker\": false,\n \"lastName\": \"\",\n \"localTax\": [\n {\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n }\n ],\n \"mainDirectDeposit\": {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n },\n \"maritalStatus\": \"\",\n \"middleName\": \"\",\n \"nonPrimaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"ownerPercent\": \"\",\n \"preferredName\": \"\",\n \"primaryPayRate\": {\n \"annualSalary\": \"\",\n \"baseRate\": \"\",\n \"beginCheckDate\": \"\",\n \"changeReason\": \"\",\n \"defaultHours\": \"\",\n \"effectiveDate\": \"\",\n \"isAutoPay\": false,\n \"payFrequency\": \"\",\n \"payGrade\": \"\",\n \"payRateNote\": \"\",\n \"payType\": \"\",\n \"ratePer\": \"\",\n \"salary\": \"\"\n },\n \"primaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"priorLastName\": \"\",\n \"salutation\": \"\",\n \"ssn\": \"\",\n \"status\": {\n \"adjustedSeniorityDate\": \"\",\n \"changeReason\": \"\",\n \"effectiveDate\": \"\",\n \"employeeStatus\": \"\",\n \"hireDate\": \"\",\n \"isEligibleForRehire\": false,\n \"reHireDate\": \"\",\n \"statusType\": \"\",\n \"terminationDate\": \"\"\n },\n \"suffix\": \"\",\n \"taxSetup\": {\n \"fitwExemptNotes\": \"\",\n \"fitwExemptReason\": \"\",\n \"futaExemptNotes\": \"\",\n \"futaExemptReason\": \"\",\n \"isEmployee943\": false,\n \"isPension\": false,\n \"isStatutory\": false,\n \"medExemptNotes\": \"\",\n \"medExemptReason\": \"\",\n \"sitwExemptNotes\": \"\",\n \"sitwExemptReason\": \"\",\n \"ssExemptNotes\": \"\",\n \"ssExemptReason\": \"\",\n \"suiExemptNotes\": \"\",\n \"suiExemptReason\": \"\",\n \"suiState\": \"\",\n \"taxDistributionCode1099R\": \"\",\n \"taxForm\": \"\"\n },\n \"veteranDescription\": \"\",\n \"webTime\": {\n \"badgeNumber\": \"\",\n \"chargeRate\": \"\",\n \"isTimeLaborEnabled\": false\n },\n \"workAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"location\": \"\",\n \"mailStop\": \"\",\n \"mobilePhone\": \"\",\n \"pager\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"workEligibility\": {\n \"alienOrAdmissionDocumentNumber\": \"\",\n \"attestedDate\": \"\",\n \"countryOfIssuance\": \"\",\n \"foreignPassportNumber\": \"\",\n \"i94AdmissionNumber\": \"\",\n \"i9DateVerified\": \"\",\n \"i9Notes\": \"\",\n \"isI9Verified\": false,\n \"isSsnVerified\": false,\n \"ssnDateVerified\": \"\",\n \"ssnNotes\": \"\",\n \"visaType\": \"\",\n \"workAuthorization\": \"\",\n \"workUntil\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v2/companies/:companyId/employees", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/companies/:companyId/employees"
payload = {
"additionalDirectDeposit": [
{
"accountNumber": "",
"accountType": "",
"amount": "",
"amountType": "",
"blockSpecial": False,
"isSkipPreNote": False,
"nameOnAccount": "",
"preNoteDate": "",
"routingNumber": ""
}
],
"additionalRate": [
{
"changeReason": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"endCheckDate": "",
"job": "",
"rate": "",
"rateCode": "",
"rateNotes": "",
"ratePer": "",
"shift": ""
}
],
"benefitSetup": {
"benefitClass": "",
"benefitClassEffectiveDate": "",
"benefitSalary": "",
"benefitSalaryEffectiveDate": "",
"doNotApplyAdministrativePeriod": False,
"isMeasureAcaEligibility": False
},
"birthDate": "",
"coEmpCode": "",
"companyFEIN": "",
"companyName": "",
"currency": "",
"customBooleanFields": [
{
"category": "",
"label": "",
"value": False
}
],
"customDateFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customDropDownFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customNumberFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customTextFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"departmentPosition": {
"changeReason": "",
"clockBadgeNumber": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"employeeType": "",
"equalEmploymentOpportunityClass": "",
"isMinimumWageExempt": False,
"isOvertimeExempt": False,
"isSupervisorReviewer": False,
"isUnionDuesCollected": False,
"isUnionInitiationCollected": False,
"jobTitle": "",
"payGroup": "",
"positionCode": "",
"reviewerCompanyNumber": "",
"reviewerEmployeeId": "",
"shift": "",
"supervisorCompanyNumber": "",
"supervisorEmployeeId": "",
"tipped": "",
"unionAffiliationDate": "",
"unionCode": "",
"unionPosition": "",
"workersCompensation": ""
},
"disabilityDescription": "",
"emergencyContacts": [
{
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"email": "",
"firstName": "",
"homePhone": "",
"lastName": "",
"mobilePhone": "",
"notes": "",
"pager": "",
"primaryPhone": "",
"priority": "",
"relationship": "",
"state": "",
"syncEmployeeInfo": False,
"workExtension": "",
"workPhone": "",
"zip": ""
}
],
"employeeId": "",
"ethnicity": "",
"federalTax": {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"filingStatus": "",
"higherRate": False,
"otherIncomeAmount": "",
"percentage": "",
"taxCalculationCode": "",
"w4FormYear": 0
},
"firstName": "",
"gender": "",
"homeAddress": {
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"mobilePhone": "",
"phone": "",
"postalCode": "",
"state": ""
},
"isHighlyCompensated": False,
"isSmoker": False,
"lastName": "",
"localTax": [
{
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"residentPSD": "",
"taxCode": "",
"workPSD": ""
}
],
"mainDirectDeposit": {
"accountNumber": "",
"accountType": "",
"blockSpecial": False,
"isSkipPreNote": False,
"nameOnAccount": "",
"preNoteDate": "",
"routingNumber": ""
},
"maritalStatus": "",
"middleName": "",
"nonPrimaryStateTax": {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": False,
"otherIncomeAmount": "",
"percentage": "",
"reciprocityCode": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
},
"ownerPercent": "",
"preferredName": "",
"primaryPayRate": {
"annualSalary": "",
"baseRate": "",
"beginCheckDate": "",
"changeReason": "",
"defaultHours": "",
"effectiveDate": "",
"isAutoPay": False,
"payFrequency": "",
"payGrade": "",
"payRateNote": "",
"payType": "",
"ratePer": "",
"salary": ""
},
"primaryStateTax": {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": False,
"otherIncomeAmount": "",
"percentage": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
},
"priorLastName": "",
"salutation": "",
"ssn": "",
"status": {
"adjustedSeniorityDate": "",
"changeReason": "",
"effectiveDate": "",
"employeeStatus": "",
"hireDate": "",
"isEligibleForRehire": False,
"reHireDate": "",
"statusType": "",
"terminationDate": ""
},
"suffix": "",
"taxSetup": {
"fitwExemptNotes": "",
"fitwExemptReason": "",
"futaExemptNotes": "",
"futaExemptReason": "",
"isEmployee943": False,
"isPension": False,
"isStatutory": False,
"medExemptNotes": "",
"medExemptReason": "",
"sitwExemptNotes": "",
"sitwExemptReason": "",
"ssExemptNotes": "",
"ssExemptReason": "",
"suiExemptNotes": "",
"suiExemptReason": "",
"suiState": "",
"taxDistributionCode1099R": "",
"taxForm": ""
},
"veteranDescription": "",
"webTime": {
"badgeNumber": "",
"chargeRate": "",
"isTimeLaborEnabled": False
},
"workAddress": {
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"location": "",
"mailStop": "",
"mobilePhone": "",
"pager": "",
"phone": "",
"phoneExtension": "",
"postalCode": "",
"state": ""
},
"workEligibility": {
"alienOrAdmissionDocumentNumber": "",
"attestedDate": "",
"countryOfIssuance": "",
"foreignPassportNumber": "",
"i94AdmissionNumber": "",
"i9DateVerified": "",
"i9Notes": "",
"isI9Verified": False,
"isSsnVerified": False,
"ssnDateVerified": "",
"ssnNotes": "",
"visaType": "",
"workAuthorization": "",
"workUntil": ""
}
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/companies/:companyId/employees"
payload <- "{\n \"additionalDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"amount\": \"\",\n \"amountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"additionalRate\": [\n {\n \"changeReason\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"endCheckDate\": \"\",\n \"job\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"rateNotes\": \"\",\n \"ratePer\": \"\",\n \"shift\": \"\"\n }\n ],\n \"benefitSetup\": {\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n },\n \"birthDate\": \"\",\n \"coEmpCode\": \"\",\n \"companyFEIN\": \"\",\n \"companyName\": \"\",\n \"currency\": \"\",\n \"customBooleanFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": false\n }\n ],\n \"customDateFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customDropDownFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customNumberFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customTextFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"departmentPosition\": {\n \"changeReason\": \"\",\n \"clockBadgeNumber\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"employeeType\": \"\",\n \"equalEmploymentOpportunityClass\": \"\",\n \"isMinimumWageExempt\": false,\n \"isOvertimeExempt\": false,\n \"isSupervisorReviewer\": false,\n \"isUnionDuesCollected\": false,\n \"isUnionInitiationCollected\": false,\n \"jobTitle\": \"\",\n \"payGroup\": \"\",\n \"positionCode\": \"\",\n \"reviewerCompanyNumber\": \"\",\n \"reviewerEmployeeId\": \"\",\n \"shift\": \"\",\n \"supervisorCompanyNumber\": \"\",\n \"supervisorEmployeeId\": \"\",\n \"tipped\": \"\",\n \"unionAffiliationDate\": \"\",\n \"unionCode\": \"\",\n \"unionPosition\": \"\",\n \"workersCompensation\": \"\"\n },\n \"disabilityDescription\": \"\",\n \"emergencyContacts\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"homePhone\": \"\",\n \"lastName\": \"\",\n \"mobilePhone\": \"\",\n \"notes\": \"\",\n \"pager\": \"\",\n \"primaryPhone\": \"\",\n \"priority\": \"\",\n \"relationship\": \"\",\n \"state\": \"\",\n \"syncEmployeeInfo\": false,\n \"workExtension\": \"\",\n \"workPhone\": \"\",\n \"zip\": \"\"\n }\n ],\n \"employeeId\": \"\",\n \"ethnicity\": \"\",\n \"federalTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"taxCalculationCode\": \"\",\n \"w4FormYear\": 0\n },\n \"firstName\": \"\",\n \"gender\": \"\",\n \"homeAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"isHighlyCompensated\": false,\n \"isSmoker\": false,\n \"lastName\": \"\",\n \"localTax\": [\n {\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n }\n ],\n \"mainDirectDeposit\": {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n },\n \"maritalStatus\": \"\",\n \"middleName\": \"\",\n \"nonPrimaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"ownerPercent\": \"\",\n \"preferredName\": \"\",\n \"primaryPayRate\": {\n \"annualSalary\": \"\",\n \"baseRate\": \"\",\n \"beginCheckDate\": \"\",\n \"changeReason\": \"\",\n \"defaultHours\": \"\",\n \"effectiveDate\": \"\",\n \"isAutoPay\": false,\n \"payFrequency\": \"\",\n \"payGrade\": \"\",\n \"payRateNote\": \"\",\n \"payType\": \"\",\n \"ratePer\": \"\",\n \"salary\": \"\"\n },\n \"primaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"priorLastName\": \"\",\n \"salutation\": \"\",\n \"ssn\": \"\",\n \"status\": {\n \"adjustedSeniorityDate\": \"\",\n \"changeReason\": \"\",\n \"effectiveDate\": \"\",\n \"employeeStatus\": \"\",\n \"hireDate\": \"\",\n \"isEligibleForRehire\": false,\n \"reHireDate\": \"\",\n \"statusType\": \"\",\n \"terminationDate\": \"\"\n },\n \"suffix\": \"\",\n \"taxSetup\": {\n \"fitwExemptNotes\": \"\",\n \"fitwExemptReason\": \"\",\n \"futaExemptNotes\": \"\",\n \"futaExemptReason\": \"\",\n \"isEmployee943\": false,\n \"isPension\": false,\n \"isStatutory\": false,\n \"medExemptNotes\": \"\",\n \"medExemptReason\": \"\",\n \"sitwExemptNotes\": \"\",\n \"sitwExemptReason\": \"\",\n \"ssExemptNotes\": \"\",\n \"ssExemptReason\": \"\",\n \"suiExemptNotes\": \"\",\n \"suiExemptReason\": \"\",\n \"suiState\": \"\",\n \"taxDistributionCode1099R\": \"\",\n \"taxForm\": \"\"\n },\n \"veteranDescription\": \"\",\n \"webTime\": {\n \"badgeNumber\": \"\",\n \"chargeRate\": \"\",\n \"isTimeLaborEnabled\": false\n },\n \"workAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"location\": \"\",\n \"mailStop\": \"\",\n \"mobilePhone\": \"\",\n \"pager\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"workEligibility\": {\n \"alienOrAdmissionDocumentNumber\": \"\",\n \"attestedDate\": \"\",\n \"countryOfIssuance\": \"\",\n \"foreignPassportNumber\": \"\",\n \"i94AdmissionNumber\": \"\",\n \"i9DateVerified\": \"\",\n \"i9Notes\": \"\",\n \"isI9Verified\": false,\n \"isSsnVerified\": false,\n \"ssnDateVerified\": \"\",\n \"ssnNotes\": \"\",\n \"visaType\": \"\",\n \"workAuthorization\": \"\",\n \"workUntil\": \"\"\n }\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/companies/:companyId/employees")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"additionalDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"amount\": \"\",\n \"amountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"additionalRate\": [\n {\n \"changeReason\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"endCheckDate\": \"\",\n \"job\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"rateNotes\": \"\",\n \"ratePer\": \"\",\n \"shift\": \"\"\n }\n ],\n \"benefitSetup\": {\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n },\n \"birthDate\": \"\",\n \"coEmpCode\": \"\",\n \"companyFEIN\": \"\",\n \"companyName\": \"\",\n \"currency\": \"\",\n \"customBooleanFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": false\n }\n ],\n \"customDateFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customDropDownFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customNumberFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customTextFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"departmentPosition\": {\n \"changeReason\": \"\",\n \"clockBadgeNumber\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"employeeType\": \"\",\n \"equalEmploymentOpportunityClass\": \"\",\n \"isMinimumWageExempt\": false,\n \"isOvertimeExempt\": false,\n \"isSupervisorReviewer\": false,\n \"isUnionDuesCollected\": false,\n \"isUnionInitiationCollected\": false,\n \"jobTitle\": \"\",\n \"payGroup\": \"\",\n \"positionCode\": \"\",\n \"reviewerCompanyNumber\": \"\",\n \"reviewerEmployeeId\": \"\",\n \"shift\": \"\",\n \"supervisorCompanyNumber\": \"\",\n \"supervisorEmployeeId\": \"\",\n \"tipped\": \"\",\n \"unionAffiliationDate\": \"\",\n \"unionCode\": \"\",\n \"unionPosition\": \"\",\n \"workersCompensation\": \"\"\n },\n \"disabilityDescription\": \"\",\n \"emergencyContacts\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"homePhone\": \"\",\n \"lastName\": \"\",\n \"mobilePhone\": \"\",\n \"notes\": \"\",\n \"pager\": \"\",\n \"primaryPhone\": \"\",\n \"priority\": \"\",\n \"relationship\": \"\",\n \"state\": \"\",\n \"syncEmployeeInfo\": false,\n \"workExtension\": \"\",\n \"workPhone\": \"\",\n \"zip\": \"\"\n }\n ],\n \"employeeId\": \"\",\n \"ethnicity\": \"\",\n \"federalTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"taxCalculationCode\": \"\",\n \"w4FormYear\": 0\n },\n \"firstName\": \"\",\n \"gender\": \"\",\n \"homeAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"isHighlyCompensated\": false,\n \"isSmoker\": false,\n \"lastName\": \"\",\n \"localTax\": [\n {\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n }\n ],\n \"mainDirectDeposit\": {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n },\n \"maritalStatus\": \"\",\n \"middleName\": \"\",\n \"nonPrimaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"ownerPercent\": \"\",\n \"preferredName\": \"\",\n \"primaryPayRate\": {\n \"annualSalary\": \"\",\n \"baseRate\": \"\",\n \"beginCheckDate\": \"\",\n \"changeReason\": \"\",\n \"defaultHours\": \"\",\n \"effectiveDate\": \"\",\n \"isAutoPay\": false,\n \"payFrequency\": \"\",\n \"payGrade\": \"\",\n \"payRateNote\": \"\",\n \"payType\": \"\",\n \"ratePer\": \"\",\n \"salary\": \"\"\n },\n \"primaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"priorLastName\": \"\",\n \"salutation\": \"\",\n \"ssn\": \"\",\n \"status\": {\n \"adjustedSeniorityDate\": \"\",\n \"changeReason\": \"\",\n \"effectiveDate\": \"\",\n \"employeeStatus\": \"\",\n \"hireDate\": \"\",\n \"isEligibleForRehire\": false,\n \"reHireDate\": \"\",\n \"statusType\": \"\",\n \"terminationDate\": \"\"\n },\n \"suffix\": \"\",\n \"taxSetup\": {\n \"fitwExemptNotes\": \"\",\n \"fitwExemptReason\": \"\",\n \"futaExemptNotes\": \"\",\n \"futaExemptReason\": \"\",\n \"isEmployee943\": false,\n \"isPension\": false,\n \"isStatutory\": false,\n \"medExemptNotes\": \"\",\n \"medExemptReason\": \"\",\n \"sitwExemptNotes\": \"\",\n \"sitwExemptReason\": \"\",\n \"ssExemptNotes\": \"\",\n \"ssExemptReason\": \"\",\n \"suiExemptNotes\": \"\",\n \"suiExemptReason\": \"\",\n \"suiState\": \"\",\n \"taxDistributionCode1099R\": \"\",\n \"taxForm\": \"\"\n },\n \"veteranDescription\": \"\",\n \"webTime\": {\n \"badgeNumber\": \"\",\n \"chargeRate\": \"\",\n \"isTimeLaborEnabled\": false\n },\n \"workAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"location\": \"\",\n \"mailStop\": \"\",\n \"mobilePhone\": \"\",\n \"pager\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"workEligibility\": {\n \"alienOrAdmissionDocumentNumber\": \"\",\n \"attestedDate\": \"\",\n \"countryOfIssuance\": \"\",\n \"foreignPassportNumber\": \"\",\n \"i94AdmissionNumber\": \"\",\n \"i9DateVerified\": \"\",\n \"i9Notes\": \"\",\n \"isI9Verified\": false,\n \"isSsnVerified\": false,\n \"ssnDateVerified\": \"\",\n \"ssnNotes\": \"\",\n \"visaType\": \"\",\n \"workAuthorization\": \"\",\n \"workUntil\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v2/companies/:companyId/employees') do |req|
req.body = "{\n \"additionalDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"amount\": \"\",\n \"amountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"additionalRate\": [\n {\n \"changeReason\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"endCheckDate\": \"\",\n \"job\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"rateNotes\": \"\",\n \"ratePer\": \"\",\n \"shift\": \"\"\n }\n ],\n \"benefitSetup\": {\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n },\n \"birthDate\": \"\",\n \"coEmpCode\": \"\",\n \"companyFEIN\": \"\",\n \"companyName\": \"\",\n \"currency\": \"\",\n \"customBooleanFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": false\n }\n ],\n \"customDateFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customDropDownFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customNumberFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customTextFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"departmentPosition\": {\n \"changeReason\": \"\",\n \"clockBadgeNumber\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"employeeType\": \"\",\n \"equalEmploymentOpportunityClass\": \"\",\n \"isMinimumWageExempt\": false,\n \"isOvertimeExempt\": false,\n \"isSupervisorReviewer\": false,\n \"isUnionDuesCollected\": false,\n \"isUnionInitiationCollected\": false,\n \"jobTitle\": \"\",\n \"payGroup\": \"\",\n \"positionCode\": \"\",\n \"reviewerCompanyNumber\": \"\",\n \"reviewerEmployeeId\": \"\",\n \"shift\": \"\",\n \"supervisorCompanyNumber\": \"\",\n \"supervisorEmployeeId\": \"\",\n \"tipped\": \"\",\n \"unionAffiliationDate\": \"\",\n \"unionCode\": \"\",\n \"unionPosition\": \"\",\n \"workersCompensation\": \"\"\n },\n \"disabilityDescription\": \"\",\n \"emergencyContacts\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"homePhone\": \"\",\n \"lastName\": \"\",\n \"mobilePhone\": \"\",\n \"notes\": \"\",\n \"pager\": \"\",\n \"primaryPhone\": \"\",\n \"priority\": \"\",\n \"relationship\": \"\",\n \"state\": \"\",\n \"syncEmployeeInfo\": false,\n \"workExtension\": \"\",\n \"workPhone\": \"\",\n \"zip\": \"\"\n }\n ],\n \"employeeId\": \"\",\n \"ethnicity\": \"\",\n \"federalTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"taxCalculationCode\": \"\",\n \"w4FormYear\": 0\n },\n \"firstName\": \"\",\n \"gender\": \"\",\n \"homeAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"isHighlyCompensated\": false,\n \"isSmoker\": false,\n \"lastName\": \"\",\n \"localTax\": [\n {\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n }\n ],\n \"mainDirectDeposit\": {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n },\n \"maritalStatus\": \"\",\n \"middleName\": \"\",\n \"nonPrimaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"ownerPercent\": \"\",\n \"preferredName\": \"\",\n \"primaryPayRate\": {\n \"annualSalary\": \"\",\n \"baseRate\": \"\",\n \"beginCheckDate\": \"\",\n \"changeReason\": \"\",\n \"defaultHours\": \"\",\n \"effectiveDate\": \"\",\n \"isAutoPay\": false,\n \"payFrequency\": \"\",\n \"payGrade\": \"\",\n \"payRateNote\": \"\",\n \"payType\": \"\",\n \"ratePer\": \"\",\n \"salary\": \"\"\n },\n \"primaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"priorLastName\": \"\",\n \"salutation\": \"\",\n \"ssn\": \"\",\n \"status\": {\n \"adjustedSeniorityDate\": \"\",\n \"changeReason\": \"\",\n \"effectiveDate\": \"\",\n \"employeeStatus\": \"\",\n \"hireDate\": \"\",\n \"isEligibleForRehire\": false,\n \"reHireDate\": \"\",\n \"statusType\": \"\",\n \"terminationDate\": \"\"\n },\n \"suffix\": \"\",\n \"taxSetup\": {\n \"fitwExemptNotes\": \"\",\n \"fitwExemptReason\": \"\",\n \"futaExemptNotes\": \"\",\n \"futaExemptReason\": \"\",\n \"isEmployee943\": false,\n \"isPension\": false,\n \"isStatutory\": false,\n \"medExemptNotes\": \"\",\n \"medExemptReason\": \"\",\n \"sitwExemptNotes\": \"\",\n \"sitwExemptReason\": \"\",\n \"ssExemptNotes\": \"\",\n \"ssExemptReason\": \"\",\n \"suiExemptNotes\": \"\",\n \"suiExemptReason\": \"\",\n \"suiState\": \"\",\n \"taxDistributionCode1099R\": \"\",\n \"taxForm\": \"\"\n },\n \"veteranDescription\": \"\",\n \"webTime\": {\n \"badgeNumber\": \"\",\n \"chargeRate\": \"\",\n \"isTimeLaborEnabled\": false\n },\n \"workAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"location\": \"\",\n \"mailStop\": \"\",\n \"mobilePhone\": \"\",\n \"pager\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"workEligibility\": {\n \"alienOrAdmissionDocumentNumber\": \"\",\n \"attestedDate\": \"\",\n \"countryOfIssuance\": \"\",\n \"foreignPassportNumber\": \"\",\n \"i94AdmissionNumber\": \"\",\n \"i9DateVerified\": \"\",\n \"i9Notes\": \"\",\n \"isI9Verified\": false,\n \"isSsnVerified\": false,\n \"ssnDateVerified\": \"\",\n \"ssnNotes\": \"\",\n \"visaType\": \"\",\n \"workAuthorization\": \"\",\n \"workUntil\": \"\"\n }\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/companies/:companyId/employees";
let payload = json!({
"additionalDirectDeposit": (
json!({
"accountNumber": "",
"accountType": "",
"amount": "",
"amountType": "",
"blockSpecial": false,
"isSkipPreNote": false,
"nameOnAccount": "",
"preNoteDate": "",
"routingNumber": ""
})
),
"additionalRate": (
json!({
"changeReason": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"endCheckDate": "",
"job": "",
"rate": "",
"rateCode": "",
"rateNotes": "",
"ratePer": "",
"shift": ""
})
),
"benefitSetup": json!({
"benefitClass": "",
"benefitClassEffectiveDate": "",
"benefitSalary": "",
"benefitSalaryEffectiveDate": "",
"doNotApplyAdministrativePeriod": false,
"isMeasureAcaEligibility": false
}),
"birthDate": "",
"coEmpCode": "",
"companyFEIN": "",
"companyName": "",
"currency": "",
"customBooleanFields": (
json!({
"category": "",
"label": "",
"value": false
})
),
"customDateFields": (
json!({
"category": "",
"label": "",
"value": ""
})
),
"customDropDownFields": (
json!({
"category": "",
"label": "",
"value": ""
})
),
"customNumberFields": (
json!({
"category": "",
"label": "",
"value": ""
})
),
"customTextFields": (
json!({
"category": "",
"label": "",
"value": ""
})
),
"departmentPosition": json!({
"changeReason": "",
"clockBadgeNumber": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"employeeType": "",
"equalEmploymentOpportunityClass": "",
"isMinimumWageExempt": false,
"isOvertimeExempt": false,
"isSupervisorReviewer": false,
"isUnionDuesCollected": false,
"isUnionInitiationCollected": false,
"jobTitle": "",
"payGroup": "",
"positionCode": "",
"reviewerCompanyNumber": "",
"reviewerEmployeeId": "",
"shift": "",
"supervisorCompanyNumber": "",
"supervisorEmployeeId": "",
"tipped": "",
"unionAffiliationDate": "",
"unionCode": "",
"unionPosition": "",
"workersCompensation": ""
}),
"disabilityDescription": "",
"emergencyContacts": (
json!({
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"email": "",
"firstName": "",
"homePhone": "",
"lastName": "",
"mobilePhone": "",
"notes": "",
"pager": "",
"primaryPhone": "",
"priority": "",
"relationship": "",
"state": "",
"syncEmployeeInfo": false,
"workExtension": "",
"workPhone": "",
"zip": ""
})
),
"employeeId": "",
"ethnicity": "",
"federalTax": json!({
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"taxCalculationCode": "",
"w4FormYear": 0
}),
"firstName": "",
"gender": "",
"homeAddress": json!({
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"mobilePhone": "",
"phone": "",
"postalCode": "",
"state": ""
}),
"isHighlyCompensated": false,
"isSmoker": false,
"lastName": "",
"localTax": (
json!({
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"residentPSD": "",
"taxCode": "",
"workPSD": ""
})
),
"mainDirectDeposit": json!({
"accountNumber": "",
"accountType": "",
"blockSpecial": false,
"isSkipPreNote": false,
"nameOnAccount": "",
"preNoteDate": "",
"routingNumber": ""
}),
"maritalStatus": "",
"middleName": "",
"nonPrimaryStateTax": json!({
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"reciprocityCode": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
}),
"ownerPercent": "",
"preferredName": "",
"primaryPayRate": json!({
"annualSalary": "",
"baseRate": "",
"beginCheckDate": "",
"changeReason": "",
"defaultHours": "",
"effectiveDate": "",
"isAutoPay": false,
"payFrequency": "",
"payGrade": "",
"payRateNote": "",
"payType": "",
"ratePer": "",
"salary": ""
}),
"primaryStateTax": json!({
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
}),
"priorLastName": "",
"salutation": "",
"ssn": "",
"status": json!({
"adjustedSeniorityDate": "",
"changeReason": "",
"effectiveDate": "",
"employeeStatus": "",
"hireDate": "",
"isEligibleForRehire": false,
"reHireDate": "",
"statusType": "",
"terminationDate": ""
}),
"suffix": "",
"taxSetup": json!({
"fitwExemptNotes": "",
"fitwExemptReason": "",
"futaExemptNotes": "",
"futaExemptReason": "",
"isEmployee943": false,
"isPension": false,
"isStatutory": false,
"medExemptNotes": "",
"medExemptReason": "",
"sitwExemptNotes": "",
"sitwExemptReason": "",
"ssExemptNotes": "",
"ssExemptReason": "",
"suiExemptNotes": "",
"suiExemptReason": "",
"suiState": "",
"taxDistributionCode1099R": "",
"taxForm": ""
}),
"veteranDescription": "",
"webTime": json!({
"badgeNumber": "",
"chargeRate": "",
"isTimeLaborEnabled": false
}),
"workAddress": json!({
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"location": "",
"mailStop": "",
"mobilePhone": "",
"pager": "",
"phone": "",
"phoneExtension": "",
"postalCode": "",
"state": ""
}),
"workEligibility": json!({
"alienOrAdmissionDocumentNumber": "",
"attestedDate": "",
"countryOfIssuance": "",
"foreignPassportNumber": "",
"i94AdmissionNumber": "",
"i9DateVerified": "",
"i9Notes": "",
"isI9Verified": false,
"isSsnVerified": false,
"ssnDateVerified": "",
"ssnNotes": "",
"visaType": "",
"workAuthorization": "",
"workUntil": ""
})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v2/companies/:companyId/employees \
--header 'content-type: application/json' \
--data '{
"additionalDirectDeposit": [
{
"accountNumber": "",
"accountType": "",
"amount": "",
"amountType": "",
"blockSpecial": false,
"isSkipPreNote": false,
"nameOnAccount": "",
"preNoteDate": "",
"routingNumber": ""
}
],
"additionalRate": [
{
"changeReason": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"endCheckDate": "",
"job": "",
"rate": "",
"rateCode": "",
"rateNotes": "",
"ratePer": "",
"shift": ""
}
],
"benefitSetup": {
"benefitClass": "",
"benefitClassEffectiveDate": "",
"benefitSalary": "",
"benefitSalaryEffectiveDate": "",
"doNotApplyAdministrativePeriod": false,
"isMeasureAcaEligibility": false
},
"birthDate": "",
"coEmpCode": "",
"companyFEIN": "",
"companyName": "",
"currency": "",
"customBooleanFields": [
{
"category": "",
"label": "",
"value": false
}
],
"customDateFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customDropDownFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customNumberFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customTextFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"departmentPosition": {
"changeReason": "",
"clockBadgeNumber": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"employeeType": "",
"equalEmploymentOpportunityClass": "",
"isMinimumWageExempt": false,
"isOvertimeExempt": false,
"isSupervisorReviewer": false,
"isUnionDuesCollected": false,
"isUnionInitiationCollected": false,
"jobTitle": "",
"payGroup": "",
"positionCode": "",
"reviewerCompanyNumber": "",
"reviewerEmployeeId": "",
"shift": "",
"supervisorCompanyNumber": "",
"supervisorEmployeeId": "",
"tipped": "",
"unionAffiliationDate": "",
"unionCode": "",
"unionPosition": "",
"workersCompensation": ""
},
"disabilityDescription": "",
"emergencyContacts": [
{
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"email": "",
"firstName": "",
"homePhone": "",
"lastName": "",
"mobilePhone": "",
"notes": "",
"pager": "",
"primaryPhone": "",
"priority": "",
"relationship": "",
"state": "",
"syncEmployeeInfo": false,
"workExtension": "",
"workPhone": "",
"zip": ""
}
],
"employeeId": "",
"ethnicity": "",
"federalTax": {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"taxCalculationCode": "",
"w4FormYear": 0
},
"firstName": "",
"gender": "",
"homeAddress": {
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"mobilePhone": "",
"phone": "",
"postalCode": "",
"state": ""
},
"isHighlyCompensated": false,
"isSmoker": false,
"lastName": "",
"localTax": [
{
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"residentPSD": "",
"taxCode": "",
"workPSD": ""
}
],
"mainDirectDeposit": {
"accountNumber": "",
"accountType": "",
"blockSpecial": false,
"isSkipPreNote": false,
"nameOnAccount": "",
"preNoteDate": "",
"routingNumber": ""
},
"maritalStatus": "",
"middleName": "",
"nonPrimaryStateTax": {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"reciprocityCode": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
},
"ownerPercent": "",
"preferredName": "",
"primaryPayRate": {
"annualSalary": "",
"baseRate": "",
"beginCheckDate": "",
"changeReason": "",
"defaultHours": "",
"effectiveDate": "",
"isAutoPay": false,
"payFrequency": "",
"payGrade": "",
"payRateNote": "",
"payType": "",
"ratePer": "",
"salary": ""
},
"primaryStateTax": {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
},
"priorLastName": "",
"salutation": "",
"ssn": "",
"status": {
"adjustedSeniorityDate": "",
"changeReason": "",
"effectiveDate": "",
"employeeStatus": "",
"hireDate": "",
"isEligibleForRehire": false,
"reHireDate": "",
"statusType": "",
"terminationDate": ""
},
"suffix": "",
"taxSetup": {
"fitwExemptNotes": "",
"fitwExemptReason": "",
"futaExemptNotes": "",
"futaExemptReason": "",
"isEmployee943": false,
"isPension": false,
"isStatutory": false,
"medExemptNotes": "",
"medExemptReason": "",
"sitwExemptNotes": "",
"sitwExemptReason": "",
"ssExemptNotes": "",
"ssExemptReason": "",
"suiExemptNotes": "",
"suiExemptReason": "",
"suiState": "",
"taxDistributionCode1099R": "",
"taxForm": ""
},
"veteranDescription": "",
"webTime": {
"badgeNumber": "",
"chargeRate": "",
"isTimeLaborEnabled": false
},
"workAddress": {
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"location": "",
"mailStop": "",
"mobilePhone": "",
"pager": "",
"phone": "",
"phoneExtension": "",
"postalCode": "",
"state": ""
},
"workEligibility": {
"alienOrAdmissionDocumentNumber": "",
"attestedDate": "",
"countryOfIssuance": "",
"foreignPassportNumber": "",
"i94AdmissionNumber": "",
"i9DateVerified": "",
"i9Notes": "",
"isI9Verified": false,
"isSsnVerified": false,
"ssnDateVerified": "",
"ssnNotes": "",
"visaType": "",
"workAuthorization": "",
"workUntil": ""
}
}'
echo '{
"additionalDirectDeposit": [
{
"accountNumber": "",
"accountType": "",
"amount": "",
"amountType": "",
"blockSpecial": false,
"isSkipPreNote": false,
"nameOnAccount": "",
"preNoteDate": "",
"routingNumber": ""
}
],
"additionalRate": [
{
"changeReason": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"endCheckDate": "",
"job": "",
"rate": "",
"rateCode": "",
"rateNotes": "",
"ratePer": "",
"shift": ""
}
],
"benefitSetup": {
"benefitClass": "",
"benefitClassEffectiveDate": "",
"benefitSalary": "",
"benefitSalaryEffectiveDate": "",
"doNotApplyAdministrativePeriod": false,
"isMeasureAcaEligibility": false
},
"birthDate": "",
"coEmpCode": "",
"companyFEIN": "",
"companyName": "",
"currency": "",
"customBooleanFields": [
{
"category": "",
"label": "",
"value": false
}
],
"customDateFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customDropDownFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customNumberFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customTextFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"departmentPosition": {
"changeReason": "",
"clockBadgeNumber": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"employeeType": "",
"equalEmploymentOpportunityClass": "",
"isMinimumWageExempt": false,
"isOvertimeExempt": false,
"isSupervisorReviewer": false,
"isUnionDuesCollected": false,
"isUnionInitiationCollected": false,
"jobTitle": "",
"payGroup": "",
"positionCode": "",
"reviewerCompanyNumber": "",
"reviewerEmployeeId": "",
"shift": "",
"supervisorCompanyNumber": "",
"supervisorEmployeeId": "",
"tipped": "",
"unionAffiliationDate": "",
"unionCode": "",
"unionPosition": "",
"workersCompensation": ""
},
"disabilityDescription": "",
"emergencyContacts": [
{
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"email": "",
"firstName": "",
"homePhone": "",
"lastName": "",
"mobilePhone": "",
"notes": "",
"pager": "",
"primaryPhone": "",
"priority": "",
"relationship": "",
"state": "",
"syncEmployeeInfo": false,
"workExtension": "",
"workPhone": "",
"zip": ""
}
],
"employeeId": "",
"ethnicity": "",
"federalTax": {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"taxCalculationCode": "",
"w4FormYear": 0
},
"firstName": "",
"gender": "",
"homeAddress": {
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"mobilePhone": "",
"phone": "",
"postalCode": "",
"state": ""
},
"isHighlyCompensated": false,
"isSmoker": false,
"lastName": "",
"localTax": [
{
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"residentPSD": "",
"taxCode": "",
"workPSD": ""
}
],
"mainDirectDeposit": {
"accountNumber": "",
"accountType": "",
"blockSpecial": false,
"isSkipPreNote": false,
"nameOnAccount": "",
"preNoteDate": "",
"routingNumber": ""
},
"maritalStatus": "",
"middleName": "",
"nonPrimaryStateTax": {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"reciprocityCode": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
},
"ownerPercent": "",
"preferredName": "",
"primaryPayRate": {
"annualSalary": "",
"baseRate": "",
"beginCheckDate": "",
"changeReason": "",
"defaultHours": "",
"effectiveDate": "",
"isAutoPay": false,
"payFrequency": "",
"payGrade": "",
"payRateNote": "",
"payType": "",
"ratePer": "",
"salary": ""
},
"primaryStateTax": {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
},
"priorLastName": "",
"salutation": "",
"ssn": "",
"status": {
"adjustedSeniorityDate": "",
"changeReason": "",
"effectiveDate": "",
"employeeStatus": "",
"hireDate": "",
"isEligibleForRehire": false,
"reHireDate": "",
"statusType": "",
"terminationDate": ""
},
"suffix": "",
"taxSetup": {
"fitwExemptNotes": "",
"fitwExemptReason": "",
"futaExemptNotes": "",
"futaExemptReason": "",
"isEmployee943": false,
"isPension": false,
"isStatutory": false,
"medExemptNotes": "",
"medExemptReason": "",
"sitwExemptNotes": "",
"sitwExemptReason": "",
"ssExemptNotes": "",
"ssExemptReason": "",
"suiExemptNotes": "",
"suiExemptReason": "",
"suiState": "",
"taxDistributionCode1099R": "",
"taxForm": ""
},
"veteranDescription": "",
"webTime": {
"badgeNumber": "",
"chargeRate": "",
"isTimeLaborEnabled": false
},
"workAddress": {
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"location": "",
"mailStop": "",
"mobilePhone": "",
"pager": "",
"phone": "",
"phoneExtension": "",
"postalCode": "",
"state": ""
},
"workEligibility": {
"alienOrAdmissionDocumentNumber": "",
"attestedDate": "",
"countryOfIssuance": "",
"foreignPassportNumber": "",
"i94AdmissionNumber": "",
"i9DateVerified": "",
"i9Notes": "",
"isI9Verified": false,
"isSsnVerified": false,
"ssnDateVerified": "",
"ssnNotes": "",
"visaType": "",
"workAuthorization": "",
"workUntil": ""
}
}' | \
http POST {{baseUrl}}/v2/companies/:companyId/employees \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "additionalDirectDeposit": [\n {\n "accountNumber": "",\n "accountType": "",\n "amount": "",\n "amountType": "",\n "blockSpecial": false,\n "isSkipPreNote": false,\n "nameOnAccount": "",\n "preNoteDate": "",\n "routingNumber": ""\n }\n ],\n "additionalRate": [\n {\n "changeReason": "",\n "costCenter1": "",\n "costCenter2": "",\n "costCenter3": "",\n "effectiveDate": "",\n "endCheckDate": "",\n "job": "",\n "rate": "",\n "rateCode": "",\n "rateNotes": "",\n "ratePer": "",\n "shift": ""\n }\n ],\n "benefitSetup": {\n "benefitClass": "",\n "benefitClassEffectiveDate": "",\n "benefitSalary": "",\n "benefitSalaryEffectiveDate": "",\n "doNotApplyAdministrativePeriod": false,\n "isMeasureAcaEligibility": false\n },\n "birthDate": "",\n "coEmpCode": "",\n "companyFEIN": "",\n "companyName": "",\n "currency": "",\n "customBooleanFields": [\n {\n "category": "",\n "label": "",\n "value": false\n }\n ],\n "customDateFields": [\n {\n "category": "",\n "label": "",\n "value": ""\n }\n ],\n "customDropDownFields": [\n {\n "category": "",\n "label": "",\n "value": ""\n }\n ],\n "customNumberFields": [\n {\n "category": "",\n "label": "",\n "value": ""\n }\n ],\n "customTextFields": [\n {\n "category": "",\n "label": "",\n "value": ""\n }\n ],\n "departmentPosition": {\n "changeReason": "",\n "clockBadgeNumber": "",\n "costCenter1": "",\n "costCenter2": "",\n "costCenter3": "",\n "effectiveDate": "",\n "employeeType": "",\n "equalEmploymentOpportunityClass": "",\n "isMinimumWageExempt": false,\n "isOvertimeExempt": false,\n "isSupervisorReviewer": false,\n "isUnionDuesCollected": false,\n "isUnionInitiationCollected": false,\n "jobTitle": "",\n "payGroup": "",\n "positionCode": "",\n "reviewerCompanyNumber": "",\n "reviewerEmployeeId": "",\n "shift": "",\n "supervisorCompanyNumber": "",\n "supervisorEmployeeId": "",\n "tipped": "",\n "unionAffiliationDate": "",\n "unionCode": "",\n "unionPosition": "",\n "workersCompensation": ""\n },\n "disabilityDescription": "",\n "emergencyContacts": [\n {\n "address1": "",\n "address2": "",\n "city": "",\n "country": "",\n "county": "",\n "email": "",\n "firstName": "",\n "homePhone": "",\n "lastName": "",\n "mobilePhone": "",\n "notes": "",\n "pager": "",\n "primaryPhone": "",\n "priority": "",\n "relationship": "",\n "state": "",\n "syncEmployeeInfo": false,\n "workExtension": "",\n "workPhone": "",\n "zip": ""\n }\n ],\n "employeeId": "",\n "ethnicity": "",\n "federalTax": {\n "amount": "",\n "deductionsAmount": "",\n "dependentsAmount": "",\n "exemptions": "",\n "filingStatus": "",\n "higherRate": false,\n "otherIncomeAmount": "",\n "percentage": "",\n "taxCalculationCode": "",\n "w4FormYear": 0\n },\n "firstName": "",\n "gender": "",\n "homeAddress": {\n "address1": "",\n "address2": "",\n "city": "",\n "country": "",\n "county": "",\n "emailAddress": "",\n "mobilePhone": "",\n "phone": "",\n "postalCode": "",\n "state": ""\n },\n "isHighlyCompensated": false,\n "isSmoker": false,\n "lastName": "",\n "localTax": [\n {\n "exemptions": "",\n "exemptions2": "",\n "filingStatus": "",\n "residentPSD": "",\n "taxCode": "",\n "workPSD": ""\n }\n ],\n "mainDirectDeposit": {\n "accountNumber": "",\n "accountType": "",\n "blockSpecial": false,\n "isSkipPreNote": false,\n "nameOnAccount": "",\n "preNoteDate": "",\n "routingNumber": ""\n },\n "maritalStatus": "",\n "middleName": "",\n "nonPrimaryStateTax": {\n "amount": "",\n "deductionsAmount": "",\n "dependentsAmount": "",\n "exemptions": "",\n "exemptions2": "",\n "filingStatus": "",\n "higherRate": false,\n "otherIncomeAmount": "",\n "percentage": "",\n "reciprocityCode": "",\n "specialCheckCalc": "",\n "taxCalculationCode": "",\n "taxCode": "",\n "w4FormYear": 0\n },\n "ownerPercent": "",\n "preferredName": "",\n "primaryPayRate": {\n "annualSalary": "",\n "baseRate": "",\n "beginCheckDate": "",\n "changeReason": "",\n "defaultHours": "",\n "effectiveDate": "",\n "isAutoPay": false,\n "payFrequency": "",\n "payGrade": "",\n "payRateNote": "",\n "payType": "",\n "ratePer": "",\n "salary": ""\n },\n "primaryStateTax": {\n "amount": "",\n "deductionsAmount": "",\n "dependentsAmount": "",\n "exemptions": "",\n "exemptions2": "",\n "filingStatus": "",\n "higherRate": false,\n "otherIncomeAmount": "",\n "percentage": "",\n "specialCheckCalc": "",\n "taxCalculationCode": "",\n "taxCode": "",\n "w4FormYear": 0\n },\n "priorLastName": "",\n "salutation": "",\n "ssn": "",\n "status": {\n "adjustedSeniorityDate": "",\n "changeReason": "",\n "effectiveDate": "",\n "employeeStatus": "",\n "hireDate": "",\n "isEligibleForRehire": false,\n "reHireDate": "",\n "statusType": "",\n "terminationDate": ""\n },\n "suffix": "",\n "taxSetup": {\n "fitwExemptNotes": "",\n "fitwExemptReason": "",\n "futaExemptNotes": "",\n "futaExemptReason": "",\n "isEmployee943": false,\n "isPension": false,\n "isStatutory": false,\n "medExemptNotes": "",\n "medExemptReason": "",\n "sitwExemptNotes": "",\n "sitwExemptReason": "",\n "ssExemptNotes": "",\n "ssExemptReason": "",\n "suiExemptNotes": "",\n "suiExemptReason": "",\n "suiState": "",\n "taxDistributionCode1099R": "",\n "taxForm": ""\n },\n "veteranDescription": "",\n "webTime": {\n "badgeNumber": "",\n "chargeRate": "",\n "isTimeLaborEnabled": false\n },\n "workAddress": {\n "address1": "",\n "address2": "",\n "city": "",\n "country": "",\n "county": "",\n "emailAddress": "",\n "location": "",\n "mailStop": "",\n "mobilePhone": "",\n "pager": "",\n "phone": "",\n "phoneExtension": "",\n "postalCode": "",\n "state": ""\n },\n "workEligibility": {\n "alienOrAdmissionDocumentNumber": "",\n "attestedDate": "",\n "countryOfIssuance": "",\n "foreignPassportNumber": "",\n "i94AdmissionNumber": "",\n "i9DateVerified": "",\n "i9Notes": "",\n "isI9Verified": false,\n "isSsnVerified": false,\n "ssnDateVerified": "",\n "ssnNotes": "",\n "visaType": "",\n "workAuthorization": "",\n "workUntil": ""\n }\n}' \
--output-document \
- {{baseUrl}}/v2/companies/:companyId/employees
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"additionalDirectDeposit": [
[
"accountNumber": "",
"accountType": "",
"amount": "",
"amountType": "",
"blockSpecial": false,
"isSkipPreNote": false,
"nameOnAccount": "",
"preNoteDate": "",
"routingNumber": ""
]
],
"additionalRate": [
[
"changeReason": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"endCheckDate": "",
"job": "",
"rate": "",
"rateCode": "",
"rateNotes": "",
"ratePer": "",
"shift": ""
]
],
"benefitSetup": [
"benefitClass": "",
"benefitClassEffectiveDate": "",
"benefitSalary": "",
"benefitSalaryEffectiveDate": "",
"doNotApplyAdministrativePeriod": false,
"isMeasureAcaEligibility": false
],
"birthDate": "",
"coEmpCode": "",
"companyFEIN": "",
"companyName": "",
"currency": "",
"customBooleanFields": [
[
"category": "",
"label": "",
"value": false
]
],
"customDateFields": [
[
"category": "",
"label": "",
"value": ""
]
],
"customDropDownFields": [
[
"category": "",
"label": "",
"value": ""
]
],
"customNumberFields": [
[
"category": "",
"label": "",
"value": ""
]
],
"customTextFields": [
[
"category": "",
"label": "",
"value": ""
]
],
"departmentPosition": [
"changeReason": "",
"clockBadgeNumber": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"employeeType": "",
"equalEmploymentOpportunityClass": "",
"isMinimumWageExempt": false,
"isOvertimeExempt": false,
"isSupervisorReviewer": false,
"isUnionDuesCollected": false,
"isUnionInitiationCollected": false,
"jobTitle": "",
"payGroup": "",
"positionCode": "",
"reviewerCompanyNumber": "",
"reviewerEmployeeId": "",
"shift": "",
"supervisorCompanyNumber": "",
"supervisorEmployeeId": "",
"tipped": "",
"unionAffiliationDate": "",
"unionCode": "",
"unionPosition": "",
"workersCompensation": ""
],
"disabilityDescription": "",
"emergencyContacts": [
[
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"email": "",
"firstName": "",
"homePhone": "",
"lastName": "",
"mobilePhone": "",
"notes": "",
"pager": "",
"primaryPhone": "",
"priority": "",
"relationship": "",
"state": "",
"syncEmployeeInfo": false,
"workExtension": "",
"workPhone": "",
"zip": ""
]
],
"employeeId": "",
"ethnicity": "",
"federalTax": [
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"taxCalculationCode": "",
"w4FormYear": 0
],
"firstName": "",
"gender": "",
"homeAddress": [
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"mobilePhone": "",
"phone": "",
"postalCode": "",
"state": ""
],
"isHighlyCompensated": false,
"isSmoker": false,
"lastName": "",
"localTax": [
[
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"residentPSD": "",
"taxCode": "",
"workPSD": ""
]
],
"mainDirectDeposit": [
"accountNumber": "",
"accountType": "",
"blockSpecial": false,
"isSkipPreNote": false,
"nameOnAccount": "",
"preNoteDate": "",
"routingNumber": ""
],
"maritalStatus": "",
"middleName": "",
"nonPrimaryStateTax": [
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"reciprocityCode": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
],
"ownerPercent": "",
"preferredName": "",
"primaryPayRate": [
"annualSalary": "",
"baseRate": "",
"beginCheckDate": "",
"changeReason": "",
"defaultHours": "",
"effectiveDate": "",
"isAutoPay": false,
"payFrequency": "",
"payGrade": "",
"payRateNote": "",
"payType": "",
"ratePer": "",
"salary": ""
],
"primaryStateTax": [
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
],
"priorLastName": "",
"salutation": "",
"ssn": "",
"status": [
"adjustedSeniorityDate": "",
"changeReason": "",
"effectiveDate": "",
"employeeStatus": "",
"hireDate": "",
"isEligibleForRehire": false,
"reHireDate": "",
"statusType": "",
"terminationDate": ""
],
"suffix": "",
"taxSetup": [
"fitwExemptNotes": "",
"fitwExemptReason": "",
"futaExemptNotes": "",
"futaExemptReason": "",
"isEmployee943": false,
"isPension": false,
"isStatutory": false,
"medExemptNotes": "",
"medExemptReason": "",
"sitwExemptNotes": "",
"sitwExemptReason": "",
"ssExemptNotes": "",
"ssExemptReason": "",
"suiExemptNotes": "",
"suiExemptReason": "",
"suiState": "",
"taxDistributionCode1099R": "",
"taxForm": ""
],
"veteranDescription": "",
"webTime": [
"badgeNumber": "",
"chargeRate": "",
"isTimeLaborEnabled": false
],
"workAddress": [
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"location": "",
"mailStop": "",
"mobilePhone": "",
"pager": "",
"phone": "",
"phoneExtension": "",
"postalCode": "",
"state": ""
],
"workEligibility": [
"alienOrAdmissionDocumentNumber": "",
"attestedDate": "",
"countryOfIssuance": "",
"foreignPassportNumber": "",
"i94AdmissionNumber": "",
"i9DateVerified": "",
"i9Notes": "",
"isI9Verified": false,
"isSsnVerified": false,
"ssnDateVerified": "",
"ssnNotes": "",
"visaType": "",
"workAuthorization": "",
"workUntil": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/companies/:companyId/employees")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Get all employees
{{baseUrl}}/v2/companies/:companyId/employees/
QUERY PARAMS
companyId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/companies/:companyId/employees/");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/companies/:companyId/employees/")
require "http/client"
url = "{{baseUrl}}/v2/companies/:companyId/employees/"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v2/companies/:companyId/employees/"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/companies/:companyId/employees/");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/companies/:companyId/employees/"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v2/companies/:companyId/employees/ HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/companies/:companyId/employees/")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/companies/:companyId/employees/"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees/")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/companies/:companyId/employees/")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v2/companies/:companyId/employees/');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/companies/:companyId/employees/'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/companies/:companyId/employees/';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/companies/:companyId/employees/',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees/")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/companies/:companyId/employees/',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/companies/:companyId/employees/'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v2/companies/:companyId/employees/');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/companies/:companyId/employees/'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/companies/:companyId/employees/';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/companies/:companyId/employees/"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/companies/:companyId/employees/" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/companies/:companyId/employees/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v2/companies/:companyId/employees/');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/companies/:companyId/employees/');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/companies/:companyId/employees/');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/companies/:companyId/employees/' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/companies/:companyId/employees/' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v2/companies/:companyId/employees/")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/companies/:companyId/employees/"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/companies/:companyId/employees/"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/companies/:companyId/employees/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v2/companies/:companyId/employees/') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/companies/:companyId/employees/";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v2/companies/:companyId/employees/
http GET {{baseUrl}}/v2/companies/:companyId/employees/
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v2/companies/:companyId/employees/
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/companies/:companyId/employees/")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Get employee
{{baseUrl}}/v2/companies/:companyId/employees/:employeeId
QUERY PARAMS
companyId
employeeId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId")
require "http/client"
url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v2/companies/:companyId/employees/:employeeId HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/companies/:companyId/employees/:employeeId',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/companies/:companyId/employees/:employeeId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/companies/:companyId/employees/:employeeId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/companies/:companyId/employees/:employeeId');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/companies/:companyId/employees/:employeeId');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v2/companies/:companyId/employees/:employeeId")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v2/companies/:companyId/employees/:employeeId') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v2/companies/:companyId/employees/:employeeId
http GET {{baseUrl}}/v2/companies/:companyId/employees/:employeeId
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v2/companies/:companyId/employees/:employeeId
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PATCH
Update employee
{{baseUrl}}/v2/companies/:companyId/employees/:employeeId
QUERY PARAMS
companyId
employeeId
BODY json
{
"additionalDirectDeposit": [
{
"accountNumber": "",
"accountType": "",
"amount": "",
"amountType": "",
"blockSpecial": false,
"isSkipPreNote": false,
"nameOnAccount": "",
"preNoteDate": "",
"routingNumber": ""
}
],
"additionalRate": [
{
"changeReason": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"endCheckDate": "",
"job": "",
"rate": "",
"rateCode": "",
"rateNotes": "",
"ratePer": "",
"shift": ""
}
],
"benefitSetup": {
"benefitClass": "",
"benefitClassEffectiveDate": "",
"benefitSalary": "",
"benefitSalaryEffectiveDate": "",
"doNotApplyAdministrativePeriod": false,
"isMeasureAcaEligibility": false
},
"birthDate": "",
"coEmpCode": "",
"companyFEIN": "",
"companyName": "",
"currency": "",
"customBooleanFields": [
{
"category": "",
"label": "",
"value": false
}
],
"customDateFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customDropDownFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customNumberFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customTextFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"departmentPosition": {
"changeReason": "",
"clockBadgeNumber": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"employeeType": "",
"equalEmploymentOpportunityClass": "",
"isMinimumWageExempt": false,
"isOvertimeExempt": false,
"isSupervisorReviewer": false,
"isUnionDuesCollected": false,
"isUnionInitiationCollected": false,
"jobTitle": "",
"payGroup": "",
"positionCode": "",
"reviewerCompanyNumber": "",
"reviewerEmployeeId": "",
"shift": "",
"supervisorCompanyNumber": "",
"supervisorEmployeeId": "",
"tipped": "",
"unionAffiliationDate": "",
"unionCode": "",
"unionPosition": "",
"workersCompensation": ""
},
"disabilityDescription": "",
"emergencyContacts": [
{
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"email": "",
"firstName": "",
"homePhone": "",
"lastName": "",
"mobilePhone": "",
"notes": "",
"pager": "",
"primaryPhone": "",
"priority": "",
"relationship": "",
"state": "",
"syncEmployeeInfo": false,
"workExtension": "",
"workPhone": "",
"zip": ""
}
],
"employeeId": "",
"ethnicity": "",
"federalTax": {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"taxCalculationCode": "",
"w4FormYear": 0
},
"firstName": "",
"gender": "",
"homeAddress": {
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"mobilePhone": "",
"phone": "",
"postalCode": "",
"state": ""
},
"isHighlyCompensated": false,
"isSmoker": false,
"lastName": "",
"localTax": [
{
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"residentPSD": "",
"taxCode": "",
"workPSD": ""
}
],
"mainDirectDeposit": {
"accountNumber": "",
"accountType": "",
"blockSpecial": false,
"isSkipPreNote": false,
"nameOnAccount": "",
"preNoteDate": "",
"routingNumber": ""
},
"maritalStatus": "",
"middleName": "",
"nonPrimaryStateTax": {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"reciprocityCode": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
},
"ownerPercent": "",
"preferredName": "",
"primaryPayRate": {
"annualSalary": "",
"baseRate": "",
"beginCheckDate": "",
"changeReason": "",
"defaultHours": "",
"effectiveDate": "",
"isAutoPay": false,
"payFrequency": "",
"payGrade": "",
"payRateNote": "",
"payType": "",
"ratePer": "",
"salary": ""
},
"primaryStateTax": {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
},
"priorLastName": "",
"salutation": "",
"ssn": "",
"status": {
"adjustedSeniorityDate": "",
"changeReason": "",
"effectiveDate": "",
"employeeStatus": "",
"hireDate": "",
"isEligibleForRehire": false,
"reHireDate": "",
"statusType": "",
"terminationDate": ""
},
"suffix": "",
"taxSetup": {
"fitwExemptNotes": "",
"fitwExemptReason": "",
"futaExemptNotes": "",
"futaExemptReason": "",
"isEmployee943": false,
"isPension": false,
"isStatutory": false,
"medExemptNotes": "",
"medExemptReason": "",
"sitwExemptNotes": "",
"sitwExemptReason": "",
"ssExemptNotes": "",
"ssExemptReason": "",
"suiExemptNotes": "",
"suiExemptReason": "",
"suiState": "",
"taxDistributionCode1099R": "",
"taxForm": ""
},
"veteranDescription": "",
"webTime": {
"badgeNumber": "",
"chargeRate": "",
"isTimeLaborEnabled": false
},
"workAddress": {
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"location": "",
"mailStop": "",
"mobilePhone": "",
"pager": "",
"phone": "",
"phoneExtension": "",
"postalCode": "",
"state": ""
},
"workEligibility": {
"alienOrAdmissionDocumentNumber": "",
"attestedDate": "",
"countryOfIssuance": "",
"foreignPassportNumber": "",
"i94AdmissionNumber": "",
"i9DateVerified": "",
"i9Notes": "",
"isI9Verified": false,
"isSsnVerified": false,
"ssnDateVerified": "",
"ssnNotes": "",
"visaType": "",
"workAuthorization": "",
"workUntil": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"additionalDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"amount\": \"\",\n \"amountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"additionalRate\": [\n {\n \"changeReason\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"endCheckDate\": \"\",\n \"job\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"rateNotes\": \"\",\n \"ratePer\": \"\",\n \"shift\": \"\"\n }\n ],\n \"benefitSetup\": {\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n },\n \"birthDate\": \"\",\n \"coEmpCode\": \"\",\n \"companyFEIN\": \"\",\n \"companyName\": \"\",\n \"currency\": \"\",\n \"customBooleanFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": false\n }\n ],\n \"customDateFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customDropDownFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customNumberFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customTextFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"departmentPosition\": {\n \"changeReason\": \"\",\n \"clockBadgeNumber\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"employeeType\": \"\",\n \"equalEmploymentOpportunityClass\": \"\",\n \"isMinimumWageExempt\": false,\n \"isOvertimeExempt\": false,\n \"isSupervisorReviewer\": false,\n \"isUnionDuesCollected\": false,\n \"isUnionInitiationCollected\": false,\n \"jobTitle\": \"\",\n \"payGroup\": \"\",\n \"positionCode\": \"\",\n \"reviewerCompanyNumber\": \"\",\n \"reviewerEmployeeId\": \"\",\n \"shift\": \"\",\n \"supervisorCompanyNumber\": \"\",\n \"supervisorEmployeeId\": \"\",\n \"tipped\": \"\",\n \"unionAffiliationDate\": \"\",\n \"unionCode\": \"\",\n \"unionPosition\": \"\",\n \"workersCompensation\": \"\"\n },\n \"disabilityDescription\": \"\",\n \"emergencyContacts\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"homePhone\": \"\",\n \"lastName\": \"\",\n \"mobilePhone\": \"\",\n \"notes\": \"\",\n \"pager\": \"\",\n \"primaryPhone\": \"\",\n \"priority\": \"\",\n \"relationship\": \"\",\n \"state\": \"\",\n \"syncEmployeeInfo\": false,\n \"workExtension\": \"\",\n \"workPhone\": \"\",\n \"zip\": \"\"\n }\n ],\n \"employeeId\": \"\",\n \"ethnicity\": \"\",\n \"federalTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"taxCalculationCode\": \"\",\n \"w4FormYear\": 0\n },\n \"firstName\": \"\",\n \"gender\": \"\",\n \"homeAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"isHighlyCompensated\": false,\n \"isSmoker\": false,\n \"lastName\": \"\",\n \"localTax\": [\n {\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n }\n ],\n \"mainDirectDeposit\": {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n },\n \"maritalStatus\": \"\",\n \"middleName\": \"\",\n \"nonPrimaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"ownerPercent\": \"\",\n \"preferredName\": \"\",\n \"primaryPayRate\": {\n \"annualSalary\": \"\",\n \"baseRate\": \"\",\n \"beginCheckDate\": \"\",\n \"changeReason\": \"\",\n \"defaultHours\": \"\",\n \"effectiveDate\": \"\",\n \"isAutoPay\": false,\n \"payFrequency\": \"\",\n \"payGrade\": \"\",\n \"payRateNote\": \"\",\n \"payType\": \"\",\n \"ratePer\": \"\",\n \"salary\": \"\"\n },\n \"primaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"priorLastName\": \"\",\n \"salutation\": \"\",\n \"ssn\": \"\",\n \"status\": {\n \"adjustedSeniorityDate\": \"\",\n \"changeReason\": \"\",\n \"effectiveDate\": \"\",\n \"employeeStatus\": \"\",\n \"hireDate\": \"\",\n \"isEligibleForRehire\": false,\n \"reHireDate\": \"\",\n \"statusType\": \"\",\n \"terminationDate\": \"\"\n },\n \"suffix\": \"\",\n \"taxSetup\": {\n \"fitwExemptNotes\": \"\",\n \"fitwExemptReason\": \"\",\n \"futaExemptNotes\": \"\",\n \"futaExemptReason\": \"\",\n \"isEmployee943\": false,\n \"isPension\": false,\n \"isStatutory\": false,\n \"medExemptNotes\": \"\",\n \"medExemptReason\": \"\",\n \"sitwExemptNotes\": \"\",\n \"sitwExemptReason\": \"\",\n \"ssExemptNotes\": \"\",\n \"ssExemptReason\": \"\",\n \"suiExemptNotes\": \"\",\n \"suiExemptReason\": \"\",\n \"suiState\": \"\",\n \"taxDistributionCode1099R\": \"\",\n \"taxForm\": \"\"\n },\n \"veteranDescription\": \"\",\n \"webTime\": {\n \"badgeNumber\": \"\",\n \"chargeRate\": \"\",\n \"isTimeLaborEnabled\": false\n },\n \"workAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"location\": \"\",\n \"mailStop\": \"\",\n \"mobilePhone\": \"\",\n \"pager\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"workEligibility\": {\n \"alienOrAdmissionDocumentNumber\": \"\",\n \"attestedDate\": \"\",\n \"countryOfIssuance\": \"\",\n \"foreignPassportNumber\": \"\",\n \"i94AdmissionNumber\": \"\",\n \"i9DateVerified\": \"\",\n \"i9Notes\": \"\",\n \"isI9Verified\": false,\n \"isSsnVerified\": false,\n \"ssnDateVerified\": \"\",\n \"ssnNotes\": \"\",\n \"visaType\": \"\",\n \"workAuthorization\": \"\",\n \"workUntil\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/patch "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId" {:content-type :json
:form-params {:additionalDirectDeposit [{:accountNumber ""
:accountType ""
:amount ""
:amountType ""
:blockSpecial false
:isSkipPreNote false
:nameOnAccount ""
:preNoteDate ""
:routingNumber ""}]
:additionalRate [{:changeReason ""
:costCenter1 ""
:costCenter2 ""
:costCenter3 ""
:effectiveDate ""
:endCheckDate ""
:job ""
:rate ""
:rateCode ""
:rateNotes ""
:ratePer ""
:shift ""}]
:benefitSetup {:benefitClass ""
:benefitClassEffectiveDate ""
:benefitSalary ""
:benefitSalaryEffectiveDate ""
:doNotApplyAdministrativePeriod false
:isMeasureAcaEligibility false}
:birthDate ""
:coEmpCode ""
:companyFEIN ""
:companyName ""
:currency ""
:customBooleanFields [{:category ""
:label ""
:value false}]
:customDateFields [{:category ""
:label ""
:value ""}]
:customDropDownFields [{:category ""
:label ""
:value ""}]
:customNumberFields [{:category ""
:label ""
:value ""}]
:customTextFields [{:category ""
:label ""
:value ""}]
:departmentPosition {:changeReason ""
:clockBadgeNumber ""
:costCenter1 ""
:costCenter2 ""
:costCenter3 ""
:effectiveDate ""
:employeeType ""
:equalEmploymentOpportunityClass ""
:isMinimumWageExempt false
:isOvertimeExempt false
:isSupervisorReviewer false
:isUnionDuesCollected false
:isUnionInitiationCollected false
:jobTitle ""
:payGroup ""
:positionCode ""
:reviewerCompanyNumber ""
:reviewerEmployeeId ""
:shift ""
:supervisorCompanyNumber ""
:supervisorEmployeeId ""
:tipped ""
:unionAffiliationDate ""
:unionCode ""
:unionPosition ""
:workersCompensation ""}
:disabilityDescription ""
:emergencyContacts [{:address1 ""
:address2 ""
:city ""
:country ""
:county ""
:email ""
:firstName ""
:homePhone ""
:lastName ""
:mobilePhone ""
:notes ""
:pager ""
:primaryPhone ""
:priority ""
:relationship ""
:state ""
:syncEmployeeInfo false
:workExtension ""
:workPhone ""
:zip ""}]
:employeeId ""
:ethnicity ""
:federalTax {:amount ""
:deductionsAmount ""
:dependentsAmount ""
:exemptions ""
:filingStatus ""
:higherRate false
:otherIncomeAmount ""
:percentage ""
:taxCalculationCode ""
:w4FormYear 0}
:firstName ""
:gender ""
:homeAddress {:address1 ""
:address2 ""
:city ""
:country ""
:county ""
:emailAddress ""
:mobilePhone ""
:phone ""
:postalCode ""
:state ""}
:isHighlyCompensated false
:isSmoker false
:lastName ""
:localTax [{:exemptions ""
:exemptions2 ""
:filingStatus ""
:residentPSD ""
:taxCode ""
:workPSD ""}]
:mainDirectDeposit {:accountNumber ""
:accountType ""
:blockSpecial false
:isSkipPreNote false
:nameOnAccount ""
:preNoteDate ""
:routingNumber ""}
:maritalStatus ""
:middleName ""
:nonPrimaryStateTax {:amount ""
:deductionsAmount ""
:dependentsAmount ""
:exemptions ""
:exemptions2 ""
:filingStatus ""
:higherRate false
:otherIncomeAmount ""
:percentage ""
:reciprocityCode ""
:specialCheckCalc ""
:taxCalculationCode ""
:taxCode ""
:w4FormYear 0}
:ownerPercent ""
:preferredName ""
:primaryPayRate {:annualSalary ""
:baseRate ""
:beginCheckDate ""
:changeReason ""
:defaultHours ""
:effectiveDate ""
:isAutoPay false
:payFrequency ""
:payGrade ""
:payRateNote ""
:payType ""
:ratePer ""
:salary ""}
:primaryStateTax {:amount ""
:deductionsAmount ""
:dependentsAmount ""
:exemptions ""
:exemptions2 ""
:filingStatus ""
:higherRate false
:otherIncomeAmount ""
:percentage ""
:specialCheckCalc ""
:taxCalculationCode ""
:taxCode ""
:w4FormYear 0}
:priorLastName ""
:salutation ""
:ssn ""
:status {:adjustedSeniorityDate ""
:changeReason ""
:effectiveDate ""
:employeeStatus ""
:hireDate ""
:isEligibleForRehire false
:reHireDate ""
:statusType ""
:terminationDate ""}
:suffix ""
:taxSetup {:fitwExemptNotes ""
:fitwExemptReason ""
:futaExemptNotes ""
:futaExemptReason ""
:isEmployee943 false
:isPension false
:isStatutory false
:medExemptNotes ""
:medExemptReason ""
:sitwExemptNotes ""
:sitwExemptReason ""
:ssExemptNotes ""
:ssExemptReason ""
:suiExemptNotes ""
:suiExemptReason ""
:suiState ""
:taxDistributionCode1099R ""
:taxForm ""}
:veteranDescription ""
:webTime {:badgeNumber ""
:chargeRate ""
:isTimeLaborEnabled false}
:workAddress {:address1 ""
:address2 ""
:city ""
:country ""
:county ""
:emailAddress ""
:location ""
:mailStop ""
:mobilePhone ""
:pager ""
:phone ""
:phoneExtension ""
:postalCode ""
:state ""}
:workEligibility {:alienOrAdmissionDocumentNumber ""
:attestedDate ""
:countryOfIssuance ""
:foreignPassportNumber ""
:i94AdmissionNumber ""
:i9DateVerified ""
:i9Notes ""
:isI9Verified false
:isSsnVerified false
:ssnDateVerified ""
:ssnNotes ""
:visaType ""
:workAuthorization ""
:workUntil ""}}})
require "http/client"
url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"additionalDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"amount\": \"\",\n \"amountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"additionalRate\": [\n {\n \"changeReason\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"endCheckDate\": \"\",\n \"job\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"rateNotes\": \"\",\n \"ratePer\": \"\",\n \"shift\": \"\"\n }\n ],\n \"benefitSetup\": {\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n },\n \"birthDate\": \"\",\n \"coEmpCode\": \"\",\n \"companyFEIN\": \"\",\n \"companyName\": \"\",\n \"currency\": \"\",\n \"customBooleanFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": false\n }\n ],\n \"customDateFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customDropDownFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customNumberFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customTextFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"departmentPosition\": {\n \"changeReason\": \"\",\n \"clockBadgeNumber\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"employeeType\": \"\",\n \"equalEmploymentOpportunityClass\": \"\",\n \"isMinimumWageExempt\": false,\n \"isOvertimeExempt\": false,\n \"isSupervisorReviewer\": false,\n \"isUnionDuesCollected\": false,\n \"isUnionInitiationCollected\": false,\n \"jobTitle\": \"\",\n \"payGroup\": \"\",\n \"positionCode\": \"\",\n \"reviewerCompanyNumber\": \"\",\n \"reviewerEmployeeId\": \"\",\n \"shift\": \"\",\n \"supervisorCompanyNumber\": \"\",\n \"supervisorEmployeeId\": \"\",\n \"tipped\": \"\",\n \"unionAffiliationDate\": \"\",\n \"unionCode\": \"\",\n \"unionPosition\": \"\",\n \"workersCompensation\": \"\"\n },\n \"disabilityDescription\": \"\",\n \"emergencyContacts\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"homePhone\": \"\",\n \"lastName\": \"\",\n \"mobilePhone\": \"\",\n \"notes\": \"\",\n \"pager\": \"\",\n \"primaryPhone\": \"\",\n \"priority\": \"\",\n \"relationship\": \"\",\n \"state\": \"\",\n \"syncEmployeeInfo\": false,\n \"workExtension\": \"\",\n \"workPhone\": \"\",\n \"zip\": \"\"\n }\n ],\n \"employeeId\": \"\",\n \"ethnicity\": \"\",\n \"federalTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"taxCalculationCode\": \"\",\n \"w4FormYear\": 0\n },\n \"firstName\": \"\",\n \"gender\": \"\",\n \"homeAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"isHighlyCompensated\": false,\n \"isSmoker\": false,\n \"lastName\": \"\",\n \"localTax\": [\n {\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n }\n ],\n \"mainDirectDeposit\": {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n },\n \"maritalStatus\": \"\",\n \"middleName\": \"\",\n \"nonPrimaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"ownerPercent\": \"\",\n \"preferredName\": \"\",\n \"primaryPayRate\": {\n \"annualSalary\": \"\",\n \"baseRate\": \"\",\n \"beginCheckDate\": \"\",\n \"changeReason\": \"\",\n \"defaultHours\": \"\",\n \"effectiveDate\": \"\",\n \"isAutoPay\": false,\n \"payFrequency\": \"\",\n \"payGrade\": \"\",\n \"payRateNote\": \"\",\n \"payType\": \"\",\n \"ratePer\": \"\",\n \"salary\": \"\"\n },\n \"primaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"priorLastName\": \"\",\n \"salutation\": \"\",\n \"ssn\": \"\",\n \"status\": {\n \"adjustedSeniorityDate\": \"\",\n \"changeReason\": \"\",\n \"effectiveDate\": \"\",\n \"employeeStatus\": \"\",\n \"hireDate\": \"\",\n \"isEligibleForRehire\": false,\n \"reHireDate\": \"\",\n \"statusType\": \"\",\n \"terminationDate\": \"\"\n },\n \"suffix\": \"\",\n \"taxSetup\": {\n \"fitwExemptNotes\": \"\",\n \"fitwExemptReason\": \"\",\n \"futaExemptNotes\": \"\",\n \"futaExemptReason\": \"\",\n \"isEmployee943\": false,\n \"isPension\": false,\n \"isStatutory\": false,\n \"medExemptNotes\": \"\",\n \"medExemptReason\": \"\",\n \"sitwExemptNotes\": \"\",\n \"sitwExemptReason\": \"\",\n \"ssExemptNotes\": \"\",\n \"ssExemptReason\": \"\",\n \"suiExemptNotes\": \"\",\n \"suiExemptReason\": \"\",\n \"suiState\": \"\",\n \"taxDistributionCode1099R\": \"\",\n \"taxForm\": \"\"\n },\n \"veteranDescription\": \"\",\n \"webTime\": {\n \"badgeNumber\": \"\",\n \"chargeRate\": \"\",\n \"isTimeLaborEnabled\": false\n },\n \"workAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"location\": \"\",\n \"mailStop\": \"\",\n \"mobilePhone\": \"\",\n \"pager\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"workEligibility\": {\n \"alienOrAdmissionDocumentNumber\": \"\",\n \"attestedDate\": \"\",\n \"countryOfIssuance\": \"\",\n \"foreignPassportNumber\": \"\",\n \"i94AdmissionNumber\": \"\",\n \"i9DateVerified\": \"\",\n \"i9Notes\": \"\",\n \"isI9Verified\": false,\n \"isSsnVerified\": false,\n \"ssnDateVerified\": \"\",\n \"ssnNotes\": \"\",\n \"visaType\": \"\",\n \"workAuthorization\": \"\",\n \"workUntil\": \"\"\n }\n}"
response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Patch,
RequestUri = new Uri("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId"),
Content = new StringContent("{\n \"additionalDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"amount\": \"\",\n \"amountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"additionalRate\": [\n {\n \"changeReason\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"endCheckDate\": \"\",\n \"job\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"rateNotes\": \"\",\n \"ratePer\": \"\",\n \"shift\": \"\"\n }\n ],\n \"benefitSetup\": {\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n },\n \"birthDate\": \"\",\n \"coEmpCode\": \"\",\n \"companyFEIN\": \"\",\n \"companyName\": \"\",\n \"currency\": \"\",\n \"customBooleanFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": false\n }\n ],\n \"customDateFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customDropDownFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customNumberFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customTextFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"departmentPosition\": {\n \"changeReason\": \"\",\n \"clockBadgeNumber\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"employeeType\": \"\",\n \"equalEmploymentOpportunityClass\": \"\",\n \"isMinimumWageExempt\": false,\n \"isOvertimeExempt\": false,\n \"isSupervisorReviewer\": false,\n \"isUnionDuesCollected\": false,\n \"isUnionInitiationCollected\": false,\n \"jobTitle\": \"\",\n \"payGroup\": \"\",\n \"positionCode\": \"\",\n \"reviewerCompanyNumber\": \"\",\n \"reviewerEmployeeId\": \"\",\n \"shift\": \"\",\n \"supervisorCompanyNumber\": \"\",\n \"supervisorEmployeeId\": \"\",\n \"tipped\": \"\",\n \"unionAffiliationDate\": \"\",\n \"unionCode\": \"\",\n \"unionPosition\": \"\",\n \"workersCompensation\": \"\"\n },\n \"disabilityDescription\": \"\",\n \"emergencyContacts\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"homePhone\": \"\",\n \"lastName\": \"\",\n \"mobilePhone\": \"\",\n \"notes\": \"\",\n \"pager\": \"\",\n \"primaryPhone\": \"\",\n \"priority\": \"\",\n \"relationship\": \"\",\n \"state\": \"\",\n \"syncEmployeeInfo\": false,\n \"workExtension\": \"\",\n \"workPhone\": \"\",\n \"zip\": \"\"\n }\n ],\n \"employeeId\": \"\",\n \"ethnicity\": \"\",\n \"federalTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"taxCalculationCode\": \"\",\n \"w4FormYear\": 0\n },\n \"firstName\": \"\",\n \"gender\": \"\",\n \"homeAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"isHighlyCompensated\": false,\n \"isSmoker\": false,\n \"lastName\": \"\",\n \"localTax\": [\n {\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n }\n ],\n \"mainDirectDeposit\": {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n },\n \"maritalStatus\": \"\",\n \"middleName\": \"\",\n \"nonPrimaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"ownerPercent\": \"\",\n \"preferredName\": \"\",\n \"primaryPayRate\": {\n \"annualSalary\": \"\",\n \"baseRate\": \"\",\n \"beginCheckDate\": \"\",\n \"changeReason\": \"\",\n \"defaultHours\": \"\",\n \"effectiveDate\": \"\",\n \"isAutoPay\": false,\n \"payFrequency\": \"\",\n \"payGrade\": \"\",\n \"payRateNote\": \"\",\n \"payType\": \"\",\n \"ratePer\": \"\",\n \"salary\": \"\"\n },\n \"primaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"priorLastName\": \"\",\n \"salutation\": \"\",\n \"ssn\": \"\",\n \"status\": {\n \"adjustedSeniorityDate\": \"\",\n \"changeReason\": \"\",\n \"effectiveDate\": \"\",\n \"employeeStatus\": \"\",\n \"hireDate\": \"\",\n \"isEligibleForRehire\": false,\n \"reHireDate\": \"\",\n \"statusType\": \"\",\n \"terminationDate\": \"\"\n },\n \"suffix\": \"\",\n \"taxSetup\": {\n \"fitwExemptNotes\": \"\",\n \"fitwExemptReason\": \"\",\n \"futaExemptNotes\": \"\",\n \"futaExemptReason\": \"\",\n \"isEmployee943\": false,\n \"isPension\": false,\n \"isStatutory\": false,\n \"medExemptNotes\": \"\",\n \"medExemptReason\": \"\",\n \"sitwExemptNotes\": \"\",\n \"sitwExemptReason\": \"\",\n \"ssExemptNotes\": \"\",\n \"ssExemptReason\": \"\",\n \"suiExemptNotes\": \"\",\n \"suiExemptReason\": \"\",\n \"suiState\": \"\",\n \"taxDistributionCode1099R\": \"\",\n \"taxForm\": \"\"\n },\n \"veteranDescription\": \"\",\n \"webTime\": {\n \"badgeNumber\": \"\",\n \"chargeRate\": \"\",\n \"isTimeLaborEnabled\": false\n },\n \"workAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"location\": \"\",\n \"mailStop\": \"\",\n \"mobilePhone\": \"\",\n \"pager\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"workEligibility\": {\n \"alienOrAdmissionDocumentNumber\": \"\",\n \"attestedDate\": \"\",\n \"countryOfIssuance\": \"\",\n \"foreignPassportNumber\": \"\",\n \"i94AdmissionNumber\": \"\",\n \"i9DateVerified\": \"\",\n \"i9Notes\": \"\",\n \"isI9Verified\": false,\n \"isSsnVerified\": false,\n \"ssnDateVerified\": \"\",\n \"ssnNotes\": \"\",\n \"visaType\": \"\",\n \"workAuthorization\": \"\",\n \"workUntil\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"additionalDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"amount\": \"\",\n \"amountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"additionalRate\": [\n {\n \"changeReason\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"endCheckDate\": \"\",\n \"job\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"rateNotes\": \"\",\n \"ratePer\": \"\",\n \"shift\": \"\"\n }\n ],\n \"benefitSetup\": {\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n },\n \"birthDate\": \"\",\n \"coEmpCode\": \"\",\n \"companyFEIN\": \"\",\n \"companyName\": \"\",\n \"currency\": \"\",\n \"customBooleanFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": false\n }\n ],\n \"customDateFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customDropDownFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customNumberFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customTextFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"departmentPosition\": {\n \"changeReason\": \"\",\n \"clockBadgeNumber\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"employeeType\": \"\",\n \"equalEmploymentOpportunityClass\": \"\",\n \"isMinimumWageExempt\": false,\n \"isOvertimeExempt\": false,\n \"isSupervisorReviewer\": false,\n \"isUnionDuesCollected\": false,\n \"isUnionInitiationCollected\": false,\n \"jobTitle\": \"\",\n \"payGroup\": \"\",\n \"positionCode\": \"\",\n \"reviewerCompanyNumber\": \"\",\n \"reviewerEmployeeId\": \"\",\n \"shift\": \"\",\n \"supervisorCompanyNumber\": \"\",\n \"supervisorEmployeeId\": \"\",\n \"tipped\": \"\",\n \"unionAffiliationDate\": \"\",\n \"unionCode\": \"\",\n \"unionPosition\": \"\",\n \"workersCompensation\": \"\"\n },\n \"disabilityDescription\": \"\",\n \"emergencyContacts\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"homePhone\": \"\",\n \"lastName\": \"\",\n \"mobilePhone\": \"\",\n \"notes\": \"\",\n \"pager\": \"\",\n \"primaryPhone\": \"\",\n \"priority\": \"\",\n \"relationship\": \"\",\n \"state\": \"\",\n \"syncEmployeeInfo\": false,\n \"workExtension\": \"\",\n \"workPhone\": \"\",\n \"zip\": \"\"\n }\n ],\n \"employeeId\": \"\",\n \"ethnicity\": \"\",\n \"federalTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"taxCalculationCode\": \"\",\n \"w4FormYear\": 0\n },\n \"firstName\": \"\",\n \"gender\": \"\",\n \"homeAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"isHighlyCompensated\": false,\n \"isSmoker\": false,\n \"lastName\": \"\",\n \"localTax\": [\n {\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n }\n ],\n \"mainDirectDeposit\": {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n },\n \"maritalStatus\": \"\",\n \"middleName\": \"\",\n \"nonPrimaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"ownerPercent\": \"\",\n \"preferredName\": \"\",\n \"primaryPayRate\": {\n \"annualSalary\": \"\",\n \"baseRate\": \"\",\n \"beginCheckDate\": \"\",\n \"changeReason\": \"\",\n \"defaultHours\": \"\",\n \"effectiveDate\": \"\",\n \"isAutoPay\": false,\n \"payFrequency\": \"\",\n \"payGrade\": \"\",\n \"payRateNote\": \"\",\n \"payType\": \"\",\n \"ratePer\": \"\",\n \"salary\": \"\"\n },\n \"primaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"priorLastName\": \"\",\n \"salutation\": \"\",\n \"ssn\": \"\",\n \"status\": {\n \"adjustedSeniorityDate\": \"\",\n \"changeReason\": \"\",\n \"effectiveDate\": \"\",\n \"employeeStatus\": \"\",\n \"hireDate\": \"\",\n \"isEligibleForRehire\": false,\n \"reHireDate\": \"\",\n \"statusType\": \"\",\n \"terminationDate\": \"\"\n },\n \"suffix\": \"\",\n \"taxSetup\": {\n \"fitwExemptNotes\": \"\",\n \"fitwExemptReason\": \"\",\n \"futaExemptNotes\": \"\",\n \"futaExemptReason\": \"\",\n \"isEmployee943\": false,\n \"isPension\": false,\n \"isStatutory\": false,\n \"medExemptNotes\": \"\",\n \"medExemptReason\": \"\",\n \"sitwExemptNotes\": \"\",\n \"sitwExemptReason\": \"\",\n \"ssExemptNotes\": \"\",\n \"ssExemptReason\": \"\",\n \"suiExemptNotes\": \"\",\n \"suiExemptReason\": \"\",\n \"suiState\": \"\",\n \"taxDistributionCode1099R\": \"\",\n \"taxForm\": \"\"\n },\n \"veteranDescription\": \"\",\n \"webTime\": {\n \"badgeNumber\": \"\",\n \"chargeRate\": \"\",\n \"isTimeLaborEnabled\": false\n },\n \"workAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"location\": \"\",\n \"mailStop\": \"\",\n \"mobilePhone\": \"\",\n \"pager\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"workEligibility\": {\n \"alienOrAdmissionDocumentNumber\": \"\",\n \"attestedDate\": \"\",\n \"countryOfIssuance\": \"\",\n \"foreignPassportNumber\": \"\",\n \"i94AdmissionNumber\": \"\",\n \"i9DateVerified\": \"\",\n \"i9Notes\": \"\",\n \"isI9Verified\": false,\n \"isSsnVerified\": false,\n \"ssnDateVerified\": \"\",\n \"ssnNotes\": \"\",\n \"visaType\": \"\",\n \"workAuthorization\": \"\",\n \"workUntil\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId"
payload := strings.NewReader("{\n \"additionalDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"amount\": \"\",\n \"amountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"additionalRate\": [\n {\n \"changeReason\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"endCheckDate\": \"\",\n \"job\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"rateNotes\": \"\",\n \"ratePer\": \"\",\n \"shift\": \"\"\n }\n ],\n \"benefitSetup\": {\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n },\n \"birthDate\": \"\",\n \"coEmpCode\": \"\",\n \"companyFEIN\": \"\",\n \"companyName\": \"\",\n \"currency\": \"\",\n \"customBooleanFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": false\n }\n ],\n \"customDateFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customDropDownFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customNumberFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customTextFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"departmentPosition\": {\n \"changeReason\": \"\",\n \"clockBadgeNumber\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"employeeType\": \"\",\n \"equalEmploymentOpportunityClass\": \"\",\n \"isMinimumWageExempt\": false,\n \"isOvertimeExempt\": false,\n \"isSupervisorReviewer\": false,\n \"isUnionDuesCollected\": false,\n \"isUnionInitiationCollected\": false,\n \"jobTitle\": \"\",\n \"payGroup\": \"\",\n \"positionCode\": \"\",\n \"reviewerCompanyNumber\": \"\",\n \"reviewerEmployeeId\": \"\",\n \"shift\": \"\",\n \"supervisorCompanyNumber\": \"\",\n \"supervisorEmployeeId\": \"\",\n \"tipped\": \"\",\n \"unionAffiliationDate\": \"\",\n \"unionCode\": \"\",\n \"unionPosition\": \"\",\n \"workersCompensation\": \"\"\n },\n \"disabilityDescription\": \"\",\n \"emergencyContacts\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"homePhone\": \"\",\n \"lastName\": \"\",\n \"mobilePhone\": \"\",\n \"notes\": \"\",\n \"pager\": \"\",\n \"primaryPhone\": \"\",\n \"priority\": \"\",\n \"relationship\": \"\",\n \"state\": \"\",\n \"syncEmployeeInfo\": false,\n \"workExtension\": \"\",\n \"workPhone\": \"\",\n \"zip\": \"\"\n }\n ],\n \"employeeId\": \"\",\n \"ethnicity\": \"\",\n \"federalTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"taxCalculationCode\": \"\",\n \"w4FormYear\": 0\n },\n \"firstName\": \"\",\n \"gender\": \"\",\n \"homeAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"isHighlyCompensated\": false,\n \"isSmoker\": false,\n \"lastName\": \"\",\n \"localTax\": [\n {\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n }\n ],\n \"mainDirectDeposit\": {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n },\n \"maritalStatus\": \"\",\n \"middleName\": \"\",\n \"nonPrimaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"ownerPercent\": \"\",\n \"preferredName\": \"\",\n \"primaryPayRate\": {\n \"annualSalary\": \"\",\n \"baseRate\": \"\",\n \"beginCheckDate\": \"\",\n \"changeReason\": \"\",\n \"defaultHours\": \"\",\n \"effectiveDate\": \"\",\n \"isAutoPay\": false,\n \"payFrequency\": \"\",\n \"payGrade\": \"\",\n \"payRateNote\": \"\",\n \"payType\": \"\",\n \"ratePer\": \"\",\n \"salary\": \"\"\n },\n \"primaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"priorLastName\": \"\",\n \"salutation\": \"\",\n \"ssn\": \"\",\n \"status\": {\n \"adjustedSeniorityDate\": \"\",\n \"changeReason\": \"\",\n \"effectiveDate\": \"\",\n \"employeeStatus\": \"\",\n \"hireDate\": \"\",\n \"isEligibleForRehire\": false,\n \"reHireDate\": \"\",\n \"statusType\": \"\",\n \"terminationDate\": \"\"\n },\n \"suffix\": \"\",\n \"taxSetup\": {\n \"fitwExemptNotes\": \"\",\n \"fitwExemptReason\": \"\",\n \"futaExemptNotes\": \"\",\n \"futaExemptReason\": \"\",\n \"isEmployee943\": false,\n \"isPension\": false,\n \"isStatutory\": false,\n \"medExemptNotes\": \"\",\n \"medExemptReason\": \"\",\n \"sitwExemptNotes\": \"\",\n \"sitwExemptReason\": \"\",\n \"ssExemptNotes\": \"\",\n \"ssExemptReason\": \"\",\n \"suiExemptNotes\": \"\",\n \"suiExemptReason\": \"\",\n \"suiState\": \"\",\n \"taxDistributionCode1099R\": \"\",\n \"taxForm\": \"\"\n },\n \"veteranDescription\": \"\",\n \"webTime\": {\n \"badgeNumber\": \"\",\n \"chargeRate\": \"\",\n \"isTimeLaborEnabled\": false\n },\n \"workAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"location\": \"\",\n \"mailStop\": \"\",\n \"mobilePhone\": \"\",\n \"pager\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"workEligibility\": {\n \"alienOrAdmissionDocumentNumber\": \"\",\n \"attestedDate\": \"\",\n \"countryOfIssuance\": \"\",\n \"foreignPassportNumber\": \"\",\n \"i94AdmissionNumber\": \"\",\n \"i9DateVerified\": \"\",\n \"i9Notes\": \"\",\n \"isI9Verified\": false,\n \"isSsnVerified\": false,\n \"ssnDateVerified\": \"\",\n \"ssnNotes\": \"\",\n \"visaType\": \"\",\n \"workAuthorization\": \"\",\n \"workUntil\": \"\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PATCH /baseUrl/v2/companies/:companyId/employees/:employeeId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 6492
{
"additionalDirectDeposit": [
{
"accountNumber": "",
"accountType": "",
"amount": "",
"amountType": "",
"blockSpecial": false,
"isSkipPreNote": false,
"nameOnAccount": "",
"preNoteDate": "",
"routingNumber": ""
}
],
"additionalRate": [
{
"changeReason": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"endCheckDate": "",
"job": "",
"rate": "",
"rateCode": "",
"rateNotes": "",
"ratePer": "",
"shift": ""
}
],
"benefitSetup": {
"benefitClass": "",
"benefitClassEffectiveDate": "",
"benefitSalary": "",
"benefitSalaryEffectiveDate": "",
"doNotApplyAdministrativePeriod": false,
"isMeasureAcaEligibility": false
},
"birthDate": "",
"coEmpCode": "",
"companyFEIN": "",
"companyName": "",
"currency": "",
"customBooleanFields": [
{
"category": "",
"label": "",
"value": false
}
],
"customDateFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customDropDownFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customNumberFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customTextFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"departmentPosition": {
"changeReason": "",
"clockBadgeNumber": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"employeeType": "",
"equalEmploymentOpportunityClass": "",
"isMinimumWageExempt": false,
"isOvertimeExempt": false,
"isSupervisorReviewer": false,
"isUnionDuesCollected": false,
"isUnionInitiationCollected": false,
"jobTitle": "",
"payGroup": "",
"positionCode": "",
"reviewerCompanyNumber": "",
"reviewerEmployeeId": "",
"shift": "",
"supervisorCompanyNumber": "",
"supervisorEmployeeId": "",
"tipped": "",
"unionAffiliationDate": "",
"unionCode": "",
"unionPosition": "",
"workersCompensation": ""
},
"disabilityDescription": "",
"emergencyContacts": [
{
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"email": "",
"firstName": "",
"homePhone": "",
"lastName": "",
"mobilePhone": "",
"notes": "",
"pager": "",
"primaryPhone": "",
"priority": "",
"relationship": "",
"state": "",
"syncEmployeeInfo": false,
"workExtension": "",
"workPhone": "",
"zip": ""
}
],
"employeeId": "",
"ethnicity": "",
"federalTax": {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"taxCalculationCode": "",
"w4FormYear": 0
},
"firstName": "",
"gender": "",
"homeAddress": {
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"mobilePhone": "",
"phone": "",
"postalCode": "",
"state": ""
},
"isHighlyCompensated": false,
"isSmoker": false,
"lastName": "",
"localTax": [
{
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"residentPSD": "",
"taxCode": "",
"workPSD": ""
}
],
"mainDirectDeposit": {
"accountNumber": "",
"accountType": "",
"blockSpecial": false,
"isSkipPreNote": false,
"nameOnAccount": "",
"preNoteDate": "",
"routingNumber": ""
},
"maritalStatus": "",
"middleName": "",
"nonPrimaryStateTax": {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"reciprocityCode": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
},
"ownerPercent": "",
"preferredName": "",
"primaryPayRate": {
"annualSalary": "",
"baseRate": "",
"beginCheckDate": "",
"changeReason": "",
"defaultHours": "",
"effectiveDate": "",
"isAutoPay": false,
"payFrequency": "",
"payGrade": "",
"payRateNote": "",
"payType": "",
"ratePer": "",
"salary": ""
},
"primaryStateTax": {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
},
"priorLastName": "",
"salutation": "",
"ssn": "",
"status": {
"adjustedSeniorityDate": "",
"changeReason": "",
"effectiveDate": "",
"employeeStatus": "",
"hireDate": "",
"isEligibleForRehire": false,
"reHireDate": "",
"statusType": "",
"terminationDate": ""
},
"suffix": "",
"taxSetup": {
"fitwExemptNotes": "",
"fitwExemptReason": "",
"futaExemptNotes": "",
"futaExemptReason": "",
"isEmployee943": false,
"isPension": false,
"isStatutory": false,
"medExemptNotes": "",
"medExemptReason": "",
"sitwExemptNotes": "",
"sitwExemptReason": "",
"ssExemptNotes": "",
"ssExemptReason": "",
"suiExemptNotes": "",
"suiExemptReason": "",
"suiState": "",
"taxDistributionCode1099R": "",
"taxForm": ""
},
"veteranDescription": "",
"webTime": {
"badgeNumber": "",
"chargeRate": "",
"isTimeLaborEnabled": false
},
"workAddress": {
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"location": "",
"mailStop": "",
"mobilePhone": "",
"pager": "",
"phone": "",
"phoneExtension": "",
"postalCode": "",
"state": ""
},
"workEligibility": {
"alienOrAdmissionDocumentNumber": "",
"attestedDate": "",
"countryOfIssuance": "",
"foreignPassportNumber": "",
"i94AdmissionNumber": "",
"i9DateVerified": "",
"i9Notes": "",
"isI9Verified": false,
"isSsnVerified": false,
"ssnDateVerified": "",
"ssnNotes": "",
"visaType": "",
"workAuthorization": "",
"workUntil": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId")
.setHeader("content-type", "application/json")
.setBody("{\n \"additionalDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"amount\": \"\",\n \"amountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"additionalRate\": [\n {\n \"changeReason\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"endCheckDate\": \"\",\n \"job\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"rateNotes\": \"\",\n \"ratePer\": \"\",\n \"shift\": \"\"\n }\n ],\n \"benefitSetup\": {\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n },\n \"birthDate\": \"\",\n \"coEmpCode\": \"\",\n \"companyFEIN\": \"\",\n \"companyName\": \"\",\n \"currency\": \"\",\n \"customBooleanFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": false\n }\n ],\n \"customDateFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customDropDownFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customNumberFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customTextFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"departmentPosition\": {\n \"changeReason\": \"\",\n \"clockBadgeNumber\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"employeeType\": \"\",\n \"equalEmploymentOpportunityClass\": \"\",\n \"isMinimumWageExempt\": false,\n \"isOvertimeExempt\": false,\n \"isSupervisorReviewer\": false,\n \"isUnionDuesCollected\": false,\n \"isUnionInitiationCollected\": false,\n \"jobTitle\": \"\",\n \"payGroup\": \"\",\n \"positionCode\": \"\",\n \"reviewerCompanyNumber\": \"\",\n \"reviewerEmployeeId\": \"\",\n \"shift\": \"\",\n \"supervisorCompanyNumber\": \"\",\n \"supervisorEmployeeId\": \"\",\n \"tipped\": \"\",\n \"unionAffiliationDate\": \"\",\n \"unionCode\": \"\",\n \"unionPosition\": \"\",\n \"workersCompensation\": \"\"\n },\n \"disabilityDescription\": \"\",\n \"emergencyContacts\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"homePhone\": \"\",\n \"lastName\": \"\",\n \"mobilePhone\": \"\",\n \"notes\": \"\",\n \"pager\": \"\",\n \"primaryPhone\": \"\",\n \"priority\": \"\",\n \"relationship\": \"\",\n \"state\": \"\",\n \"syncEmployeeInfo\": false,\n \"workExtension\": \"\",\n \"workPhone\": \"\",\n \"zip\": \"\"\n }\n ],\n \"employeeId\": \"\",\n \"ethnicity\": \"\",\n \"federalTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"taxCalculationCode\": \"\",\n \"w4FormYear\": 0\n },\n \"firstName\": \"\",\n \"gender\": \"\",\n \"homeAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"isHighlyCompensated\": false,\n \"isSmoker\": false,\n \"lastName\": \"\",\n \"localTax\": [\n {\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n }\n ],\n \"mainDirectDeposit\": {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n },\n \"maritalStatus\": \"\",\n \"middleName\": \"\",\n \"nonPrimaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"ownerPercent\": \"\",\n \"preferredName\": \"\",\n \"primaryPayRate\": {\n \"annualSalary\": \"\",\n \"baseRate\": \"\",\n \"beginCheckDate\": \"\",\n \"changeReason\": \"\",\n \"defaultHours\": \"\",\n \"effectiveDate\": \"\",\n \"isAutoPay\": false,\n \"payFrequency\": \"\",\n \"payGrade\": \"\",\n \"payRateNote\": \"\",\n \"payType\": \"\",\n \"ratePer\": \"\",\n \"salary\": \"\"\n },\n \"primaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"priorLastName\": \"\",\n \"salutation\": \"\",\n \"ssn\": \"\",\n \"status\": {\n \"adjustedSeniorityDate\": \"\",\n \"changeReason\": \"\",\n \"effectiveDate\": \"\",\n \"employeeStatus\": \"\",\n \"hireDate\": \"\",\n \"isEligibleForRehire\": false,\n \"reHireDate\": \"\",\n \"statusType\": \"\",\n \"terminationDate\": \"\"\n },\n \"suffix\": \"\",\n \"taxSetup\": {\n \"fitwExemptNotes\": \"\",\n \"fitwExemptReason\": \"\",\n \"futaExemptNotes\": \"\",\n \"futaExemptReason\": \"\",\n \"isEmployee943\": false,\n \"isPension\": false,\n \"isStatutory\": false,\n \"medExemptNotes\": \"\",\n \"medExemptReason\": \"\",\n \"sitwExemptNotes\": \"\",\n \"sitwExemptReason\": \"\",\n \"ssExemptNotes\": \"\",\n \"ssExemptReason\": \"\",\n \"suiExemptNotes\": \"\",\n \"suiExemptReason\": \"\",\n \"suiState\": \"\",\n \"taxDistributionCode1099R\": \"\",\n \"taxForm\": \"\"\n },\n \"veteranDescription\": \"\",\n \"webTime\": {\n \"badgeNumber\": \"\",\n \"chargeRate\": \"\",\n \"isTimeLaborEnabled\": false\n },\n \"workAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"location\": \"\",\n \"mailStop\": \"\",\n \"mobilePhone\": \"\",\n \"pager\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"workEligibility\": {\n \"alienOrAdmissionDocumentNumber\": \"\",\n \"attestedDate\": \"\",\n \"countryOfIssuance\": \"\",\n \"foreignPassportNumber\": \"\",\n \"i94AdmissionNumber\": \"\",\n \"i9DateVerified\": \"\",\n \"i9Notes\": \"\",\n \"isI9Verified\": false,\n \"isSsnVerified\": false,\n \"ssnDateVerified\": \"\",\n \"ssnNotes\": \"\",\n \"visaType\": \"\",\n \"workAuthorization\": \"\",\n \"workUntil\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId"))
.header("content-type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString("{\n \"additionalDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"amount\": \"\",\n \"amountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"additionalRate\": [\n {\n \"changeReason\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"endCheckDate\": \"\",\n \"job\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"rateNotes\": \"\",\n \"ratePer\": \"\",\n \"shift\": \"\"\n }\n ],\n \"benefitSetup\": {\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n },\n \"birthDate\": \"\",\n \"coEmpCode\": \"\",\n \"companyFEIN\": \"\",\n \"companyName\": \"\",\n \"currency\": \"\",\n \"customBooleanFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": false\n }\n ],\n \"customDateFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customDropDownFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customNumberFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customTextFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"departmentPosition\": {\n \"changeReason\": \"\",\n \"clockBadgeNumber\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"employeeType\": \"\",\n \"equalEmploymentOpportunityClass\": \"\",\n \"isMinimumWageExempt\": false,\n \"isOvertimeExempt\": false,\n \"isSupervisorReviewer\": false,\n \"isUnionDuesCollected\": false,\n \"isUnionInitiationCollected\": false,\n \"jobTitle\": \"\",\n \"payGroup\": \"\",\n \"positionCode\": \"\",\n \"reviewerCompanyNumber\": \"\",\n \"reviewerEmployeeId\": \"\",\n \"shift\": \"\",\n \"supervisorCompanyNumber\": \"\",\n \"supervisorEmployeeId\": \"\",\n \"tipped\": \"\",\n \"unionAffiliationDate\": \"\",\n \"unionCode\": \"\",\n \"unionPosition\": \"\",\n \"workersCompensation\": \"\"\n },\n \"disabilityDescription\": \"\",\n \"emergencyContacts\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"homePhone\": \"\",\n \"lastName\": \"\",\n \"mobilePhone\": \"\",\n \"notes\": \"\",\n \"pager\": \"\",\n \"primaryPhone\": \"\",\n \"priority\": \"\",\n \"relationship\": \"\",\n \"state\": \"\",\n \"syncEmployeeInfo\": false,\n \"workExtension\": \"\",\n \"workPhone\": \"\",\n \"zip\": \"\"\n }\n ],\n \"employeeId\": \"\",\n \"ethnicity\": \"\",\n \"federalTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"taxCalculationCode\": \"\",\n \"w4FormYear\": 0\n },\n \"firstName\": \"\",\n \"gender\": \"\",\n \"homeAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"isHighlyCompensated\": false,\n \"isSmoker\": false,\n \"lastName\": \"\",\n \"localTax\": [\n {\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n }\n ],\n \"mainDirectDeposit\": {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n },\n \"maritalStatus\": \"\",\n \"middleName\": \"\",\n \"nonPrimaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"ownerPercent\": \"\",\n \"preferredName\": \"\",\n \"primaryPayRate\": {\n \"annualSalary\": \"\",\n \"baseRate\": \"\",\n \"beginCheckDate\": \"\",\n \"changeReason\": \"\",\n \"defaultHours\": \"\",\n \"effectiveDate\": \"\",\n \"isAutoPay\": false,\n \"payFrequency\": \"\",\n \"payGrade\": \"\",\n \"payRateNote\": \"\",\n \"payType\": \"\",\n \"ratePer\": \"\",\n \"salary\": \"\"\n },\n \"primaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"priorLastName\": \"\",\n \"salutation\": \"\",\n \"ssn\": \"\",\n \"status\": {\n \"adjustedSeniorityDate\": \"\",\n \"changeReason\": \"\",\n \"effectiveDate\": \"\",\n \"employeeStatus\": \"\",\n \"hireDate\": \"\",\n \"isEligibleForRehire\": false,\n \"reHireDate\": \"\",\n \"statusType\": \"\",\n \"terminationDate\": \"\"\n },\n \"suffix\": \"\",\n \"taxSetup\": {\n \"fitwExemptNotes\": \"\",\n \"fitwExemptReason\": \"\",\n \"futaExemptNotes\": \"\",\n \"futaExemptReason\": \"\",\n \"isEmployee943\": false,\n \"isPension\": false,\n \"isStatutory\": false,\n \"medExemptNotes\": \"\",\n \"medExemptReason\": \"\",\n \"sitwExemptNotes\": \"\",\n \"sitwExemptReason\": \"\",\n \"ssExemptNotes\": \"\",\n \"ssExemptReason\": \"\",\n \"suiExemptNotes\": \"\",\n \"suiExemptReason\": \"\",\n \"suiState\": \"\",\n \"taxDistributionCode1099R\": \"\",\n \"taxForm\": \"\"\n },\n \"veteranDescription\": \"\",\n \"webTime\": {\n \"badgeNumber\": \"\",\n \"chargeRate\": \"\",\n \"isTimeLaborEnabled\": false\n },\n \"workAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"location\": \"\",\n \"mailStop\": \"\",\n \"mobilePhone\": \"\",\n \"pager\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"workEligibility\": {\n \"alienOrAdmissionDocumentNumber\": \"\",\n \"attestedDate\": \"\",\n \"countryOfIssuance\": \"\",\n \"foreignPassportNumber\": \"\",\n \"i94AdmissionNumber\": \"\",\n \"i9DateVerified\": \"\",\n \"i9Notes\": \"\",\n \"isI9Verified\": false,\n \"isSsnVerified\": false,\n \"ssnDateVerified\": \"\",\n \"ssnNotes\": \"\",\n \"visaType\": \"\",\n \"workAuthorization\": \"\",\n \"workUntil\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"additionalDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"amount\": \"\",\n \"amountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"additionalRate\": [\n {\n \"changeReason\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"endCheckDate\": \"\",\n \"job\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"rateNotes\": \"\",\n \"ratePer\": \"\",\n \"shift\": \"\"\n }\n ],\n \"benefitSetup\": {\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n },\n \"birthDate\": \"\",\n \"coEmpCode\": \"\",\n \"companyFEIN\": \"\",\n \"companyName\": \"\",\n \"currency\": \"\",\n \"customBooleanFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": false\n }\n ],\n \"customDateFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customDropDownFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customNumberFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customTextFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"departmentPosition\": {\n \"changeReason\": \"\",\n \"clockBadgeNumber\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"employeeType\": \"\",\n \"equalEmploymentOpportunityClass\": \"\",\n \"isMinimumWageExempt\": false,\n \"isOvertimeExempt\": false,\n \"isSupervisorReviewer\": false,\n \"isUnionDuesCollected\": false,\n \"isUnionInitiationCollected\": false,\n \"jobTitle\": \"\",\n \"payGroup\": \"\",\n \"positionCode\": \"\",\n \"reviewerCompanyNumber\": \"\",\n \"reviewerEmployeeId\": \"\",\n \"shift\": \"\",\n \"supervisorCompanyNumber\": \"\",\n \"supervisorEmployeeId\": \"\",\n \"tipped\": \"\",\n \"unionAffiliationDate\": \"\",\n \"unionCode\": \"\",\n \"unionPosition\": \"\",\n \"workersCompensation\": \"\"\n },\n \"disabilityDescription\": \"\",\n \"emergencyContacts\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"homePhone\": \"\",\n \"lastName\": \"\",\n \"mobilePhone\": \"\",\n \"notes\": \"\",\n \"pager\": \"\",\n \"primaryPhone\": \"\",\n \"priority\": \"\",\n \"relationship\": \"\",\n \"state\": \"\",\n \"syncEmployeeInfo\": false,\n \"workExtension\": \"\",\n \"workPhone\": \"\",\n \"zip\": \"\"\n }\n ],\n \"employeeId\": \"\",\n \"ethnicity\": \"\",\n \"federalTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"taxCalculationCode\": \"\",\n \"w4FormYear\": 0\n },\n \"firstName\": \"\",\n \"gender\": \"\",\n \"homeAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"isHighlyCompensated\": false,\n \"isSmoker\": false,\n \"lastName\": \"\",\n \"localTax\": [\n {\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n }\n ],\n \"mainDirectDeposit\": {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n },\n \"maritalStatus\": \"\",\n \"middleName\": \"\",\n \"nonPrimaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"ownerPercent\": \"\",\n \"preferredName\": \"\",\n \"primaryPayRate\": {\n \"annualSalary\": \"\",\n \"baseRate\": \"\",\n \"beginCheckDate\": \"\",\n \"changeReason\": \"\",\n \"defaultHours\": \"\",\n \"effectiveDate\": \"\",\n \"isAutoPay\": false,\n \"payFrequency\": \"\",\n \"payGrade\": \"\",\n \"payRateNote\": \"\",\n \"payType\": \"\",\n \"ratePer\": \"\",\n \"salary\": \"\"\n },\n \"primaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"priorLastName\": \"\",\n \"salutation\": \"\",\n \"ssn\": \"\",\n \"status\": {\n \"adjustedSeniorityDate\": \"\",\n \"changeReason\": \"\",\n \"effectiveDate\": \"\",\n \"employeeStatus\": \"\",\n \"hireDate\": \"\",\n \"isEligibleForRehire\": false,\n \"reHireDate\": \"\",\n \"statusType\": \"\",\n \"terminationDate\": \"\"\n },\n \"suffix\": \"\",\n \"taxSetup\": {\n \"fitwExemptNotes\": \"\",\n \"fitwExemptReason\": \"\",\n \"futaExemptNotes\": \"\",\n \"futaExemptReason\": \"\",\n \"isEmployee943\": false,\n \"isPension\": false,\n \"isStatutory\": false,\n \"medExemptNotes\": \"\",\n \"medExemptReason\": \"\",\n \"sitwExemptNotes\": \"\",\n \"sitwExemptReason\": \"\",\n \"ssExemptNotes\": \"\",\n \"ssExemptReason\": \"\",\n \"suiExemptNotes\": \"\",\n \"suiExemptReason\": \"\",\n \"suiState\": \"\",\n \"taxDistributionCode1099R\": \"\",\n \"taxForm\": \"\"\n },\n \"veteranDescription\": \"\",\n \"webTime\": {\n \"badgeNumber\": \"\",\n \"chargeRate\": \"\",\n \"isTimeLaborEnabled\": false\n },\n \"workAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"location\": \"\",\n \"mailStop\": \"\",\n \"mobilePhone\": \"\",\n \"pager\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"workEligibility\": {\n \"alienOrAdmissionDocumentNumber\": \"\",\n \"attestedDate\": \"\",\n \"countryOfIssuance\": \"\",\n \"foreignPassportNumber\": \"\",\n \"i94AdmissionNumber\": \"\",\n \"i9DateVerified\": \"\",\n \"i9Notes\": \"\",\n \"isI9Verified\": false,\n \"isSsnVerified\": false,\n \"ssnDateVerified\": \"\",\n \"ssnNotes\": \"\",\n \"visaType\": \"\",\n \"workAuthorization\": \"\",\n \"workUntil\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId")
.patch(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId")
.header("content-type", "application/json")
.body("{\n \"additionalDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"amount\": \"\",\n \"amountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"additionalRate\": [\n {\n \"changeReason\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"endCheckDate\": \"\",\n \"job\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"rateNotes\": \"\",\n \"ratePer\": \"\",\n \"shift\": \"\"\n }\n ],\n \"benefitSetup\": {\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n },\n \"birthDate\": \"\",\n \"coEmpCode\": \"\",\n \"companyFEIN\": \"\",\n \"companyName\": \"\",\n \"currency\": \"\",\n \"customBooleanFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": false\n }\n ],\n \"customDateFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customDropDownFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customNumberFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customTextFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"departmentPosition\": {\n \"changeReason\": \"\",\n \"clockBadgeNumber\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"employeeType\": \"\",\n \"equalEmploymentOpportunityClass\": \"\",\n \"isMinimumWageExempt\": false,\n \"isOvertimeExempt\": false,\n \"isSupervisorReviewer\": false,\n \"isUnionDuesCollected\": false,\n \"isUnionInitiationCollected\": false,\n \"jobTitle\": \"\",\n \"payGroup\": \"\",\n \"positionCode\": \"\",\n \"reviewerCompanyNumber\": \"\",\n \"reviewerEmployeeId\": \"\",\n \"shift\": \"\",\n \"supervisorCompanyNumber\": \"\",\n \"supervisorEmployeeId\": \"\",\n \"tipped\": \"\",\n \"unionAffiliationDate\": \"\",\n \"unionCode\": \"\",\n \"unionPosition\": \"\",\n \"workersCompensation\": \"\"\n },\n \"disabilityDescription\": \"\",\n \"emergencyContacts\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"homePhone\": \"\",\n \"lastName\": \"\",\n \"mobilePhone\": \"\",\n \"notes\": \"\",\n \"pager\": \"\",\n \"primaryPhone\": \"\",\n \"priority\": \"\",\n \"relationship\": \"\",\n \"state\": \"\",\n \"syncEmployeeInfo\": false,\n \"workExtension\": \"\",\n \"workPhone\": \"\",\n \"zip\": \"\"\n }\n ],\n \"employeeId\": \"\",\n \"ethnicity\": \"\",\n \"federalTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"taxCalculationCode\": \"\",\n \"w4FormYear\": 0\n },\n \"firstName\": \"\",\n \"gender\": \"\",\n \"homeAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"isHighlyCompensated\": false,\n \"isSmoker\": false,\n \"lastName\": \"\",\n \"localTax\": [\n {\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n }\n ],\n \"mainDirectDeposit\": {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n },\n \"maritalStatus\": \"\",\n \"middleName\": \"\",\n \"nonPrimaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"ownerPercent\": \"\",\n \"preferredName\": \"\",\n \"primaryPayRate\": {\n \"annualSalary\": \"\",\n \"baseRate\": \"\",\n \"beginCheckDate\": \"\",\n \"changeReason\": \"\",\n \"defaultHours\": \"\",\n \"effectiveDate\": \"\",\n \"isAutoPay\": false,\n \"payFrequency\": \"\",\n \"payGrade\": \"\",\n \"payRateNote\": \"\",\n \"payType\": \"\",\n \"ratePer\": \"\",\n \"salary\": \"\"\n },\n \"primaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"priorLastName\": \"\",\n \"salutation\": \"\",\n \"ssn\": \"\",\n \"status\": {\n \"adjustedSeniorityDate\": \"\",\n \"changeReason\": \"\",\n \"effectiveDate\": \"\",\n \"employeeStatus\": \"\",\n \"hireDate\": \"\",\n \"isEligibleForRehire\": false,\n \"reHireDate\": \"\",\n \"statusType\": \"\",\n \"terminationDate\": \"\"\n },\n \"suffix\": \"\",\n \"taxSetup\": {\n \"fitwExemptNotes\": \"\",\n \"fitwExemptReason\": \"\",\n \"futaExemptNotes\": \"\",\n \"futaExemptReason\": \"\",\n \"isEmployee943\": false,\n \"isPension\": false,\n \"isStatutory\": false,\n \"medExemptNotes\": \"\",\n \"medExemptReason\": \"\",\n \"sitwExemptNotes\": \"\",\n \"sitwExemptReason\": \"\",\n \"ssExemptNotes\": \"\",\n \"ssExemptReason\": \"\",\n \"suiExemptNotes\": \"\",\n \"suiExemptReason\": \"\",\n \"suiState\": \"\",\n \"taxDistributionCode1099R\": \"\",\n \"taxForm\": \"\"\n },\n \"veteranDescription\": \"\",\n \"webTime\": {\n \"badgeNumber\": \"\",\n \"chargeRate\": \"\",\n \"isTimeLaborEnabled\": false\n },\n \"workAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"location\": \"\",\n \"mailStop\": \"\",\n \"mobilePhone\": \"\",\n \"pager\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"workEligibility\": {\n \"alienOrAdmissionDocumentNumber\": \"\",\n \"attestedDate\": \"\",\n \"countryOfIssuance\": \"\",\n \"foreignPassportNumber\": \"\",\n \"i94AdmissionNumber\": \"\",\n \"i9DateVerified\": \"\",\n \"i9Notes\": \"\",\n \"isI9Verified\": false,\n \"isSsnVerified\": false,\n \"ssnDateVerified\": \"\",\n \"ssnNotes\": \"\",\n \"visaType\": \"\",\n \"workAuthorization\": \"\",\n \"workUntil\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
additionalDirectDeposit: [
{
accountNumber: '',
accountType: '',
amount: '',
amountType: '',
blockSpecial: false,
isSkipPreNote: false,
nameOnAccount: '',
preNoteDate: '',
routingNumber: ''
}
],
additionalRate: [
{
changeReason: '',
costCenter1: '',
costCenter2: '',
costCenter3: '',
effectiveDate: '',
endCheckDate: '',
job: '',
rate: '',
rateCode: '',
rateNotes: '',
ratePer: '',
shift: ''
}
],
benefitSetup: {
benefitClass: '',
benefitClassEffectiveDate: '',
benefitSalary: '',
benefitSalaryEffectiveDate: '',
doNotApplyAdministrativePeriod: false,
isMeasureAcaEligibility: false
},
birthDate: '',
coEmpCode: '',
companyFEIN: '',
companyName: '',
currency: '',
customBooleanFields: [
{
category: '',
label: '',
value: false
}
],
customDateFields: [
{
category: '',
label: '',
value: ''
}
],
customDropDownFields: [
{
category: '',
label: '',
value: ''
}
],
customNumberFields: [
{
category: '',
label: '',
value: ''
}
],
customTextFields: [
{
category: '',
label: '',
value: ''
}
],
departmentPosition: {
changeReason: '',
clockBadgeNumber: '',
costCenter1: '',
costCenter2: '',
costCenter3: '',
effectiveDate: '',
employeeType: '',
equalEmploymentOpportunityClass: '',
isMinimumWageExempt: false,
isOvertimeExempt: false,
isSupervisorReviewer: false,
isUnionDuesCollected: false,
isUnionInitiationCollected: false,
jobTitle: '',
payGroup: '',
positionCode: '',
reviewerCompanyNumber: '',
reviewerEmployeeId: '',
shift: '',
supervisorCompanyNumber: '',
supervisorEmployeeId: '',
tipped: '',
unionAffiliationDate: '',
unionCode: '',
unionPosition: '',
workersCompensation: ''
},
disabilityDescription: '',
emergencyContacts: [
{
address1: '',
address2: '',
city: '',
country: '',
county: '',
email: '',
firstName: '',
homePhone: '',
lastName: '',
mobilePhone: '',
notes: '',
pager: '',
primaryPhone: '',
priority: '',
relationship: '',
state: '',
syncEmployeeInfo: false,
workExtension: '',
workPhone: '',
zip: ''
}
],
employeeId: '',
ethnicity: '',
federalTax: {
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
taxCalculationCode: '',
w4FormYear: 0
},
firstName: '',
gender: '',
homeAddress: {
address1: '',
address2: '',
city: '',
country: '',
county: '',
emailAddress: '',
mobilePhone: '',
phone: '',
postalCode: '',
state: ''
},
isHighlyCompensated: false,
isSmoker: false,
lastName: '',
localTax: [
{
exemptions: '',
exemptions2: '',
filingStatus: '',
residentPSD: '',
taxCode: '',
workPSD: ''
}
],
mainDirectDeposit: {
accountNumber: '',
accountType: '',
blockSpecial: false,
isSkipPreNote: false,
nameOnAccount: '',
preNoteDate: '',
routingNumber: ''
},
maritalStatus: '',
middleName: '',
nonPrimaryStateTax: {
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
exemptions2: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
reciprocityCode: '',
specialCheckCalc: '',
taxCalculationCode: '',
taxCode: '',
w4FormYear: 0
},
ownerPercent: '',
preferredName: '',
primaryPayRate: {
annualSalary: '',
baseRate: '',
beginCheckDate: '',
changeReason: '',
defaultHours: '',
effectiveDate: '',
isAutoPay: false,
payFrequency: '',
payGrade: '',
payRateNote: '',
payType: '',
ratePer: '',
salary: ''
},
primaryStateTax: {
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
exemptions2: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
specialCheckCalc: '',
taxCalculationCode: '',
taxCode: '',
w4FormYear: 0
},
priorLastName: '',
salutation: '',
ssn: '',
status: {
adjustedSeniorityDate: '',
changeReason: '',
effectiveDate: '',
employeeStatus: '',
hireDate: '',
isEligibleForRehire: false,
reHireDate: '',
statusType: '',
terminationDate: ''
},
suffix: '',
taxSetup: {
fitwExemptNotes: '',
fitwExemptReason: '',
futaExemptNotes: '',
futaExemptReason: '',
isEmployee943: false,
isPension: false,
isStatutory: false,
medExemptNotes: '',
medExemptReason: '',
sitwExemptNotes: '',
sitwExemptReason: '',
ssExemptNotes: '',
ssExemptReason: '',
suiExemptNotes: '',
suiExemptReason: '',
suiState: '',
taxDistributionCode1099R: '',
taxForm: ''
},
veteranDescription: '',
webTime: {
badgeNumber: '',
chargeRate: '',
isTimeLaborEnabled: false
},
workAddress: {
address1: '',
address2: '',
city: '',
country: '',
county: '',
emailAddress: '',
location: '',
mailStop: '',
mobilePhone: '',
pager: '',
phone: '',
phoneExtension: '',
postalCode: '',
state: ''
},
workEligibility: {
alienOrAdmissionDocumentNumber: '',
attestedDate: '',
countryOfIssuance: '',
foreignPassportNumber: '',
i94AdmissionNumber: '',
i9DateVerified: '',
i9Notes: '',
isI9Verified: false,
isSsnVerified: false,
ssnDateVerified: '',
ssnNotes: '',
visaType: '',
workAuthorization: '',
workUntil: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PATCH', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PATCH',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId',
headers: {'content-type': 'application/json'},
data: {
additionalDirectDeposit: [
{
accountNumber: '',
accountType: '',
amount: '',
amountType: '',
blockSpecial: false,
isSkipPreNote: false,
nameOnAccount: '',
preNoteDate: '',
routingNumber: ''
}
],
additionalRate: [
{
changeReason: '',
costCenter1: '',
costCenter2: '',
costCenter3: '',
effectiveDate: '',
endCheckDate: '',
job: '',
rate: '',
rateCode: '',
rateNotes: '',
ratePer: '',
shift: ''
}
],
benefitSetup: {
benefitClass: '',
benefitClassEffectiveDate: '',
benefitSalary: '',
benefitSalaryEffectiveDate: '',
doNotApplyAdministrativePeriod: false,
isMeasureAcaEligibility: false
},
birthDate: '',
coEmpCode: '',
companyFEIN: '',
companyName: '',
currency: '',
customBooleanFields: [{category: '', label: '', value: false}],
customDateFields: [{category: '', label: '', value: ''}],
customDropDownFields: [{category: '', label: '', value: ''}],
customNumberFields: [{category: '', label: '', value: ''}],
customTextFields: [{category: '', label: '', value: ''}],
departmentPosition: {
changeReason: '',
clockBadgeNumber: '',
costCenter1: '',
costCenter2: '',
costCenter3: '',
effectiveDate: '',
employeeType: '',
equalEmploymentOpportunityClass: '',
isMinimumWageExempt: false,
isOvertimeExempt: false,
isSupervisorReviewer: false,
isUnionDuesCollected: false,
isUnionInitiationCollected: false,
jobTitle: '',
payGroup: '',
positionCode: '',
reviewerCompanyNumber: '',
reviewerEmployeeId: '',
shift: '',
supervisorCompanyNumber: '',
supervisorEmployeeId: '',
tipped: '',
unionAffiliationDate: '',
unionCode: '',
unionPosition: '',
workersCompensation: ''
},
disabilityDescription: '',
emergencyContacts: [
{
address1: '',
address2: '',
city: '',
country: '',
county: '',
email: '',
firstName: '',
homePhone: '',
lastName: '',
mobilePhone: '',
notes: '',
pager: '',
primaryPhone: '',
priority: '',
relationship: '',
state: '',
syncEmployeeInfo: false,
workExtension: '',
workPhone: '',
zip: ''
}
],
employeeId: '',
ethnicity: '',
federalTax: {
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
taxCalculationCode: '',
w4FormYear: 0
},
firstName: '',
gender: '',
homeAddress: {
address1: '',
address2: '',
city: '',
country: '',
county: '',
emailAddress: '',
mobilePhone: '',
phone: '',
postalCode: '',
state: ''
},
isHighlyCompensated: false,
isSmoker: false,
lastName: '',
localTax: [
{
exemptions: '',
exemptions2: '',
filingStatus: '',
residentPSD: '',
taxCode: '',
workPSD: ''
}
],
mainDirectDeposit: {
accountNumber: '',
accountType: '',
blockSpecial: false,
isSkipPreNote: false,
nameOnAccount: '',
preNoteDate: '',
routingNumber: ''
},
maritalStatus: '',
middleName: '',
nonPrimaryStateTax: {
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
exemptions2: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
reciprocityCode: '',
specialCheckCalc: '',
taxCalculationCode: '',
taxCode: '',
w4FormYear: 0
},
ownerPercent: '',
preferredName: '',
primaryPayRate: {
annualSalary: '',
baseRate: '',
beginCheckDate: '',
changeReason: '',
defaultHours: '',
effectiveDate: '',
isAutoPay: false,
payFrequency: '',
payGrade: '',
payRateNote: '',
payType: '',
ratePer: '',
salary: ''
},
primaryStateTax: {
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
exemptions2: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
specialCheckCalc: '',
taxCalculationCode: '',
taxCode: '',
w4FormYear: 0
},
priorLastName: '',
salutation: '',
ssn: '',
status: {
adjustedSeniorityDate: '',
changeReason: '',
effectiveDate: '',
employeeStatus: '',
hireDate: '',
isEligibleForRehire: false,
reHireDate: '',
statusType: '',
terminationDate: ''
},
suffix: '',
taxSetup: {
fitwExemptNotes: '',
fitwExemptReason: '',
futaExemptNotes: '',
futaExemptReason: '',
isEmployee943: false,
isPension: false,
isStatutory: false,
medExemptNotes: '',
medExemptReason: '',
sitwExemptNotes: '',
sitwExemptReason: '',
ssExemptNotes: '',
ssExemptReason: '',
suiExemptNotes: '',
suiExemptReason: '',
suiState: '',
taxDistributionCode1099R: '',
taxForm: ''
},
veteranDescription: '',
webTime: {badgeNumber: '', chargeRate: '', isTimeLaborEnabled: false},
workAddress: {
address1: '',
address2: '',
city: '',
country: '',
county: '',
emailAddress: '',
location: '',
mailStop: '',
mobilePhone: '',
pager: '',
phone: '',
phoneExtension: '',
postalCode: '',
state: ''
},
workEligibility: {
alienOrAdmissionDocumentNumber: '',
attestedDate: '',
countryOfIssuance: '',
foreignPassportNumber: '',
i94AdmissionNumber: '',
i9DateVerified: '',
i9Notes: '',
isI9Verified: false,
isSsnVerified: false,
ssnDateVerified: '',
ssnNotes: '',
visaType: '',
workAuthorization: '',
workUntil: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"additionalDirectDeposit":[{"accountNumber":"","accountType":"","amount":"","amountType":"","blockSpecial":false,"isSkipPreNote":false,"nameOnAccount":"","preNoteDate":"","routingNumber":""}],"additionalRate":[{"changeReason":"","costCenter1":"","costCenter2":"","costCenter3":"","effectiveDate":"","endCheckDate":"","job":"","rate":"","rateCode":"","rateNotes":"","ratePer":"","shift":""}],"benefitSetup":{"benefitClass":"","benefitClassEffectiveDate":"","benefitSalary":"","benefitSalaryEffectiveDate":"","doNotApplyAdministrativePeriod":false,"isMeasureAcaEligibility":false},"birthDate":"","coEmpCode":"","companyFEIN":"","companyName":"","currency":"","customBooleanFields":[{"category":"","label":"","value":false}],"customDateFields":[{"category":"","label":"","value":""}],"customDropDownFields":[{"category":"","label":"","value":""}],"customNumberFields":[{"category":"","label":"","value":""}],"customTextFields":[{"category":"","label":"","value":""}],"departmentPosition":{"changeReason":"","clockBadgeNumber":"","costCenter1":"","costCenter2":"","costCenter3":"","effectiveDate":"","employeeType":"","equalEmploymentOpportunityClass":"","isMinimumWageExempt":false,"isOvertimeExempt":false,"isSupervisorReviewer":false,"isUnionDuesCollected":false,"isUnionInitiationCollected":false,"jobTitle":"","payGroup":"","positionCode":"","reviewerCompanyNumber":"","reviewerEmployeeId":"","shift":"","supervisorCompanyNumber":"","supervisorEmployeeId":"","tipped":"","unionAffiliationDate":"","unionCode":"","unionPosition":"","workersCompensation":""},"disabilityDescription":"","emergencyContacts":[{"address1":"","address2":"","city":"","country":"","county":"","email":"","firstName":"","homePhone":"","lastName":"","mobilePhone":"","notes":"","pager":"","primaryPhone":"","priority":"","relationship":"","state":"","syncEmployeeInfo":false,"workExtension":"","workPhone":"","zip":""}],"employeeId":"","ethnicity":"","federalTax":{"amount":"","deductionsAmount":"","dependentsAmount":"","exemptions":"","filingStatus":"","higherRate":false,"otherIncomeAmount":"","percentage":"","taxCalculationCode":"","w4FormYear":0},"firstName":"","gender":"","homeAddress":{"address1":"","address2":"","city":"","country":"","county":"","emailAddress":"","mobilePhone":"","phone":"","postalCode":"","state":""},"isHighlyCompensated":false,"isSmoker":false,"lastName":"","localTax":[{"exemptions":"","exemptions2":"","filingStatus":"","residentPSD":"","taxCode":"","workPSD":""}],"mainDirectDeposit":{"accountNumber":"","accountType":"","blockSpecial":false,"isSkipPreNote":false,"nameOnAccount":"","preNoteDate":"","routingNumber":""},"maritalStatus":"","middleName":"","nonPrimaryStateTax":{"amount":"","deductionsAmount":"","dependentsAmount":"","exemptions":"","exemptions2":"","filingStatus":"","higherRate":false,"otherIncomeAmount":"","percentage":"","reciprocityCode":"","specialCheckCalc":"","taxCalculationCode":"","taxCode":"","w4FormYear":0},"ownerPercent":"","preferredName":"","primaryPayRate":{"annualSalary":"","baseRate":"","beginCheckDate":"","changeReason":"","defaultHours":"","effectiveDate":"","isAutoPay":false,"payFrequency":"","payGrade":"","payRateNote":"","payType":"","ratePer":"","salary":""},"primaryStateTax":{"amount":"","deductionsAmount":"","dependentsAmount":"","exemptions":"","exemptions2":"","filingStatus":"","higherRate":false,"otherIncomeAmount":"","percentage":"","specialCheckCalc":"","taxCalculationCode":"","taxCode":"","w4FormYear":0},"priorLastName":"","salutation":"","ssn":"","status":{"adjustedSeniorityDate":"","changeReason":"","effectiveDate":"","employeeStatus":"","hireDate":"","isEligibleForRehire":false,"reHireDate":"","statusType":"","terminationDate":""},"suffix":"","taxSetup":{"fitwExemptNotes":"","fitwExemptReason":"","futaExemptNotes":"","futaExemptReason":"","isEmployee943":false,"isPension":false,"isStatutory":false,"medExemptNotes":"","medExemptReason":"","sitwExemptNotes":"","sitwExemptReason":"","ssExemptNotes":"","ssExemptReason":"","suiExemptNotes":"","suiExemptReason":"","suiState":"","taxDistributionCode1099R":"","taxForm":""},"veteranDescription":"","webTime":{"badgeNumber":"","chargeRate":"","isTimeLaborEnabled":false},"workAddress":{"address1":"","address2":"","city":"","country":"","county":"","emailAddress":"","location":"","mailStop":"","mobilePhone":"","pager":"","phone":"","phoneExtension":"","postalCode":"","state":""},"workEligibility":{"alienOrAdmissionDocumentNumber":"","attestedDate":"","countryOfIssuance":"","foreignPassportNumber":"","i94AdmissionNumber":"","i9DateVerified":"","i9Notes":"","isI9Verified":false,"isSsnVerified":false,"ssnDateVerified":"","ssnNotes":"","visaType":"","workAuthorization":"","workUntil":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId',
method: 'PATCH',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "additionalDirectDeposit": [\n {\n "accountNumber": "",\n "accountType": "",\n "amount": "",\n "amountType": "",\n "blockSpecial": false,\n "isSkipPreNote": false,\n "nameOnAccount": "",\n "preNoteDate": "",\n "routingNumber": ""\n }\n ],\n "additionalRate": [\n {\n "changeReason": "",\n "costCenter1": "",\n "costCenter2": "",\n "costCenter3": "",\n "effectiveDate": "",\n "endCheckDate": "",\n "job": "",\n "rate": "",\n "rateCode": "",\n "rateNotes": "",\n "ratePer": "",\n "shift": ""\n }\n ],\n "benefitSetup": {\n "benefitClass": "",\n "benefitClassEffectiveDate": "",\n "benefitSalary": "",\n "benefitSalaryEffectiveDate": "",\n "doNotApplyAdministrativePeriod": false,\n "isMeasureAcaEligibility": false\n },\n "birthDate": "",\n "coEmpCode": "",\n "companyFEIN": "",\n "companyName": "",\n "currency": "",\n "customBooleanFields": [\n {\n "category": "",\n "label": "",\n "value": false\n }\n ],\n "customDateFields": [\n {\n "category": "",\n "label": "",\n "value": ""\n }\n ],\n "customDropDownFields": [\n {\n "category": "",\n "label": "",\n "value": ""\n }\n ],\n "customNumberFields": [\n {\n "category": "",\n "label": "",\n "value": ""\n }\n ],\n "customTextFields": [\n {\n "category": "",\n "label": "",\n "value": ""\n }\n ],\n "departmentPosition": {\n "changeReason": "",\n "clockBadgeNumber": "",\n "costCenter1": "",\n "costCenter2": "",\n "costCenter3": "",\n "effectiveDate": "",\n "employeeType": "",\n "equalEmploymentOpportunityClass": "",\n "isMinimumWageExempt": false,\n "isOvertimeExempt": false,\n "isSupervisorReviewer": false,\n "isUnionDuesCollected": false,\n "isUnionInitiationCollected": false,\n "jobTitle": "",\n "payGroup": "",\n "positionCode": "",\n "reviewerCompanyNumber": "",\n "reviewerEmployeeId": "",\n "shift": "",\n "supervisorCompanyNumber": "",\n "supervisorEmployeeId": "",\n "tipped": "",\n "unionAffiliationDate": "",\n "unionCode": "",\n "unionPosition": "",\n "workersCompensation": ""\n },\n "disabilityDescription": "",\n "emergencyContacts": [\n {\n "address1": "",\n "address2": "",\n "city": "",\n "country": "",\n "county": "",\n "email": "",\n "firstName": "",\n "homePhone": "",\n "lastName": "",\n "mobilePhone": "",\n "notes": "",\n "pager": "",\n "primaryPhone": "",\n "priority": "",\n "relationship": "",\n "state": "",\n "syncEmployeeInfo": false,\n "workExtension": "",\n "workPhone": "",\n "zip": ""\n }\n ],\n "employeeId": "",\n "ethnicity": "",\n "federalTax": {\n "amount": "",\n "deductionsAmount": "",\n "dependentsAmount": "",\n "exemptions": "",\n "filingStatus": "",\n "higherRate": false,\n "otherIncomeAmount": "",\n "percentage": "",\n "taxCalculationCode": "",\n "w4FormYear": 0\n },\n "firstName": "",\n "gender": "",\n "homeAddress": {\n "address1": "",\n "address2": "",\n "city": "",\n "country": "",\n "county": "",\n "emailAddress": "",\n "mobilePhone": "",\n "phone": "",\n "postalCode": "",\n "state": ""\n },\n "isHighlyCompensated": false,\n "isSmoker": false,\n "lastName": "",\n "localTax": [\n {\n "exemptions": "",\n "exemptions2": "",\n "filingStatus": "",\n "residentPSD": "",\n "taxCode": "",\n "workPSD": ""\n }\n ],\n "mainDirectDeposit": {\n "accountNumber": "",\n "accountType": "",\n "blockSpecial": false,\n "isSkipPreNote": false,\n "nameOnAccount": "",\n "preNoteDate": "",\n "routingNumber": ""\n },\n "maritalStatus": "",\n "middleName": "",\n "nonPrimaryStateTax": {\n "amount": "",\n "deductionsAmount": "",\n "dependentsAmount": "",\n "exemptions": "",\n "exemptions2": "",\n "filingStatus": "",\n "higherRate": false,\n "otherIncomeAmount": "",\n "percentage": "",\n "reciprocityCode": "",\n "specialCheckCalc": "",\n "taxCalculationCode": "",\n "taxCode": "",\n "w4FormYear": 0\n },\n "ownerPercent": "",\n "preferredName": "",\n "primaryPayRate": {\n "annualSalary": "",\n "baseRate": "",\n "beginCheckDate": "",\n "changeReason": "",\n "defaultHours": "",\n "effectiveDate": "",\n "isAutoPay": false,\n "payFrequency": "",\n "payGrade": "",\n "payRateNote": "",\n "payType": "",\n "ratePer": "",\n "salary": ""\n },\n "primaryStateTax": {\n "amount": "",\n "deductionsAmount": "",\n "dependentsAmount": "",\n "exemptions": "",\n "exemptions2": "",\n "filingStatus": "",\n "higherRate": false,\n "otherIncomeAmount": "",\n "percentage": "",\n "specialCheckCalc": "",\n "taxCalculationCode": "",\n "taxCode": "",\n "w4FormYear": 0\n },\n "priorLastName": "",\n "salutation": "",\n "ssn": "",\n "status": {\n "adjustedSeniorityDate": "",\n "changeReason": "",\n "effectiveDate": "",\n "employeeStatus": "",\n "hireDate": "",\n "isEligibleForRehire": false,\n "reHireDate": "",\n "statusType": "",\n "terminationDate": ""\n },\n "suffix": "",\n "taxSetup": {\n "fitwExemptNotes": "",\n "fitwExemptReason": "",\n "futaExemptNotes": "",\n "futaExemptReason": "",\n "isEmployee943": false,\n "isPension": false,\n "isStatutory": false,\n "medExemptNotes": "",\n "medExemptReason": "",\n "sitwExemptNotes": "",\n "sitwExemptReason": "",\n "ssExemptNotes": "",\n "ssExemptReason": "",\n "suiExemptNotes": "",\n "suiExemptReason": "",\n "suiState": "",\n "taxDistributionCode1099R": "",\n "taxForm": ""\n },\n "veteranDescription": "",\n "webTime": {\n "badgeNumber": "",\n "chargeRate": "",\n "isTimeLaborEnabled": false\n },\n "workAddress": {\n "address1": "",\n "address2": "",\n "city": "",\n "country": "",\n "county": "",\n "emailAddress": "",\n "location": "",\n "mailStop": "",\n "mobilePhone": "",\n "pager": "",\n "phone": "",\n "phoneExtension": "",\n "postalCode": "",\n "state": ""\n },\n "workEligibility": {\n "alienOrAdmissionDocumentNumber": "",\n "attestedDate": "",\n "countryOfIssuance": "",\n "foreignPassportNumber": "",\n "i94AdmissionNumber": "",\n "i9DateVerified": "",\n "i9Notes": "",\n "isI9Verified": false,\n "isSsnVerified": false,\n "ssnDateVerified": "",\n "ssnNotes": "",\n "visaType": "",\n "workAuthorization": "",\n "workUntil": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"additionalDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"amount\": \"\",\n \"amountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"additionalRate\": [\n {\n \"changeReason\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"endCheckDate\": \"\",\n \"job\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"rateNotes\": \"\",\n \"ratePer\": \"\",\n \"shift\": \"\"\n }\n ],\n \"benefitSetup\": {\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n },\n \"birthDate\": \"\",\n \"coEmpCode\": \"\",\n \"companyFEIN\": \"\",\n \"companyName\": \"\",\n \"currency\": \"\",\n \"customBooleanFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": false\n }\n ],\n \"customDateFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customDropDownFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customNumberFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customTextFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"departmentPosition\": {\n \"changeReason\": \"\",\n \"clockBadgeNumber\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"employeeType\": \"\",\n \"equalEmploymentOpportunityClass\": \"\",\n \"isMinimumWageExempt\": false,\n \"isOvertimeExempt\": false,\n \"isSupervisorReviewer\": false,\n \"isUnionDuesCollected\": false,\n \"isUnionInitiationCollected\": false,\n \"jobTitle\": \"\",\n \"payGroup\": \"\",\n \"positionCode\": \"\",\n \"reviewerCompanyNumber\": \"\",\n \"reviewerEmployeeId\": \"\",\n \"shift\": \"\",\n \"supervisorCompanyNumber\": \"\",\n \"supervisorEmployeeId\": \"\",\n \"tipped\": \"\",\n \"unionAffiliationDate\": \"\",\n \"unionCode\": \"\",\n \"unionPosition\": \"\",\n \"workersCompensation\": \"\"\n },\n \"disabilityDescription\": \"\",\n \"emergencyContacts\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"homePhone\": \"\",\n \"lastName\": \"\",\n \"mobilePhone\": \"\",\n \"notes\": \"\",\n \"pager\": \"\",\n \"primaryPhone\": \"\",\n \"priority\": \"\",\n \"relationship\": \"\",\n \"state\": \"\",\n \"syncEmployeeInfo\": false,\n \"workExtension\": \"\",\n \"workPhone\": \"\",\n \"zip\": \"\"\n }\n ],\n \"employeeId\": \"\",\n \"ethnicity\": \"\",\n \"federalTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"taxCalculationCode\": \"\",\n \"w4FormYear\": 0\n },\n \"firstName\": \"\",\n \"gender\": \"\",\n \"homeAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"isHighlyCompensated\": false,\n \"isSmoker\": false,\n \"lastName\": \"\",\n \"localTax\": [\n {\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n }\n ],\n \"mainDirectDeposit\": {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n },\n \"maritalStatus\": \"\",\n \"middleName\": \"\",\n \"nonPrimaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"ownerPercent\": \"\",\n \"preferredName\": \"\",\n \"primaryPayRate\": {\n \"annualSalary\": \"\",\n \"baseRate\": \"\",\n \"beginCheckDate\": \"\",\n \"changeReason\": \"\",\n \"defaultHours\": \"\",\n \"effectiveDate\": \"\",\n \"isAutoPay\": false,\n \"payFrequency\": \"\",\n \"payGrade\": \"\",\n \"payRateNote\": \"\",\n \"payType\": \"\",\n \"ratePer\": \"\",\n \"salary\": \"\"\n },\n \"primaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"priorLastName\": \"\",\n \"salutation\": \"\",\n \"ssn\": \"\",\n \"status\": {\n \"adjustedSeniorityDate\": \"\",\n \"changeReason\": \"\",\n \"effectiveDate\": \"\",\n \"employeeStatus\": \"\",\n \"hireDate\": \"\",\n \"isEligibleForRehire\": false,\n \"reHireDate\": \"\",\n \"statusType\": \"\",\n \"terminationDate\": \"\"\n },\n \"suffix\": \"\",\n \"taxSetup\": {\n \"fitwExemptNotes\": \"\",\n \"fitwExemptReason\": \"\",\n \"futaExemptNotes\": \"\",\n \"futaExemptReason\": \"\",\n \"isEmployee943\": false,\n \"isPension\": false,\n \"isStatutory\": false,\n \"medExemptNotes\": \"\",\n \"medExemptReason\": \"\",\n \"sitwExemptNotes\": \"\",\n \"sitwExemptReason\": \"\",\n \"ssExemptNotes\": \"\",\n \"ssExemptReason\": \"\",\n \"suiExemptNotes\": \"\",\n \"suiExemptReason\": \"\",\n \"suiState\": \"\",\n \"taxDistributionCode1099R\": \"\",\n \"taxForm\": \"\"\n },\n \"veteranDescription\": \"\",\n \"webTime\": {\n \"badgeNumber\": \"\",\n \"chargeRate\": \"\",\n \"isTimeLaborEnabled\": false\n },\n \"workAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"location\": \"\",\n \"mailStop\": \"\",\n \"mobilePhone\": \"\",\n \"pager\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"workEligibility\": {\n \"alienOrAdmissionDocumentNumber\": \"\",\n \"attestedDate\": \"\",\n \"countryOfIssuance\": \"\",\n \"foreignPassportNumber\": \"\",\n \"i94AdmissionNumber\": \"\",\n \"i9DateVerified\": \"\",\n \"i9Notes\": \"\",\n \"isI9Verified\": false,\n \"isSsnVerified\": false,\n \"ssnDateVerified\": \"\",\n \"ssnNotes\": \"\",\n \"visaType\": \"\",\n \"workAuthorization\": \"\",\n \"workUntil\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId")
.patch(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PATCH',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/companies/:companyId/employees/:employeeId',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
additionalDirectDeposit: [
{
accountNumber: '',
accountType: '',
amount: '',
amountType: '',
blockSpecial: false,
isSkipPreNote: false,
nameOnAccount: '',
preNoteDate: '',
routingNumber: ''
}
],
additionalRate: [
{
changeReason: '',
costCenter1: '',
costCenter2: '',
costCenter3: '',
effectiveDate: '',
endCheckDate: '',
job: '',
rate: '',
rateCode: '',
rateNotes: '',
ratePer: '',
shift: ''
}
],
benefitSetup: {
benefitClass: '',
benefitClassEffectiveDate: '',
benefitSalary: '',
benefitSalaryEffectiveDate: '',
doNotApplyAdministrativePeriod: false,
isMeasureAcaEligibility: false
},
birthDate: '',
coEmpCode: '',
companyFEIN: '',
companyName: '',
currency: '',
customBooleanFields: [{category: '', label: '', value: false}],
customDateFields: [{category: '', label: '', value: ''}],
customDropDownFields: [{category: '', label: '', value: ''}],
customNumberFields: [{category: '', label: '', value: ''}],
customTextFields: [{category: '', label: '', value: ''}],
departmentPosition: {
changeReason: '',
clockBadgeNumber: '',
costCenter1: '',
costCenter2: '',
costCenter3: '',
effectiveDate: '',
employeeType: '',
equalEmploymentOpportunityClass: '',
isMinimumWageExempt: false,
isOvertimeExempt: false,
isSupervisorReviewer: false,
isUnionDuesCollected: false,
isUnionInitiationCollected: false,
jobTitle: '',
payGroup: '',
positionCode: '',
reviewerCompanyNumber: '',
reviewerEmployeeId: '',
shift: '',
supervisorCompanyNumber: '',
supervisorEmployeeId: '',
tipped: '',
unionAffiliationDate: '',
unionCode: '',
unionPosition: '',
workersCompensation: ''
},
disabilityDescription: '',
emergencyContacts: [
{
address1: '',
address2: '',
city: '',
country: '',
county: '',
email: '',
firstName: '',
homePhone: '',
lastName: '',
mobilePhone: '',
notes: '',
pager: '',
primaryPhone: '',
priority: '',
relationship: '',
state: '',
syncEmployeeInfo: false,
workExtension: '',
workPhone: '',
zip: ''
}
],
employeeId: '',
ethnicity: '',
federalTax: {
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
taxCalculationCode: '',
w4FormYear: 0
},
firstName: '',
gender: '',
homeAddress: {
address1: '',
address2: '',
city: '',
country: '',
county: '',
emailAddress: '',
mobilePhone: '',
phone: '',
postalCode: '',
state: ''
},
isHighlyCompensated: false,
isSmoker: false,
lastName: '',
localTax: [
{
exemptions: '',
exemptions2: '',
filingStatus: '',
residentPSD: '',
taxCode: '',
workPSD: ''
}
],
mainDirectDeposit: {
accountNumber: '',
accountType: '',
blockSpecial: false,
isSkipPreNote: false,
nameOnAccount: '',
preNoteDate: '',
routingNumber: ''
},
maritalStatus: '',
middleName: '',
nonPrimaryStateTax: {
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
exemptions2: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
reciprocityCode: '',
specialCheckCalc: '',
taxCalculationCode: '',
taxCode: '',
w4FormYear: 0
},
ownerPercent: '',
preferredName: '',
primaryPayRate: {
annualSalary: '',
baseRate: '',
beginCheckDate: '',
changeReason: '',
defaultHours: '',
effectiveDate: '',
isAutoPay: false,
payFrequency: '',
payGrade: '',
payRateNote: '',
payType: '',
ratePer: '',
salary: ''
},
primaryStateTax: {
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
exemptions2: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
specialCheckCalc: '',
taxCalculationCode: '',
taxCode: '',
w4FormYear: 0
},
priorLastName: '',
salutation: '',
ssn: '',
status: {
adjustedSeniorityDate: '',
changeReason: '',
effectiveDate: '',
employeeStatus: '',
hireDate: '',
isEligibleForRehire: false,
reHireDate: '',
statusType: '',
terminationDate: ''
},
suffix: '',
taxSetup: {
fitwExemptNotes: '',
fitwExemptReason: '',
futaExemptNotes: '',
futaExemptReason: '',
isEmployee943: false,
isPension: false,
isStatutory: false,
medExemptNotes: '',
medExemptReason: '',
sitwExemptNotes: '',
sitwExemptReason: '',
ssExemptNotes: '',
ssExemptReason: '',
suiExemptNotes: '',
suiExemptReason: '',
suiState: '',
taxDistributionCode1099R: '',
taxForm: ''
},
veteranDescription: '',
webTime: {badgeNumber: '', chargeRate: '', isTimeLaborEnabled: false},
workAddress: {
address1: '',
address2: '',
city: '',
country: '',
county: '',
emailAddress: '',
location: '',
mailStop: '',
mobilePhone: '',
pager: '',
phone: '',
phoneExtension: '',
postalCode: '',
state: ''
},
workEligibility: {
alienOrAdmissionDocumentNumber: '',
attestedDate: '',
countryOfIssuance: '',
foreignPassportNumber: '',
i94AdmissionNumber: '',
i9DateVerified: '',
i9Notes: '',
isI9Verified: false,
isSsnVerified: false,
ssnDateVerified: '',
ssnNotes: '',
visaType: '',
workAuthorization: '',
workUntil: ''
}
}));
req.end();
const request = require('request');
const options = {
method: 'PATCH',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId',
headers: {'content-type': 'application/json'},
body: {
additionalDirectDeposit: [
{
accountNumber: '',
accountType: '',
amount: '',
amountType: '',
blockSpecial: false,
isSkipPreNote: false,
nameOnAccount: '',
preNoteDate: '',
routingNumber: ''
}
],
additionalRate: [
{
changeReason: '',
costCenter1: '',
costCenter2: '',
costCenter3: '',
effectiveDate: '',
endCheckDate: '',
job: '',
rate: '',
rateCode: '',
rateNotes: '',
ratePer: '',
shift: ''
}
],
benefitSetup: {
benefitClass: '',
benefitClassEffectiveDate: '',
benefitSalary: '',
benefitSalaryEffectiveDate: '',
doNotApplyAdministrativePeriod: false,
isMeasureAcaEligibility: false
},
birthDate: '',
coEmpCode: '',
companyFEIN: '',
companyName: '',
currency: '',
customBooleanFields: [{category: '', label: '', value: false}],
customDateFields: [{category: '', label: '', value: ''}],
customDropDownFields: [{category: '', label: '', value: ''}],
customNumberFields: [{category: '', label: '', value: ''}],
customTextFields: [{category: '', label: '', value: ''}],
departmentPosition: {
changeReason: '',
clockBadgeNumber: '',
costCenter1: '',
costCenter2: '',
costCenter3: '',
effectiveDate: '',
employeeType: '',
equalEmploymentOpportunityClass: '',
isMinimumWageExempt: false,
isOvertimeExempt: false,
isSupervisorReviewer: false,
isUnionDuesCollected: false,
isUnionInitiationCollected: false,
jobTitle: '',
payGroup: '',
positionCode: '',
reviewerCompanyNumber: '',
reviewerEmployeeId: '',
shift: '',
supervisorCompanyNumber: '',
supervisorEmployeeId: '',
tipped: '',
unionAffiliationDate: '',
unionCode: '',
unionPosition: '',
workersCompensation: ''
},
disabilityDescription: '',
emergencyContacts: [
{
address1: '',
address2: '',
city: '',
country: '',
county: '',
email: '',
firstName: '',
homePhone: '',
lastName: '',
mobilePhone: '',
notes: '',
pager: '',
primaryPhone: '',
priority: '',
relationship: '',
state: '',
syncEmployeeInfo: false,
workExtension: '',
workPhone: '',
zip: ''
}
],
employeeId: '',
ethnicity: '',
federalTax: {
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
taxCalculationCode: '',
w4FormYear: 0
},
firstName: '',
gender: '',
homeAddress: {
address1: '',
address2: '',
city: '',
country: '',
county: '',
emailAddress: '',
mobilePhone: '',
phone: '',
postalCode: '',
state: ''
},
isHighlyCompensated: false,
isSmoker: false,
lastName: '',
localTax: [
{
exemptions: '',
exemptions2: '',
filingStatus: '',
residentPSD: '',
taxCode: '',
workPSD: ''
}
],
mainDirectDeposit: {
accountNumber: '',
accountType: '',
blockSpecial: false,
isSkipPreNote: false,
nameOnAccount: '',
preNoteDate: '',
routingNumber: ''
},
maritalStatus: '',
middleName: '',
nonPrimaryStateTax: {
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
exemptions2: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
reciprocityCode: '',
specialCheckCalc: '',
taxCalculationCode: '',
taxCode: '',
w4FormYear: 0
},
ownerPercent: '',
preferredName: '',
primaryPayRate: {
annualSalary: '',
baseRate: '',
beginCheckDate: '',
changeReason: '',
defaultHours: '',
effectiveDate: '',
isAutoPay: false,
payFrequency: '',
payGrade: '',
payRateNote: '',
payType: '',
ratePer: '',
salary: ''
},
primaryStateTax: {
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
exemptions2: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
specialCheckCalc: '',
taxCalculationCode: '',
taxCode: '',
w4FormYear: 0
},
priorLastName: '',
salutation: '',
ssn: '',
status: {
adjustedSeniorityDate: '',
changeReason: '',
effectiveDate: '',
employeeStatus: '',
hireDate: '',
isEligibleForRehire: false,
reHireDate: '',
statusType: '',
terminationDate: ''
},
suffix: '',
taxSetup: {
fitwExemptNotes: '',
fitwExemptReason: '',
futaExemptNotes: '',
futaExemptReason: '',
isEmployee943: false,
isPension: false,
isStatutory: false,
medExemptNotes: '',
medExemptReason: '',
sitwExemptNotes: '',
sitwExemptReason: '',
ssExemptNotes: '',
ssExemptReason: '',
suiExemptNotes: '',
suiExemptReason: '',
suiState: '',
taxDistributionCode1099R: '',
taxForm: ''
},
veteranDescription: '',
webTime: {badgeNumber: '', chargeRate: '', isTimeLaborEnabled: false},
workAddress: {
address1: '',
address2: '',
city: '',
country: '',
county: '',
emailAddress: '',
location: '',
mailStop: '',
mobilePhone: '',
pager: '',
phone: '',
phoneExtension: '',
postalCode: '',
state: ''
},
workEligibility: {
alienOrAdmissionDocumentNumber: '',
attestedDate: '',
countryOfIssuance: '',
foreignPassportNumber: '',
i94AdmissionNumber: '',
i9DateVerified: '',
i9Notes: '',
isI9Verified: false,
isSsnVerified: false,
ssnDateVerified: '',
ssnNotes: '',
visaType: '',
workAuthorization: '',
workUntil: ''
}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PATCH', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
additionalDirectDeposit: [
{
accountNumber: '',
accountType: '',
amount: '',
amountType: '',
blockSpecial: false,
isSkipPreNote: false,
nameOnAccount: '',
preNoteDate: '',
routingNumber: ''
}
],
additionalRate: [
{
changeReason: '',
costCenter1: '',
costCenter2: '',
costCenter3: '',
effectiveDate: '',
endCheckDate: '',
job: '',
rate: '',
rateCode: '',
rateNotes: '',
ratePer: '',
shift: ''
}
],
benefitSetup: {
benefitClass: '',
benefitClassEffectiveDate: '',
benefitSalary: '',
benefitSalaryEffectiveDate: '',
doNotApplyAdministrativePeriod: false,
isMeasureAcaEligibility: false
},
birthDate: '',
coEmpCode: '',
companyFEIN: '',
companyName: '',
currency: '',
customBooleanFields: [
{
category: '',
label: '',
value: false
}
],
customDateFields: [
{
category: '',
label: '',
value: ''
}
],
customDropDownFields: [
{
category: '',
label: '',
value: ''
}
],
customNumberFields: [
{
category: '',
label: '',
value: ''
}
],
customTextFields: [
{
category: '',
label: '',
value: ''
}
],
departmentPosition: {
changeReason: '',
clockBadgeNumber: '',
costCenter1: '',
costCenter2: '',
costCenter3: '',
effectiveDate: '',
employeeType: '',
equalEmploymentOpportunityClass: '',
isMinimumWageExempt: false,
isOvertimeExempt: false,
isSupervisorReviewer: false,
isUnionDuesCollected: false,
isUnionInitiationCollected: false,
jobTitle: '',
payGroup: '',
positionCode: '',
reviewerCompanyNumber: '',
reviewerEmployeeId: '',
shift: '',
supervisorCompanyNumber: '',
supervisorEmployeeId: '',
tipped: '',
unionAffiliationDate: '',
unionCode: '',
unionPosition: '',
workersCompensation: ''
},
disabilityDescription: '',
emergencyContacts: [
{
address1: '',
address2: '',
city: '',
country: '',
county: '',
email: '',
firstName: '',
homePhone: '',
lastName: '',
mobilePhone: '',
notes: '',
pager: '',
primaryPhone: '',
priority: '',
relationship: '',
state: '',
syncEmployeeInfo: false,
workExtension: '',
workPhone: '',
zip: ''
}
],
employeeId: '',
ethnicity: '',
federalTax: {
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
taxCalculationCode: '',
w4FormYear: 0
},
firstName: '',
gender: '',
homeAddress: {
address1: '',
address2: '',
city: '',
country: '',
county: '',
emailAddress: '',
mobilePhone: '',
phone: '',
postalCode: '',
state: ''
},
isHighlyCompensated: false,
isSmoker: false,
lastName: '',
localTax: [
{
exemptions: '',
exemptions2: '',
filingStatus: '',
residentPSD: '',
taxCode: '',
workPSD: ''
}
],
mainDirectDeposit: {
accountNumber: '',
accountType: '',
blockSpecial: false,
isSkipPreNote: false,
nameOnAccount: '',
preNoteDate: '',
routingNumber: ''
},
maritalStatus: '',
middleName: '',
nonPrimaryStateTax: {
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
exemptions2: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
reciprocityCode: '',
specialCheckCalc: '',
taxCalculationCode: '',
taxCode: '',
w4FormYear: 0
},
ownerPercent: '',
preferredName: '',
primaryPayRate: {
annualSalary: '',
baseRate: '',
beginCheckDate: '',
changeReason: '',
defaultHours: '',
effectiveDate: '',
isAutoPay: false,
payFrequency: '',
payGrade: '',
payRateNote: '',
payType: '',
ratePer: '',
salary: ''
},
primaryStateTax: {
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
exemptions2: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
specialCheckCalc: '',
taxCalculationCode: '',
taxCode: '',
w4FormYear: 0
},
priorLastName: '',
salutation: '',
ssn: '',
status: {
adjustedSeniorityDate: '',
changeReason: '',
effectiveDate: '',
employeeStatus: '',
hireDate: '',
isEligibleForRehire: false,
reHireDate: '',
statusType: '',
terminationDate: ''
},
suffix: '',
taxSetup: {
fitwExemptNotes: '',
fitwExemptReason: '',
futaExemptNotes: '',
futaExemptReason: '',
isEmployee943: false,
isPension: false,
isStatutory: false,
medExemptNotes: '',
medExemptReason: '',
sitwExemptNotes: '',
sitwExemptReason: '',
ssExemptNotes: '',
ssExemptReason: '',
suiExemptNotes: '',
suiExemptReason: '',
suiState: '',
taxDistributionCode1099R: '',
taxForm: ''
},
veteranDescription: '',
webTime: {
badgeNumber: '',
chargeRate: '',
isTimeLaborEnabled: false
},
workAddress: {
address1: '',
address2: '',
city: '',
country: '',
county: '',
emailAddress: '',
location: '',
mailStop: '',
mobilePhone: '',
pager: '',
phone: '',
phoneExtension: '',
postalCode: '',
state: ''
},
workEligibility: {
alienOrAdmissionDocumentNumber: '',
attestedDate: '',
countryOfIssuance: '',
foreignPassportNumber: '',
i94AdmissionNumber: '',
i9DateVerified: '',
i9Notes: '',
isI9Verified: false,
isSsnVerified: false,
ssnDateVerified: '',
ssnNotes: '',
visaType: '',
workAuthorization: '',
workUntil: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PATCH',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId',
headers: {'content-type': 'application/json'},
data: {
additionalDirectDeposit: [
{
accountNumber: '',
accountType: '',
amount: '',
amountType: '',
blockSpecial: false,
isSkipPreNote: false,
nameOnAccount: '',
preNoteDate: '',
routingNumber: ''
}
],
additionalRate: [
{
changeReason: '',
costCenter1: '',
costCenter2: '',
costCenter3: '',
effectiveDate: '',
endCheckDate: '',
job: '',
rate: '',
rateCode: '',
rateNotes: '',
ratePer: '',
shift: ''
}
],
benefitSetup: {
benefitClass: '',
benefitClassEffectiveDate: '',
benefitSalary: '',
benefitSalaryEffectiveDate: '',
doNotApplyAdministrativePeriod: false,
isMeasureAcaEligibility: false
},
birthDate: '',
coEmpCode: '',
companyFEIN: '',
companyName: '',
currency: '',
customBooleanFields: [{category: '', label: '', value: false}],
customDateFields: [{category: '', label: '', value: ''}],
customDropDownFields: [{category: '', label: '', value: ''}],
customNumberFields: [{category: '', label: '', value: ''}],
customTextFields: [{category: '', label: '', value: ''}],
departmentPosition: {
changeReason: '',
clockBadgeNumber: '',
costCenter1: '',
costCenter2: '',
costCenter3: '',
effectiveDate: '',
employeeType: '',
equalEmploymentOpportunityClass: '',
isMinimumWageExempt: false,
isOvertimeExempt: false,
isSupervisorReviewer: false,
isUnionDuesCollected: false,
isUnionInitiationCollected: false,
jobTitle: '',
payGroup: '',
positionCode: '',
reviewerCompanyNumber: '',
reviewerEmployeeId: '',
shift: '',
supervisorCompanyNumber: '',
supervisorEmployeeId: '',
tipped: '',
unionAffiliationDate: '',
unionCode: '',
unionPosition: '',
workersCompensation: ''
},
disabilityDescription: '',
emergencyContacts: [
{
address1: '',
address2: '',
city: '',
country: '',
county: '',
email: '',
firstName: '',
homePhone: '',
lastName: '',
mobilePhone: '',
notes: '',
pager: '',
primaryPhone: '',
priority: '',
relationship: '',
state: '',
syncEmployeeInfo: false,
workExtension: '',
workPhone: '',
zip: ''
}
],
employeeId: '',
ethnicity: '',
federalTax: {
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
taxCalculationCode: '',
w4FormYear: 0
},
firstName: '',
gender: '',
homeAddress: {
address1: '',
address2: '',
city: '',
country: '',
county: '',
emailAddress: '',
mobilePhone: '',
phone: '',
postalCode: '',
state: ''
},
isHighlyCompensated: false,
isSmoker: false,
lastName: '',
localTax: [
{
exemptions: '',
exemptions2: '',
filingStatus: '',
residentPSD: '',
taxCode: '',
workPSD: ''
}
],
mainDirectDeposit: {
accountNumber: '',
accountType: '',
blockSpecial: false,
isSkipPreNote: false,
nameOnAccount: '',
preNoteDate: '',
routingNumber: ''
},
maritalStatus: '',
middleName: '',
nonPrimaryStateTax: {
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
exemptions2: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
reciprocityCode: '',
specialCheckCalc: '',
taxCalculationCode: '',
taxCode: '',
w4FormYear: 0
},
ownerPercent: '',
preferredName: '',
primaryPayRate: {
annualSalary: '',
baseRate: '',
beginCheckDate: '',
changeReason: '',
defaultHours: '',
effectiveDate: '',
isAutoPay: false,
payFrequency: '',
payGrade: '',
payRateNote: '',
payType: '',
ratePer: '',
salary: ''
},
primaryStateTax: {
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
exemptions2: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
specialCheckCalc: '',
taxCalculationCode: '',
taxCode: '',
w4FormYear: 0
},
priorLastName: '',
salutation: '',
ssn: '',
status: {
adjustedSeniorityDate: '',
changeReason: '',
effectiveDate: '',
employeeStatus: '',
hireDate: '',
isEligibleForRehire: false,
reHireDate: '',
statusType: '',
terminationDate: ''
},
suffix: '',
taxSetup: {
fitwExemptNotes: '',
fitwExemptReason: '',
futaExemptNotes: '',
futaExemptReason: '',
isEmployee943: false,
isPension: false,
isStatutory: false,
medExemptNotes: '',
medExemptReason: '',
sitwExemptNotes: '',
sitwExemptReason: '',
ssExemptNotes: '',
ssExemptReason: '',
suiExemptNotes: '',
suiExemptReason: '',
suiState: '',
taxDistributionCode1099R: '',
taxForm: ''
},
veteranDescription: '',
webTime: {badgeNumber: '', chargeRate: '', isTimeLaborEnabled: false},
workAddress: {
address1: '',
address2: '',
city: '',
country: '',
county: '',
emailAddress: '',
location: '',
mailStop: '',
mobilePhone: '',
pager: '',
phone: '',
phoneExtension: '',
postalCode: '',
state: ''
},
workEligibility: {
alienOrAdmissionDocumentNumber: '',
attestedDate: '',
countryOfIssuance: '',
foreignPassportNumber: '',
i94AdmissionNumber: '',
i9DateVerified: '',
i9Notes: '',
isI9Verified: false,
isSsnVerified: false,
ssnDateVerified: '',
ssnNotes: '',
visaType: '',
workAuthorization: '',
workUntil: ''
}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId';
const options = {
method: 'PATCH',
headers: {'content-type': 'application/json'},
body: '{"additionalDirectDeposit":[{"accountNumber":"","accountType":"","amount":"","amountType":"","blockSpecial":false,"isSkipPreNote":false,"nameOnAccount":"","preNoteDate":"","routingNumber":""}],"additionalRate":[{"changeReason":"","costCenter1":"","costCenter2":"","costCenter3":"","effectiveDate":"","endCheckDate":"","job":"","rate":"","rateCode":"","rateNotes":"","ratePer":"","shift":""}],"benefitSetup":{"benefitClass":"","benefitClassEffectiveDate":"","benefitSalary":"","benefitSalaryEffectiveDate":"","doNotApplyAdministrativePeriod":false,"isMeasureAcaEligibility":false},"birthDate":"","coEmpCode":"","companyFEIN":"","companyName":"","currency":"","customBooleanFields":[{"category":"","label":"","value":false}],"customDateFields":[{"category":"","label":"","value":""}],"customDropDownFields":[{"category":"","label":"","value":""}],"customNumberFields":[{"category":"","label":"","value":""}],"customTextFields":[{"category":"","label":"","value":""}],"departmentPosition":{"changeReason":"","clockBadgeNumber":"","costCenter1":"","costCenter2":"","costCenter3":"","effectiveDate":"","employeeType":"","equalEmploymentOpportunityClass":"","isMinimumWageExempt":false,"isOvertimeExempt":false,"isSupervisorReviewer":false,"isUnionDuesCollected":false,"isUnionInitiationCollected":false,"jobTitle":"","payGroup":"","positionCode":"","reviewerCompanyNumber":"","reviewerEmployeeId":"","shift":"","supervisorCompanyNumber":"","supervisorEmployeeId":"","tipped":"","unionAffiliationDate":"","unionCode":"","unionPosition":"","workersCompensation":""},"disabilityDescription":"","emergencyContacts":[{"address1":"","address2":"","city":"","country":"","county":"","email":"","firstName":"","homePhone":"","lastName":"","mobilePhone":"","notes":"","pager":"","primaryPhone":"","priority":"","relationship":"","state":"","syncEmployeeInfo":false,"workExtension":"","workPhone":"","zip":""}],"employeeId":"","ethnicity":"","federalTax":{"amount":"","deductionsAmount":"","dependentsAmount":"","exemptions":"","filingStatus":"","higherRate":false,"otherIncomeAmount":"","percentage":"","taxCalculationCode":"","w4FormYear":0},"firstName":"","gender":"","homeAddress":{"address1":"","address2":"","city":"","country":"","county":"","emailAddress":"","mobilePhone":"","phone":"","postalCode":"","state":""},"isHighlyCompensated":false,"isSmoker":false,"lastName":"","localTax":[{"exemptions":"","exemptions2":"","filingStatus":"","residentPSD":"","taxCode":"","workPSD":""}],"mainDirectDeposit":{"accountNumber":"","accountType":"","blockSpecial":false,"isSkipPreNote":false,"nameOnAccount":"","preNoteDate":"","routingNumber":""},"maritalStatus":"","middleName":"","nonPrimaryStateTax":{"amount":"","deductionsAmount":"","dependentsAmount":"","exemptions":"","exemptions2":"","filingStatus":"","higherRate":false,"otherIncomeAmount":"","percentage":"","reciprocityCode":"","specialCheckCalc":"","taxCalculationCode":"","taxCode":"","w4FormYear":0},"ownerPercent":"","preferredName":"","primaryPayRate":{"annualSalary":"","baseRate":"","beginCheckDate":"","changeReason":"","defaultHours":"","effectiveDate":"","isAutoPay":false,"payFrequency":"","payGrade":"","payRateNote":"","payType":"","ratePer":"","salary":""},"primaryStateTax":{"amount":"","deductionsAmount":"","dependentsAmount":"","exemptions":"","exemptions2":"","filingStatus":"","higherRate":false,"otherIncomeAmount":"","percentage":"","specialCheckCalc":"","taxCalculationCode":"","taxCode":"","w4FormYear":0},"priorLastName":"","salutation":"","ssn":"","status":{"adjustedSeniorityDate":"","changeReason":"","effectiveDate":"","employeeStatus":"","hireDate":"","isEligibleForRehire":false,"reHireDate":"","statusType":"","terminationDate":""},"suffix":"","taxSetup":{"fitwExemptNotes":"","fitwExemptReason":"","futaExemptNotes":"","futaExemptReason":"","isEmployee943":false,"isPension":false,"isStatutory":false,"medExemptNotes":"","medExemptReason":"","sitwExemptNotes":"","sitwExemptReason":"","ssExemptNotes":"","ssExemptReason":"","suiExemptNotes":"","suiExemptReason":"","suiState":"","taxDistributionCode1099R":"","taxForm":""},"veteranDescription":"","webTime":{"badgeNumber":"","chargeRate":"","isTimeLaborEnabled":false},"workAddress":{"address1":"","address2":"","city":"","country":"","county":"","emailAddress":"","location":"","mailStop":"","mobilePhone":"","pager":"","phone":"","phoneExtension":"","postalCode":"","state":""},"workEligibility":{"alienOrAdmissionDocumentNumber":"","attestedDate":"","countryOfIssuance":"","foreignPassportNumber":"","i94AdmissionNumber":"","i9DateVerified":"","i9Notes":"","isI9Verified":false,"isSsnVerified":false,"ssnDateVerified":"","ssnNotes":"","visaType":"","workAuthorization":"","workUntil":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"additionalDirectDeposit": @[ @{ @"accountNumber": @"", @"accountType": @"", @"amount": @"", @"amountType": @"", @"blockSpecial": @NO, @"isSkipPreNote": @NO, @"nameOnAccount": @"", @"preNoteDate": @"", @"routingNumber": @"" } ],
@"additionalRate": @[ @{ @"changeReason": @"", @"costCenter1": @"", @"costCenter2": @"", @"costCenter3": @"", @"effectiveDate": @"", @"endCheckDate": @"", @"job": @"", @"rate": @"", @"rateCode": @"", @"rateNotes": @"", @"ratePer": @"", @"shift": @"" } ],
@"benefitSetup": @{ @"benefitClass": @"", @"benefitClassEffectiveDate": @"", @"benefitSalary": @"", @"benefitSalaryEffectiveDate": @"", @"doNotApplyAdministrativePeriod": @NO, @"isMeasureAcaEligibility": @NO },
@"birthDate": @"",
@"coEmpCode": @"",
@"companyFEIN": @"",
@"companyName": @"",
@"currency": @"",
@"customBooleanFields": @[ @{ @"category": @"", @"label": @"", @"value": @NO } ],
@"customDateFields": @[ @{ @"category": @"", @"label": @"", @"value": @"" } ],
@"customDropDownFields": @[ @{ @"category": @"", @"label": @"", @"value": @"" } ],
@"customNumberFields": @[ @{ @"category": @"", @"label": @"", @"value": @"" } ],
@"customTextFields": @[ @{ @"category": @"", @"label": @"", @"value": @"" } ],
@"departmentPosition": @{ @"changeReason": @"", @"clockBadgeNumber": @"", @"costCenter1": @"", @"costCenter2": @"", @"costCenter3": @"", @"effectiveDate": @"", @"employeeType": @"", @"equalEmploymentOpportunityClass": @"", @"isMinimumWageExempt": @NO, @"isOvertimeExempt": @NO, @"isSupervisorReviewer": @NO, @"isUnionDuesCollected": @NO, @"isUnionInitiationCollected": @NO, @"jobTitle": @"", @"payGroup": @"", @"positionCode": @"", @"reviewerCompanyNumber": @"", @"reviewerEmployeeId": @"", @"shift": @"", @"supervisorCompanyNumber": @"", @"supervisorEmployeeId": @"", @"tipped": @"", @"unionAffiliationDate": @"", @"unionCode": @"", @"unionPosition": @"", @"workersCompensation": @"" },
@"disabilityDescription": @"",
@"emergencyContacts": @[ @{ @"address1": @"", @"address2": @"", @"city": @"", @"country": @"", @"county": @"", @"email": @"", @"firstName": @"", @"homePhone": @"", @"lastName": @"", @"mobilePhone": @"", @"notes": @"", @"pager": @"", @"primaryPhone": @"", @"priority": @"", @"relationship": @"", @"state": @"", @"syncEmployeeInfo": @NO, @"workExtension": @"", @"workPhone": @"", @"zip": @"" } ],
@"employeeId": @"",
@"ethnicity": @"",
@"federalTax": @{ @"amount": @"", @"deductionsAmount": @"", @"dependentsAmount": @"", @"exemptions": @"", @"filingStatus": @"", @"higherRate": @NO, @"otherIncomeAmount": @"", @"percentage": @"", @"taxCalculationCode": @"", @"w4FormYear": @0 },
@"firstName": @"",
@"gender": @"",
@"homeAddress": @{ @"address1": @"", @"address2": @"", @"city": @"", @"country": @"", @"county": @"", @"emailAddress": @"", @"mobilePhone": @"", @"phone": @"", @"postalCode": @"", @"state": @"" },
@"isHighlyCompensated": @NO,
@"isSmoker": @NO,
@"lastName": @"",
@"localTax": @[ @{ @"exemptions": @"", @"exemptions2": @"", @"filingStatus": @"", @"residentPSD": @"", @"taxCode": @"", @"workPSD": @"" } ],
@"mainDirectDeposit": @{ @"accountNumber": @"", @"accountType": @"", @"blockSpecial": @NO, @"isSkipPreNote": @NO, @"nameOnAccount": @"", @"preNoteDate": @"", @"routingNumber": @"" },
@"maritalStatus": @"",
@"middleName": @"",
@"nonPrimaryStateTax": @{ @"amount": @"", @"deductionsAmount": @"", @"dependentsAmount": @"", @"exemptions": @"", @"exemptions2": @"", @"filingStatus": @"", @"higherRate": @NO, @"otherIncomeAmount": @"", @"percentage": @"", @"reciprocityCode": @"", @"specialCheckCalc": @"", @"taxCalculationCode": @"", @"taxCode": @"", @"w4FormYear": @0 },
@"ownerPercent": @"",
@"preferredName": @"",
@"primaryPayRate": @{ @"annualSalary": @"", @"baseRate": @"", @"beginCheckDate": @"", @"changeReason": @"", @"defaultHours": @"", @"effectiveDate": @"", @"isAutoPay": @NO, @"payFrequency": @"", @"payGrade": @"", @"payRateNote": @"", @"payType": @"", @"ratePer": @"", @"salary": @"" },
@"primaryStateTax": @{ @"amount": @"", @"deductionsAmount": @"", @"dependentsAmount": @"", @"exemptions": @"", @"exemptions2": @"", @"filingStatus": @"", @"higherRate": @NO, @"otherIncomeAmount": @"", @"percentage": @"", @"specialCheckCalc": @"", @"taxCalculationCode": @"", @"taxCode": @"", @"w4FormYear": @0 },
@"priorLastName": @"",
@"salutation": @"",
@"ssn": @"",
@"status": @{ @"adjustedSeniorityDate": @"", @"changeReason": @"", @"effectiveDate": @"", @"employeeStatus": @"", @"hireDate": @"", @"isEligibleForRehire": @NO, @"reHireDate": @"", @"statusType": @"", @"terminationDate": @"" },
@"suffix": @"",
@"taxSetup": @{ @"fitwExemptNotes": @"", @"fitwExemptReason": @"", @"futaExemptNotes": @"", @"futaExemptReason": @"", @"isEmployee943": @NO, @"isPension": @NO, @"isStatutory": @NO, @"medExemptNotes": @"", @"medExemptReason": @"", @"sitwExemptNotes": @"", @"sitwExemptReason": @"", @"ssExemptNotes": @"", @"ssExemptReason": @"", @"suiExemptNotes": @"", @"suiExemptReason": @"", @"suiState": @"", @"taxDistributionCode1099R": @"", @"taxForm": @"" },
@"veteranDescription": @"",
@"webTime": @{ @"badgeNumber": @"", @"chargeRate": @"", @"isTimeLaborEnabled": @NO },
@"workAddress": @{ @"address1": @"", @"address2": @"", @"city": @"", @"country": @"", @"county": @"", @"emailAddress": @"", @"location": @"", @"mailStop": @"", @"mobilePhone": @"", @"pager": @"", @"phone": @"", @"phoneExtension": @"", @"postalCode": @"", @"state": @"" },
@"workEligibility": @{ @"alienOrAdmissionDocumentNumber": @"", @"attestedDate": @"", @"countryOfIssuance": @"", @"foreignPassportNumber": @"", @"i94AdmissionNumber": @"", @"i9DateVerified": @"", @"i9Notes": @"", @"isI9Verified": @NO, @"isSsnVerified": @NO, @"ssnDateVerified": @"", @"ssnNotes": @"", @"visaType": @"", @"workAuthorization": @"", @"workUntil": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/companies/:companyId/employees/:employeeId"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"additionalDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"amount\": \"\",\n \"amountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"additionalRate\": [\n {\n \"changeReason\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"endCheckDate\": \"\",\n \"job\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"rateNotes\": \"\",\n \"ratePer\": \"\",\n \"shift\": \"\"\n }\n ],\n \"benefitSetup\": {\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n },\n \"birthDate\": \"\",\n \"coEmpCode\": \"\",\n \"companyFEIN\": \"\",\n \"companyName\": \"\",\n \"currency\": \"\",\n \"customBooleanFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": false\n }\n ],\n \"customDateFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customDropDownFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customNumberFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customTextFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"departmentPosition\": {\n \"changeReason\": \"\",\n \"clockBadgeNumber\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"employeeType\": \"\",\n \"equalEmploymentOpportunityClass\": \"\",\n \"isMinimumWageExempt\": false,\n \"isOvertimeExempt\": false,\n \"isSupervisorReviewer\": false,\n \"isUnionDuesCollected\": false,\n \"isUnionInitiationCollected\": false,\n \"jobTitle\": \"\",\n \"payGroup\": \"\",\n \"positionCode\": \"\",\n \"reviewerCompanyNumber\": \"\",\n \"reviewerEmployeeId\": \"\",\n \"shift\": \"\",\n \"supervisorCompanyNumber\": \"\",\n \"supervisorEmployeeId\": \"\",\n \"tipped\": \"\",\n \"unionAffiliationDate\": \"\",\n \"unionCode\": \"\",\n \"unionPosition\": \"\",\n \"workersCompensation\": \"\"\n },\n \"disabilityDescription\": \"\",\n \"emergencyContacts\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"homePhone\": \"\",\n \"lastName\": \"\",\n \"mobilePhone\": \"\",\n \"notes\": \"\",\n \"pager\": \"\",\n \"primaryPhone\": \"\",\n \"priority\": \"\",\n \"relationship\": \"\",\n \"state\": \"\",\n \"syncEmployeeInfo\": false,\n \"workExtension\": \"\",\n \"workPhone\": \"\",\n \"zip\": \"\"\n }\n ],\n \"employeeId\": \"\",\n \"ethnicity\": \"\",\n \"federalTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"taxCalculationCode\": \"\",\n \"w4FormYear\": 0\n },\n \"firstName\": \"\",\n \"gender\": \"\",\n \"homeAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"isHighlyCompensated\": false,\n \"isSmoker\": false,\n \"lastName\": \"\",\n \"localTax\": [\n {\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n }\n ],\n \"mainDirectDeposit\": {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n },\n \"maritalStatus\": \"\",\n \"middleName\": \"\",\n \"nonPrimaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"ownerPercent\": \"\",\n \"preferredName\": \"\",\n \"primaryPayRate\": {\n \"annualSalary\": \"\",\n \"baseRate\": \"\",\n \"beginCheckDate\": \"\",\n \"changeReason\": \"\",\n \"defaultHours\": \"\",\n \"effectiveDate\": \"\",\n \"isAutoPay\": false,\n \"payFrequency\": \"\",\n \"payGrade\": \"\",\n \"payRateNote\": \"\",\n \"payType\": \"\",\n \"ratePer\": \"\",\n \"salary\": \"\"\n },\n \"primaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"priorLastName\": \"\",\n \"salutation\": \"\",\n \"ssn\": \"\",\n \"status\": {\n \"adjustedSeniorityDate\": \"\",\n \"changeReason\": \"\",\n \"effectiveDate\": \"\",\n \"employeeStatus\": \"\",\n \"hireDate\": \"\",\n \"isEligibleForRehire\": false,\n \"reHireDate\": \"\",\n \"statusType\": \"\",\n \"terminationDate\": \"\"\n },\n \"suffix\": \"\",\n \"taxSetup\": {\n \"fitwExemptNotes\": \"\",\n \"fitwExemptReason\": \"\",\n \"futaExemptNotes\": \"\",\n \"futaExemptReason\": \"\",\n \"isEmployee943\": false,\n \"isPension\": false,\n \"isStatutory\": false,\n \"medExemptNotes\": \"\",\n \"medExemptReason\": \"\",\n \"sitwExemptNotes\": \"\",\n \"sitwExemptReason\": \"\",\n \"ssExemptNotes\": \"\",\n \"ssExemptReason\": \"\",\n \"suiExemptNotes\": \"\",\n \"suiExemptReason\": \"\",\n \"suiState\": \"\",\n \"taxDistributionCode1099R\": \"\",\n \"taxForm\": \"\"\n },\n \"veteranDescription\": \"\",\n \"webTime\": {\n \"badgeNumber\": \"\",\n \"chargeRate\": \"\",\n \"isTimeLaborEnabled\": false\n },\n \"workAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"location\": \"\",\n \"mailStop\": \"\",\n \"mobilePhone\": \"\",\n \"pager\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"workEligibility\": {\n \"alienOrAdmissionDocumentNumber\": \"\",\n \"attestedDate\": \"\",\n \"countryOfIssuance\": \"\",\n \"foreignPassportNumber\": \"\",\n \"i94AdmissionNumber\": \"\",\n \"i9DateVerified\": \"\",\n \"i9Notes\": \"\",\n \"isI9Verified\": false,\n \"isSsnVerified\": false,\n \"ssnDateVerified\": \"\",\n \"ssnNotes\": \"\",\n \"visaType\": \"\",\n \"workAuthorization\": \"\",\n \"workUntil\": \"\"\n }\n}" in
Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/companies/:companyId/employees/:employeeId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'additionalDirectDeposit' => [
[
'accountNumber' => '',
'accountType' => '',
'amount' => '',
'amountType' => '',
'blockSpecial' => null,
'isSkipPreNote' => null,
'nameOnAccount' => '',
'preNoteDate' => '',
'routingNumber' => ''
]
],
'additionalRate' => [
[
'changeReason' => '',
'costCenter1' => '',
'costCenter2' => '',
'costCenter3' => '',
'effectiveDate' => '',
'endCheckDate' => '',
'job' => '',
'rate' => '',
'rateCode' => '',
'rateNotes' => '',
'ratePer' => '',
'shift' => ''
]
],
'benefitSetup' => [
'benefitClass' => '',
'benefitClassEffectiveDate' => '',
'benefitSalary' => '',
'benefitSalaryEffectiveDate' => '',
'doNotApplyAdministrativePeriod' => null,
'isMeasureAcaEligibility' => null
],
'birthDate' => '',
'coEmpCode' => '',
'companyFEIN' => '',
'companyName' => '',
'currency' => '',
'customBooleanFields' => [
[
'category' => '',
'label' => '',
'value' => null
]
],
'customDateFields' => [
[
'category' => '',
'label' => '',
'value' => ''
]
],
'customDropDownFields' => [
[
'category' => '',
'label' => '',
'value' => ''
]
],
'customNumberFields' => [
[
'category' => '',
'label' => '',
'value' => ''
]
],
'customTextFields' => [
[
'category' => '',
'label' => '',
'value' => ''
]
],
'departmentPosition' => [
'changeReason' => '',
'clockBadgeNumber' => '',
'costCenter1' => '',
'costCenter2' => '',
'costCenter3' => '',
'effectiveDate' => '',
'employeeType' => '',
'equalEmploymentOpportunityClass' => '',
'isMinimumWageExempt' => null,
'isOvertimeExempt' => null,
'isSupervisorReviewer' => null,
'isUnionDuesCollected' => null,
'isUnionInitiationCollected' => null,
'jobTitle' => '',
'payGroup' => '',
'positionCode' => '',
'reviewerCompanyNumber' => '',
'reviewerEmployeeId' => '',
'shift' => '',
'supervisorCompanyNumber' => '',
'supervisorEmployeeId' => '',
'tipped' => '',
'unionAffiliationDate' => '',
'unionCode' => '',
'unionPosition' => '',
'workersCompensation' => ''
],
'disabilityDescription' => '',
'emergencyContacts' => [
[
'address1' => '',
'address2' => '',
'city' => '',
'country' => '',
'county' => '',
'email' => '',
'firstName' => '',
'homePhone' => '',
'lastName' => '',
'mobilePhone' => '',
'notes' => '',
'pager' => '',
'primaryPhone' => '',
'priority' => '',
'relationship' => '',
'state' => '',
'syncEmployeeInfo' => null,
'workExtension' => '',
'workPhone' => '',
'zip' => ''
]
],
'employeeId' => '',
'ethnicity' => '',
'federalTax' => [
'amount' => '',
'deductionsAmount' => '',
'dependentsAmount' => '',
'exemptions' => '',
'filingStatus' => '',
'higherRate' => null,
'otherIncomeAmount' => '',
'percentage' => '',
'taxCalculationCode' => '',
'w4FormYear' => 0
],
'firstName' => '',
'gender' => '',
'homeAddress' => [
'address1' => '',
'address2' => '',
'city' => '',
'country' => '',
'county' => '',
'emailAddress' => '',
'mobilePhone' => '',
'phone' => '',
'postalCode' => '',
'state' => ''
],
'isHighlyCompensated' => null,
'isSmoker' => null,
'lastName' => '',
'localTax' => [
[
'exemptions' => '',
'exemptions2' => '',
'filingStatus' => '',
'residentPSD' => '',
'taxCode' => '',
'workPSD' => ''
]
],
'mainDirectDeposit' => [
'accountNumber' => '',
'accountType' => '',
'blockSpecial' => null,
'isSkipPreNote' => null,
'nameOnAccount' => '',
'preNoteDate' => '',
'routingNumber' => ''
],
'maritalStatus' => '',
'middleName' => '',
'nonPrimaryStateTax' => [
'amount' => '',
'deductionsAmount' => '',
'dependentsAmount' => '',
'exemptions' => '',
'exemptions2' => '',
'filingStatus' => '',
'higherRate' => null,
'otherIncomeAmount' => '',
'percentage' => '',
'reciprocityCode' => '',
'specialCheckCalc' => '',
'taxCalculationCode' => '',
'taxCode' => '',
'w4FormYear' => 0
],
'ownerPercent' => '',
'preferredName' => '',
'primaryPayRate' => [
'annualSalary' => '',
'baseRate' => '',
'beginCheckDate' => '',
'changeReason' => '',
'defaultHours' => '',
'effectiveDate' => '',
'isAutoPay' => null,
'payFrequency' => '',
'payGrade' => '',
'payRateNote' => '',
'payType' => '',
'ratePer' => '',
'salary' => ''
],
'primaryStateTax' => [
'amount' => '',
'deductionsAmount' => '',
'dependentsAmount' => '',
'exemptions' => '',
'exemptions2' => '',
'filingStatus' => '',
'higherRate' => null,
'otherIncomeAmount' => '',
'percentage' => '',
'specialCheckCalc' => '',
'taxCalculationCode' => '',
'taxCode' => '',
'w4FormYear' => 0
],
'priorLastName' => '',
'salutation' => '',
'ssn' => '',
'status' => [
'adjustedSeniorityDate' => '',
'changeReason' => '',
'effectiveDate' => '',
'employeeStatus' => '',
'hireDate' => '',
'isEligibleForRehire' => null,
'reHireDate' => '',
'statusType' => '',
'terminationDate' => ''
],
'suffix' => '',
'taxSetup' => [
'fitwExemptNotes' => '',
'fitwExemptReason' => '',
'futaExemptNotes' => '',
'futaExemptReason' => '',
'isEmployee943' => null,
'isPension' => null,
'isStatutory' => null,
'medExemptNotes' => '',
'medExemptReason' => '',
'sitwExemptNotes' => '',
'sitwExemptReason' => '',
'ssExemptNotes' => '',
'ssExemptReason' => '',
'suiExemptNotes' => '',
'suiExemptReason' => '',
'suiState' => '',
'taxDistributionCode1099R' => '',
'taxForm' => ''
],
'veteranDescription' => '',
'webTime' => [
'badgeNumber' => '',
'chargeRate' => '',
'isTimeLaborEnabled' => null
],
'workAddress' => [
'address1' => '',
'address2' => '',
'city' => '',
'country' => '',
'county' => '',
'emailAddress' => '',
'location' => '',
'mailStop' => '',
'mobilePhone' => '',
'pager' => '',
'phone' => '',
'phoneExtension' => '',
'postalCode' => '',
'state' => ''
],
'workEligibility' => [
'alienOrAdmissionDocumentNumber' => '',
'attestedDate' => '',
'countryOfIssuance' => '',
'foreignPassportNumber' => '',
'i94AdmissionNumber' => '',
'i9DateVerified' => '',
'i9Notes' => '',
'isI9Verified' => null,
'isSsnVerified' => null,
'ssnDateVerified' => '',
'ssnNotes' => '',
'visaType' => '',
'workAuthorization' => '',
'workUntil' => ''
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PATCH', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId', [
'body' => '{
"additionalDirectDeposit": [
{
"accountNumber": "",
"accountType": "",
"amount": "",
"amountType": "",
"blockSpecial": false,
"isSkipPreNote": false,
"nameOnAccount": "",
"preNoteDate": "",
"routingNumber": ""
}
],
"additionalRate": [
{
"changeReason": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"endCheckDate": "",
"job": "",
"rate": "",
"rateCode": "",
"rateNotes": "",
"ratePer": "",
"shift": ""
}
],
"benefitSetup": {
"benefitClass": "",
"benefitClassEffectiveDate": "",
"benefitSalary": "",
"benefitSalaryEffectiveDate": "",
"doNotApplyAdministrativePeriod": false,
"isMeasureAcaEligibility": false
},
"birthDate": "",
"coEmpCode": "",
"companyFEIN": "",
"companyName": "",
"currency": "",
"customBooleanFields": [
{
"category": "",
"label": "",
"value": false
}
],
"customDateFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customDropDownFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customNumberFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customTextFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"departmentPosition": {
"changeReason": "",
"clockBadgeNumber": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"employeeType": "",
"equalEmploymentOpportunityClass": "",
"isMinimumWageExempt": false,
"isOvertimeExempt": false,
"isSupervisorReviewer": false,
"isUnionDuesCollected": false,
"isUnionInitiationCollected": false,
"jobTitle": "",
"payGroup": "",
"positionCode": "",
"reviewerCompanyNumber": "",
"reviewerEmployeeId": "",
"shift": "",
"supervisorCompanyNumber": "",
"supervisorEmployeeId": "",
"tipped": "",
"unionAffiliationDate": "",
"unionCode": "",
"unionPosition": "",
"workersCompensation": ""
},
"disabilityDescription": "",
"emergencyContacts": [
{
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"email": "",
"firstName": "",
"homePhone": "",
"lastName": "",
"mobilePhone": "",
"notes": "",
"pager": "",
"primaryPhone": "",
"priority": "",
"relationship": "",
"state": "",
"syncEmployeeInfo": false,
"workExtension": "",
"workPhone": "",
"zip": ""
}
],
"employeeId": "",
"ethnicity": "",
"federalTax": {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"taxCalculationCode": "",
"w4FormYear": 0
},
"firstName": "",
"gender": "",
"homeAddress": {
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"mobilePhone": "",
"phone": "",
"postalCode": "",
"state": ""
},
"isHighlyCompensated": false,
"isSmoker": false,
"lastName": "",
"localTax": [
{
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"residentPSD": "",
"taxCode": "",
"workPSD": ""
}
],
"mainDirectDeposit": {
"accountNumber": "",
"accountType": "",
"blockSpecial": false,
"isSkipPreNote": false,
"nameOnAccount": "",
"preNoteDate": "",
"routingNumber": ""
},
"maritalStatus": "",
"middleName": "",
"nonPrimaryStateTax": {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"reciprocityCode": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
},
"ownerPercent": "",
"preferredName": "",
"primaryPayRate": {
"annualSalary": "",
"baseRate": "",
"beginCheckDate": "",
"changeReason": "",
"defaultHours": "",
"effectiveDate": "",
"isAutoPay": false,
"payFrequency": "",
"payGrade": "",
"payRateNote": "",
"payType": "",
"ratePer": "",
"salary": ""
},
"primaryStateTax": {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
},
"priorLastName": "",
"salutation": "",
"ssn": "",
"status": {
"adjustedSeniorityDate": "",
"changeReason": "",
"effectiveDate": "",
"employeeStatus": "",
"hireDate": "",
"isEligibleForRehire": false,
"reHireDate": "",
"statusType": "",
"terminationDate": ""
},
"suffix": "",
"taxSetup": {
"fitwExemptNotes": "",
"fitwExemptReason": "",
"futaExemptNotes": "",
"futaExemptReason": "",
"isEmployee943": false,
"isPension": false,
"isStatutory": false,
"medExemptNotes": "",
"medExemptReason": "",
"sitwExemptNotes": "",
"sitwExemptReason": "",
"ssExemptNotes": "",
"ssExemptReason": "",
"suiExemptNotes": "",
"suiExemptReason": "",
"suiState": "",
"taxDistributionCode1099R": "",
"taxForm": ""
},
"veteranDescription": "",
"webTime": {
"badgeNumber": "",
"chargeRate": "",
"isTimeLaborEnabled": false
},
"workAddress": {
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"location": "",
"mailStop": "",
"mobilePhone": "",
"pager": "",
"phone": "",
"phoneExtension": "",
"postalCode": "",
"state": ""
},
"workEligibility": {
"alienOrAdmissionDocumentNumber": "",
"attestedDate": "",
"countryOfIssuance": "",
"foreignPassportNumber": "",
"i94AdmissionNumber": "",
"i9DateVerified": "",
"i9Notes": "",
"isI9Verified": false,
"isSsnVerified": false,
"ssnDateVerified": "",
"ssnNotes": "",
"visaType": "",
"workAuthorization": "",
"workUntil": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/companies/:companyId/employees/:employeeId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'additionalDirectDeposit' => [
[
'accountNumber' => '',
'accountType' => '',
'amount' => '',
'amountType' => '',
'blockSpecial' => null,
'isSkipPreNote' => null,
'nameOnAccount' => '',
'preNoteDate' => '',
'routingNumber' => ''
]
],
'additionalRate' => [
[
'changeReason' => '',
'costCenter1' => '',
'costCenter2' => '',
'costCenter3' => '',
'effectiveDate' => '',
'endCheckDate' => '',
'job' => '',
'rate' => '',
'rateCode' => '',
'rateNotes' => '',
'ratePer' => '',
'shift' => ''
]
],
'benefitSetup' => [
'benefitClass' => '',
'benefitClassEffectiveDate' => '',
'benefitSalary' => '',
'benefitSalaryEffectiveDate' => '',
'doNotApplyAdministrativePeriod' => null,
'isMeasureAcaEligibility' => null
],
'birthDate' => '',
'coEmpCode' => '',
'companyFEIN' => '',
'companyName' => '',
'currency' => '',
'customBooleanFields' => [
[
'category' => '',
'label' => '',
'value' => null
]
],
'customDateFields' => [
[
'category' => '',
'label' => '',
'value' => ''
]
],
'customDropDownFields' => [
[
'category' => '',
'label' => '',
'value' => ''
]
],
'customNumberFields' => [
[
'category' => '',
'label' => '',
'value' => ''
]
],
'customTextFields' => [
[
'category' => '',
'label' => '',
'value' => ''
]
],
'departmentPosition' => [
'changeReason' => '',
'clockBadgeNumber' => '',
'costCenter1' => '',
'costCenter2' => '',
'costCenter3' => '',
'effectiveDate' => '',
'employeeType' => '',
'equalEmploymentOpportunityClass' => '',
'isMinimumWageExempt' => null,
'isOvertimeExempt' => null,
'isSupervisorReviewer' => null,
'isUnionDuesCollected' => null,
'isUnionInitiationCollected' => null,
'jobTitle' => '',
'payGroup' => '',
'positionCode' => '',
'reviewerCompanyNumber' => '',
'reviewerEmployeeId' => '',
'shift' => '',
'supervisorCompanyNumber' => '',
'supervisorEmployeeId' => '',
'tipped' => '',
'unionAffiliationDate' => '',
'unionCode' => '',
'unionPosition' => '',
'workersCompensation' => ''
],
'disabilityDescription' => '',
'emergencyContacts' => [
[
'address1' => '',
'address2' => '',
'city' => '',
'country' => '',
'county' => '',
'email' => '',
'firstName' => '',
'homePhone' => '',
'lastName' => '',
'mobilePhone' => '',
'notes' => '',
'pager' => '',
'primaryPhone' => '',
'priority' => '',
'relationship' => '',
'state' => '',
'syncEmployeeInfo' => null,
'workExtension' => '',
'workPhone' => '',
'zip' => ''
]
],
'employeeId' => '',
'ethnicity' => '',
'federalTax' => [
'amount' => '',
'deductionsAmount' => '',
'dependentsAmount' => '',
'exemptions' => '',
'filingStatus' => '',
'higherRate' => null,
'otherIncomeAmount' => '',
'percentage' => '',
'taxCalculationCode' => '',
'w4FormYear' => 0
],
'firstName' => '',
'gender' => '',
'homeAddress' => [
'address1' => '',
'address2' => '',
'city' => '',
'country' => '',
'county' => '',
'emailAddress' => '',
'mobilePhone' => '',
'phone' => '',
'postalCode' => '',
'state' => ''
],
'isHighlyCompensated' => null,
'isSmoker' => null,
'lastName' => '',
'localTax' => [
[
'exemptions' => '',
'exemptions2' => '',
'filingStatus' => '',
'residentPSD' => '',
'taxCode' => '',
'workPSD' => ''
]
],
'mainDirectDeposit' => [
'accountNumber' => '',
'accountType' => '',
'blockSpecial' => null,
'isSkipPreNote' => null,
'nameOnAccount' => '',
'preNoteDate' => '',
'routingNumber' => ''
],
'maritalStatus' => '',
'middleName' => '',
'nonPrimaryStateTax' => [
'amount' => '',
'deductionsAmount' => '',
'dependentsAmount' => '',
'exemptions' => '',
'exemptions2' => '',
'filingStatus' => '',
'higherRate' => null,
'otherIncomeAmount' => '',
'percentage' => '',
'reciprocityCode' => '',
'specialCheckCalc' => '',
'taxCalculationCode' => '',
'taxCode' => '',
'w4FormYear' => 0
],
'ownerPercent' => '',
'preferredName' => '',
'primaryPayRate' => [
'annualSalary' => '',
'baseRate' => '',
'beginCheckDate' => '',
'changeReason' => '',
'defaultHours' => '',
'effectiveDate' => '',
'isAutoPay' => null,
'payFrequency' => '',
'payGrade' => '',
'payRateNote' => '',
'payType' => '',
'ratePer' => '',
'salary' => ''
],
'primaryStateTax' => [
'amount' => '',
'deductionsAmount' => '',
'dependentsAmount' => '',
'exemptions' => '',
'exemptions2' => '',
'filingStatus' => '',
'higherRate' => null,
'otherIncomeAmount' => '',
'percentage' => '',
'specialCheckCalc' => '',
'taxCalculationCode' => '',
'taxCode' => '',
'w4FormYear' => 0
],
'priorLastName' => '',
'salutation' => '',
'ssn' => '',
'status' => [
'adjustedSeniorityDate' => '',
'changeReason' => '',
'effectiveDate' => '',
'employeeStatus' => '',
'hireDate' => '',
'isEligibleForRehire' => null,
'reHireDate' => '',
'statusType' => '',
'terminationDate' => ''
],
'suffix' => '',
'taxSetup' => [
'fitwExemptNotes' => '',
'fitwExemptReason' => '',
'futaExemptNotes' => '',
'futaExemptReason' => '',
'isEmployee943' => null,
'isPension' => null,
'isStatutory' => null,
'medExemptNotes' => '',
'medExemptReason' => '',
'sitwExemptNotes' => '',
'sitwExemptReason' => '',
'ssExemptNotes' => '',
'ssExemptReason' => '',
'suiExemptNotes' => '',
'suiExemptReason' => '',
'suiState' => '',
'taxDistributionCode1099R' => '',
'taxForm' => ''
],
'veteranDescription' => '',
'webTime' => [
'badgeNumber' => '',
'chargeRate' => '',
'isTimeLaborEnabled' => null
],
'workAddress' => [
'address1' => '',
'address2' => '',
'city' => '',
'country' => '',
'county' => '',
'emailAddress' => '',
'location' => '',
'mailStop' => '',
'mobilePhone' => '',
'pager' => '',
'phone' => '',
'phoneExtension' => '',
'postalCode' => '',
'state' => ''
],
'workEligibility' => [
'alienOrAdmissionDocumentNumber' => '',
'attestedDate' => '',
'countryOfIssuance' => '',
'foreignPassportNumber' => '',
'i94AdmissionNumber' => '',
'i9DateVerified' => '',
'i9Notes' => '',
'isI9Verified' => null,
'isSsnVerified' => null,
'ssnDateVerified' => '',
'ssnNotes' => '',
'visaType' => '',
'workAuthorization' => '',
'workUntil' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'additionalDirectDeposit' => [
[
'accountNumber' => '',
'accountType' => '',
'amount' => '',
'amountType' => '',
'blockSpecial' => null,
'isSkipPreNote' => null,
'nameOnAccount' => '',
'preNoteDate' => '',
'routingNumber' => ''
]
],
'additionalRate' => [
[
'changeReason' => '',
'costCenter1' => '',
'costCenter2' => '',
'costCenter3' => '',
'effectiveDate' => '',
'endCheckDate' => '',
'job' => '',
'rate' => '',
'rateCode' => '',
'rateNotes' => '',
'ratePer' => '',
'shift' => ''
]
],
'benefitSetup' => [
'benefitClass' => '',
'benefitClassEffectiveDate' => '',
'benefitSalary' => '',
'benefitSalaryEffectiveDate' => '',
'doNotApplyAdministrativePeriod' => null,
'isMeasureAcaEligibility' => null
],
'birthDate' => '',
'coEmpCode' => '',
'companyFEIN' => '',
'companyName' => '',
'currency' => '',
'customBooleanFields' => [
[
'category' => '',
'label' => '',
'value' => null
]
],
'customDateFields' => [
[
'category' => '',
'label' => '',
'value' => ''
]
],
'customDropDownFields' => [
[
'category' => '',
'label' => '',
'value' => ''
]
],
'customNumberFields' => [
[
'category' => '',
'label' => '',
'value' => ''
]
],
'customTextFields' => [
[
'category' => '',
'label' => '',
'value' => ''
]
],
'departmentPosition' => [
'changeReason' => '',
'clockBadgeNumber' => '',
'costCenter1' => '',
'costCenter2' => '',
'costCenter3' => '',
'effectiveDate' => '',
'employeeType' => '',
'equalEmploymentOpportunityClass' => '',
'isMinimumWageExempt' => null,
'isOvertimeExempt' => null,
'isSupervisorReviewer' => null,
'isUnionDuesCollected' => null,
'isUnionInitiationCollected' => null,
'jobTitle' => '',
'payGroup' => '',
'positionCode' => '',
'reviewerCompanyNumber' => '',
'reviewerEmployeeId' => '',
'shift' => '',
'supervisorCompanyNumber' => '',
'supervisorEmployeeId' => '',
'tipped' => '',
'unionAffiliationDate' => '',
'unionCode' => '',
'unionPosition' => '',
'workersCompensation' => ''
],
'disabilityDescription' => '',
'emergencyContacts' => [
[
'address1' => '',
'address2' => '',
'city' => '',
'country' => '',
'county' => '',
'email' => '',
'firstName' => '',
'homePhone' => '',
'lastName' => '',
'mobilePhone' => '',
'notes' => '',
'pager' => '',
'primaryPhone' => '',
'priority' => '',
'relationship' => '',
'state' => '',
'syncEmployeeInfo' => null,
'workExtension' => '',
'workPhone' => '',
'zip' => ''
]
],
'employeeId' => '',
'ethnicity' => '',
'federalTax' => [
'amount' => '',
'deductionsAmount' => '',
'dependentsAmount' => '',
'exemptions' => '',
'filingStatus' => '',
'higherRate' => null,
'otherIncomeAmount' => '',
'percentage' => '',
'taxCalculationCode' => '',
'w4FormYear' => 0
],
'firstName' => '',
'gender' => '',
'homeAddress' => [
'address1' => '',
'address2' => '',
'city' => '',
'country' => '',
'county' => '',
'emailAddress' => '',
'mobilePhone' => '',
'phone' => '',
'postalCode' => '',
'state' => ''
],
'isHighlyCompensated' => null,
'isSmoker' => null,
'lastName' => '',
'localTax' => [
[
'exemptions' => '',
'exemptions2' => '',
'filingStatus' => '',
'residentPSD' => '',
'taxCode' => '',
'workPSD' => ''
]
],
'mainDirectDeposit' => [
'accountNumber' => '',
'accountType' => '',
'blockSpecial' => null,
'isSkipPreNote' => null,
'nameOnAccount' => '',
'preNoteDate' => '',
'routingNumber' => ''
],
'maritalStatus' => '',
'middleName' => '',
'nonPrimaryStateTax' => [
'amount' => '',
'deductionsAmount' => '',
'dependentsAmount' => '',
'exemptions' => '',
'exemptions2' => '',
'filingStatus' => '',
'higherRate' => null,
'otherIncomeAmount' => '',
'percentage' => '',
'reciprocityCode' => '',
'specialCheckCalc' => '',
'taxCalculationCode' => '',
'taxCode' => '',
'w4FormYear' => 0
],
'ownerPercent' => '',
'preferredName' => '',
'primaryPayRate' => [
'annualSalary' => '',
'baseRate' => '',
'beginCheckDate' => '',
'changeReason' => '',
'defaultHours' => '',
'effectiveDate' => '',
'isAutoPay' => null,
'payFrequency' => '',
'payGrade' => '',
'payRateNote' => '',
'payType' => '',
'ratePer' => '',
'salary' => ''
],
'primaryStateTax' => [
'amount' => '',
'deductionsAmount' => '',
'dependentsAmount' => '',
'exemptions' => '',
'exemptions2' => '',
'filingStatus' => '',
'higherRate' => null,
'otherIncomeAmount' => '',
'percentage' => '',
'specialCheckCalc' => '',
'taxCalculationCode' => '',
'taxCode' => '',
'w4FormYear' => 0
],
'priorLastName' => '',
'salutation' => '',
'ssn' => '',
'status' => [
'adjustedSeniorityDate' => '',
'changeReason' => '',
'effectiveDate' => '',
'employeeStatus' => '',
'hireDate' => '',
'isEligibleForRehire' => null,
'reHireDate' => '',
'statusType' => '',
'terminationDate' => ''
],
'suffix' => '',
'taxSetup' => [
'fitwExemptNotes' => '',
'fitwExemptReason' => '',
'futaExemptNotes' => '',
'futaExemptReason' => '',
'isEmployee943' => null,
'isPension' => null,
'isStatutory' => null,
'medExemptNotes' => '',
'medExemptReason' => '',
'sitwExemptNotes' => '',
'sitwExemptReason' => '',
'ssExemptNotes' => '',
'ssExemptReason' => '',
'suiExemptNotes' => '',
'suiExemptReason' => '',
'suiState' => '',
'taxDistributionCode1099R' => '',
'taxForm' => ''
],
'veteranDescription' => '',
'webTime' => [
'badgeNumber' => '',
'chargeRate' => '',
'isTimeLaborEnabled' => null
],
'workAddress' => [
'address1' => '',
'address2' => '',
'city' => '',
'country' => '',
'county' => '',
'emailAddress' => '',
'location' => '',
'mailStop' => '',
'mobilePhone' => '',
'pager' => '',
'phone' => '',
'phoneExtension' => '',
'postalCode' => '',
'state' => ''
],
'workEligibility' => [
'alienOrAdmissionDocumentNumber' => '',
'attestedDate' => '',
'countryOfIssuance' => '',
'foreignPassportNumber' => '',
'i94AdmissionNumber' => '',
'i9DateVerified' => '',
'i9Notes' => '',
'isI9Verified' => null,
'isSsnVerified' => null,
'ssnDateVerified' => '',
'ssnNotes' => '',
'visaType' => '',
'workAuthorization' => '',
'workUntil' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/v2/companies/:companyId/employees/:employeeId');
$request->setRequestMethod('PATCH');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"additionalDirectDeposit": [
{
"accountNumber": "",
"accountType": "",
"amount": "",
"amountType": "",
"blockSpecial": false,
"isSkipPreNote": false,
"nameOnAccount": "",
"preNoteDate": "",
"routingNumber": ""
}
],
"additionalRate": [
{
"changeReason": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"endCheckDate": "",
"job": "",
"rate": "",
"rateCode": "",
"rateNotes": "",
"ratePer": "",
"shift": ""
}
],
"benefitSetup": {
"benefitClass": "",
"benefitClassEffectiveDate": "",
"benefitSalary": "",
"benefitSalaryEffectiveDate": "",
"doNotApplyAdministrativePeriod": false,
"isMeasureAcaEligibility": false
},
"birthDate": "",
"coEmpCode": "",
"companyFEIN": "",
"companyName": "",
"currency": "",
"customBooleanFields": [
{
"category": "",
"label": "",
"value": false
}
],
"customDateFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customDropDownFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customNumberFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customTextFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"departmentPosition": {
"changeReason": "",
"clockBadgeNumber": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"employeeType": "",
"equalEmploymentOpportunityClass": "",
"isMinimumWageExempt": false,
"isOvertimeExempt": false,
"isSupervisorReviewer": false,
"isUnionDuesCollected": false,
"isUnionInitiationCollected": false,
"jobTitle": "",
"payGroup": "",
"positionCode": "",
"reviewerCompanyNumber": "",
"reviewerEmployeeId": "",
"shift": "",
"supervisorCompanyNumber": "",
"supervisorEmployeeId": "",
"tipped": "",
"unionAffiliationDate": "",
"unionCode": "",
"unionPosition": "",
"workersCompensation": ""
},
"disabilityDescription": "",
"emergencyContacts": [
{
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"email": "",
"firstName": "",
"homePhone": "",
"lastName": "",
"mobilePhone": "",
"notes": "",
"pager": "",
"primaryPhone": "",
"priority": "",
"relationship": "",
"state": "",
"syncEmployeeInfo": false,
"workExtension": "",
"workPhone": "",
"zip": ""
}
],
"employeeId": "",
"ethnicity": "",
"federalTax": {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"taxCalculationCode": "",
"w4FormYear": 0
},
"firstName": "",
"gender": "",
"homeAddress": {
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"mobilePhone": "",
"phone": "",
"postalCode": "",
"state": ""
},
"isHighlyCompensated": false,
"isSmoker": false,
"lastName": "",
"localTax": [
{
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"residentPSD": "",
"taxCode": "",
"workPSD": ""
}
],
"mainDirectDeposit": {
"accountNumber": "",
"accountType": "",
"blockSpecial": false,
"isSkipPreNote": false,
"nameOnAccount": "",
"preNoteDate": "",
"routingNumber": ""
},
"maritalStatus": "",
"middleName": "",
"nonPrimaryStateTax": {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"reciprocityCode": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
},
"ownerPercent": "",
"preferredName": "",
"primaryPayRate": {
"annualSalary": "",
"baseRate": "",
"beginCheckDate": "",
"changeReason": "",
"defaultHours": "",
"effectiveDate": "",
"isAutoPay": false,
"payFrequency": "",
"payGrade": "",
"payRateNote": "",
"payType": "",
"ratePer": "",
"salary": ""
},
"primaryStateTax": {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
},
"priorLastName": "",
"salutation": "",
"ssn": "",
"status": {
"adjustedSeniorityDate": "",
"changeReason": "",
"effectiveDate": "",
"employeeStatus": "",
"hireDate": "",
"isEligibleForRehire": false,
"reHireDate": "",
"statusType": "",
"terminationDate": ""
},
"suffix": "",
"taxSetup": {
"fitwExemptNotes": "",
"fitwExemptReason": "",
"futaExemptNotes": "",
"futaExemptReason": "",
"isEmployee943": false,
"isPension": false,
"isStatutory": false,
"medExemptNotes": "",
"medExemptReason": "",
"sitwExemptNotes": "",
"sitwExemptReason": "",
"ssExemptNotes": "",
"ssExemptReason": "",
"suiExemptNotes": "",
"suiExemptReason": "",
"suiState": "",
"taxDistributionCode1099R": "",
"taxForm": ""
},
"veteranDescription": "",
"webTime": {
"badgeNumber": "",
"chargeRate": "",
"isTimeLaborEnabled": false
},
"workAddress": {
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"location": "",
"mailStop": "",
"mobilePhone": "",
"pager": "",
"phone": "",
"phoneExtension": "",
"postalCode": "",
"state": ""
},
"workEligibility": {
"alienOrAdmissionDocumentNumber": "",
"attestedDate": "",
"countryOfIssuance": "",
"foreignPassportNumber": "",
"i94AdmissionNumber": "",
"i9DateVerified": "",
"i9Notes": "",
"isI9Verified": false,
"isSsnVerified": false,
"ssnDateVerified": "",
"ssnNotes": "",
"visaType": "",
"workAuthorization": "",
"workUntil": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
"additionalDirectDeposit": [
{
"accountNumber": "",
"accountType": "",
"amount": "",
"amountType": "",
"blockSpecial": false,
"isSkipPreNote": false,
"nameOnAccount": "",
"preNoteDate": "",
"routingNumber": ""
}
],
"additionalRate": [
{
"changeReason": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"endCheckDate": "",
"job": "",
"rate": "",
"rateCode": "",
"rateNotes": "",
"ratePer": "",
"shift": ""
}
],
"benefitSetup": {
"benefitClass": "",
"benefitClassEffectiveDate": "",
"benefitSalary": "",
"benefitSalaryEffectiveDate": "",
"doNotApplyAdministrativePeriod": false,
"isMeasureAcaEligibility": false
},
"birthDate": "",
"coEmpCode": "",
"companyFEIN": "",
"companyName": "",
"currency": "",
"customBooleanFields": [
{
"category": "",
"label": "",
"value": false
}
],
"customDateFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customDropDownFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customNumberFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customTextFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"departmentPosition": {
"changeReason": "",
"clockBadgeNumber": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"employeeType": "",
"equalEmploymentOpportunityClass": "",
"isMinimumWageExempt": false,
"isOvertimeExempt": false,
"isSupervisorReviewer": false,
"isUnionDuesCollected": false,
"isUnionInitiationCollected": false,
"jobTitle": "",
"payGroup": "",
"positionCode": "",
"reviewerCompanyNumber": "",
"reviewerEmployeeId": "",
"shift": "",
"supervisorCompanyNumber": "",
"supervisorEmployeeId": "",
"tipped": "",
"unionAffiliationDate": "",
"unionCode": "",
"unionPosition": "",
"workersCompensation": ""
},
"disabilityDescription": "",
"emergencyContacts": [
{
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"email": "",
"firstName": "",
"homePhone": "",
"lastName": "",
"mobilePhone": "",
"notes": "",
"pager": "",
"primaryPhone": "",
"priority": "",
"relationship": "",
"state": "",
"syncEmployeeInfo": false,
"workExtension": "",
"workPhone": "",
"zip": ""
}
],
"employeeId": "",
"ethnicity": "",
"federalTax": {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"taxCalculationCode": "",
"w4FormYear": 0
},
"firstName": "",
"gender": "",
"homeAddress": {
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"mobilePhone": "",
"phone": "",
"postalCode": "",
"state": ""
},
"isHighlyCompensated": false,
"isSmoker": false,
"lastName": "",
"localTax": [
{
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"residentPSD": "",
"taxCode": "",
"workPSD": ""
}
],
"mainDirectDeposit": {
"accountNumber": "",
"accountType": "",
"blockSpecial": false,
"isSkipPreNote": false,
"nameOnAccount": "",
"preNoteDate": "",
"routingNumber": ""
},
"maritalStatus": "",
"middleName": "",
"nonPrimaryStateTax": {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"reciprocityCode": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
},
"ownerPercent": "",
"preferredName": "",
"primaryPayRate": {
"annualSalary": "",
"baseRate": "",
"beginCheckDate": "",
"changeReason": "",
"defaultHours": "",
"effectiveDate": "",
"isAutoPay": false,
"payFrequency": "",
"payGrade": "",
"payRateNote": "",
"payType": "",
"ratePer": "",
"salary": ""
},
"primaryStateTax": {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
},
"priorLastName": "",
"salutation": "",
"ssn": "",
"status": {
"adjustedSeniorityDate": "",
"changeReason": "",
"effectiveDate": "",
"employeeStatus": "",
"hireDate": "",
"isEligibleForRehire": false,
"reHireDate": "",
"statusType": "",
"terminationDate": ""
},
"suffix": "",
"taxSetup": {
"fitwExemptNotes": "",
"fitwExemptReason": "",
"futaExemptNotes": "",
"futaExemptReason": "",
"isEmployee943": false,
"isPension": false,
"isStatutory": false,
"medExemptNotes": "",
"medExemptReason": "",
"sitwExemptNotes": "",
"sitwExemptReason": "",
"ssExemptNotes": "",
"ssExemptReason": "",
"suiExemptNotes": "",
"suiExemptReason": "",
"suiState": "",
"taxDistributionCode1099R": "",
"taxForm": ""
},
"veteranDescription": "",
"webTime": {
"badgeNumber": "",
"chargeRate": "",
"isTimeLaborEnabled": false
},
"workAddress": {
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"location": "",
"mailStop": "",
"mobilePhone": "",
"pager": "",
"phone": "",
"phoneExtension": "",
"postalCode": "",
"state": ""
},
"workEligibility": {
"alienOrAdmissionDocumentNumber": "",
"attestedDate": "",
"countryOfIssuance": "",
"foreignPassportNumber": "",
"i94AdmissionNumber": "",
"i9DateVerified": "",
"i9Notes": "",
"isI9Verified": false,
"isSsnVerified": false,
"ssnDateVerified": "",
"ssnNotes": "",
"visaType": "",
"workAuthorization": "",
"workUntil": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"additionalDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"amount\": \"\",\n \"amountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"additionalRate\": [\n {\n \"changeReason\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"endCheckDate\": \"\",\n \"job\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"rateNotes\": \"\",\n \"ratePer\": \"\",\n \"shift\": \"\"\n }\n ],\n \"benefitSetup\": {\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n },\n \"birthDate\": \"\",\n \"coEmpCode\": \"\",\n \"companyFEIN\": \"\",\n \"companyName\": \"\",\n \"currency\": \"\",\n \"customBooleanFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": false\n }\n ],\n \"customDateFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customDropDownFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customNumberFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customTextFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"departmentPosition\": {\n \"changeReason\": \"\",\n \"clockBadgeNumber\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"employeeType\": \"\",\n \"equalEmploymentOpportunityClass\": \"\",\n \"isMinimumWageExempt\": false,\n \"isOvertimeExempt\": false,\n \"isSupervisorReviewer\": false,\n \"isUnionDuesCollected\": false,\n \"isUnionInitiationCollected\": false,\n \"jobTitle\": \"\",\n \"payGroup\": \"\",\n \"positionCode\": \"\",\n \"reviewerCompanyNumber\": \"\",\n \"reviewerEmployeeId\": \"\",\n \"shift\": \"\",\n \"supervisorCompanyNumber\": \"\",\n \"supervisorEmployeeId\": \"\",\n \"tipped\": \"\",\n \"unionAffiliationDate\": \"\",\n \"unionCode\": \"\",\n \"unionPosition\": \"\",\n \"workersCompensation\": \"\"\n },\n \"disabilityDescription\": \"\",\n \"emergencyContacts\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"homePhone\": \"\",\n \"lastName\": \"\",\n \"mobilePhone\": \"\",\n \"notes\": \"\",\n \"pager\": \"\",\n \"primaryPhone\": \"\",\n \"priority\": \"\",\n \"relationship\": \"\",\n \"state\": \"\",\n \"syncEmployeeInfo\": false,\n \"workExtension\": \"\",\n \"workPhone\": \"\",\n \"zip\": \"\"\n }\n ],\n \"employeeId\": \"\",\n \"ethnicity\": \"\",\n \"federalTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"taxCalculationCode\": \"\",\n \"w4FormYear\": 0\n },\n \"firstName\": \"\",\n \"gender\": \"\",\n \"homeAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"isHighlyCompensated\": false,\n \"isSmoker\": false,\n \"lastName\": \"\",\n \"localTax\": [\n {\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n }\n ],\n \"mainDirectDeposit\": {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n },\n \"maritalStatus\": \"\",\n \"middleName\": \"\",\n \"nonPrimaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"ownerPercent\": \"\",\n \"preferredName\": \"\",\n \"primaryPayRate\": {\n \"annualSalary\": \"\",\n \"baseRate\": \"\",\n \"beginCheckDate\": \"\",\n \"changeReason\": \"\",\n \"defaultHours\": \"\",\n \"effectiveDate\": \"\",\n \"isAutoPay\": false,\n \"payFrequency\": \"\",\n \"payGrade\": \"\",\n \"payRateNote\": \"\",\n \"payType\": \"\",\n \"ratePer\": \"\",\n \"salary\": \"\"\n },\n \"primaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"priorLastName\": \"\",\n \"salutation\": \"\",\n \"ssn\": \"\",\n \"status\": {\n \"adjustedSeniorityDate\": \"\",\n \"changeReason\": \"\",\n \"effectiveDate\": \"\",\n \"employeeStatus\": \"\",\n \"hireDate\": \"\",\n \"isEligibleForRehire\": false,\n \"reHireDate\": \"\",\n \"statusType\": \"\",\n \"terminationDate\": \"\"\n },\n \"suffix\": \"\",\n \"taxSetup\": {\n \"fitwExemptNotes\": \"\",\n \"fitwExemptReason\": \"\",\n \"futaExemptNotes\": \"\",\n \"futaExemptReason\": \"\",\n \"isEmployee943\": false,\n \"isPension\": false,\n \"isStatutory\": false,\n \"medExemptNotes\": \"\",\n \"medExemptReason\": \"\",\n \"sitwExemptNotes\": \"\",\n \"sitwExemptReason\": \"\",\n \"ssExemptNotes\": \"\",\n \"ssExemptReason\": \"\",\n \"suiExemptNotes\": \"\",\n \"suiExemptReason\": \"\",\n \"suiState\": \"\",\n \"taxDistributionCode1099R\": \"\",\n \"taxForm\": \"\"\n },\n \"veteranDescription\": \"\",\n \"webTime\": {\n \"badgeNumber\": \"\",\n \"chargeRate\": \"\",\n \"isTimeLaborEnabled\": false\n },\n \"workAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"location\": \"\",\n \"mailStop\": \"\",\n \"mobilePhone\": \"\",\n \"pager\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"workEligibility\": {\n \"alienOrAdmissionDocumentNumber\": \"\",\n \"attestedDate\": \"\",\n \"countryOfIssuance\": \"\",\n \"foreignPassportNumber\": \"\",\n \"i94AdmissionNumber\": \"\",\n \"i9DateVerified\": \"\",\n \"i9Notes\": \"\",\n \"isI9Verified\": false,\n \"isSsnVerified\": false,\n \"ssnDateVerified\": \"\",\n \"ssnNotes\": \"\",\n \"visaType\": \"\",\n \"workAuthorization\": \"\",\n \"workUntil\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("PATCH", "/baseUrl/v2/companies/:companyId/employees/:employeeId", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId"
payload = {
"additionalDirectDeposit": [
{
"accountNumber": "",
"accountType": "",
"amount": "",
"amountType": "",
"blockSpecial": False,
"isSkipPreNote": False,
"nameOnAccount": "",
"preNoteDate": "",
"routingNumber": ""
}
],
"additionalRate": [
{
"changeReason": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"endCheckDate": "",
"job": "",
"rate": "",
"rateCode": "",
"rateNotes": "",
"ratePer": "",
"shift": ""
}
],
"benefitSetup": {
"benefitClass": "",
"benefitClassEffectiveDate": "",
"benefitSalary": "",
"benefitSalaryEffectiveDate": "",
"doNotApplyAdministrativePeriod": False,
"isMeasureAcaEligibility": False
},
"birthDate": "",
"coEmpCode": "",
"companyFEIN": "",
"companyName": "",
"currency": "",
"customBooleanFields": [
{
"category": "",
"label": "",
"value": False
}
],
"customDateFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customDropDownFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customNumberFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customTextFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"departmentPosition": {
"changeReason": "",
"clockBadgeNumber": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"employeeType": "",
"equalEmploymentOpportunityClass": "",
"isMinimumWageExempt": False,
"isOvertimeExempt": False,
"isSupervisorReviewer": False,
"isUnionDuesCollected": False,
"isUnionInitiationCollected": False,
"jobTitle": "",
"payGroup": "",
"positionCode": "",
"reviewerCompanyNumber": "",
"reviewerEmployeeId": "",
"shift": "",
"supervisorCompanyNumber": "",
"supervisorEmployeeId": "",
"tipped": "",
"unionAffiliationDate": "",
"unionCode": "",
"unionPosition": "",
"workersCompensation": ""
},
"disabilityDescription": "",
"emergencyContacts": [
{
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"email": "",
"firstName": "",
"homePhone": "",
"lastName": "",
"mobilePhone": "",
"notes": "",
"pager": "",
"primaryPhone": "",
"priority": "",
"relationship": "",
"state": "",
"syncEmployeeInfo": False,
"workExtension": "",
"workPhone": "",
"zip": ""
}
],
"employeeId": "",
"ethnicity": "",
"federalTax": {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"filingStatus": "",
"higherRate": False,
"otherIncomeAmount": "",
"percentage": "",
"taxCalculationCode": "",
"w4FormYear": 0
},
"firstName": "",
"gender": "",
"homeAddress": {
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"mobilePhone": "",
"phone": "",
"postalCode": "",
"state": ""
},
"isHighlyCompensated": False,
"isSmoker": False,
"lastName": "",
"localTax": [
{
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"residentPSD": "",
"taxCode": "",
"workPSD": ""
}
],
"mainDirectDeposit": {
"accountNumber": "",
"accountType": "",
"blockSpecial": False,
"isSkipPreNote": False,
"nameOnAccount": "",
"preNoteDate": "",
"routingNumber": ""
},
"maritalStatus": "",
"middleName": "",
"nonPrimaryStateTax": {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": False,
"otherIncomeAmount": "",
"percentage": "",
"reciprocityCode": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
},
"ownerPercent": "",
"preferredName": "",
"primaryPayRate": {
"annualSalary": "",
"baseRate": "",
"beginCheckDate": "",
"changeReason": "",
"defaultHours": "",
"effectiveDate": "",
"isAutoPay": False,
"payFrequency": "",
"payGrade": "",
"payRateNote": "",
"payType": "",
"ratePer": "",
"salary": ""
},
"primaryStateTax": {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": False,
"otherIncomeAmount": "",
"percentage": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
},
"priorLastName": "",
"salutation": "",
"ssn": "",
"status": {
"adjustedSeniorityDate": "",
"changeReason": "",
"effectiveDate": "",
"employeeStatus": "",
"hireDate": "",
"isEligibleForRehire": False,
"reHireDate": "",
"statusType": "",
"terminationDate": ""
},
"suffix": "",
"taxSetup": {
"fitwExemptNotes": "",
"fitwExemptReason": "",
"futaExemptNotes": "",
"futaExemptReason": "",
"isEmployee943": False,
"isPension": False,
"isStatutory": False,
"medExemptNotes": "",
"medExemptReason": "",
"sitwExemptNotes": "",
"sitwExemptReason": "",
"ssExemptNotes": "",
"ssExemptReason": "",
"suiExemptNotes": "",
"suiExemptReason": "",
"suiState": "",
"taxDistributionCode1099R": "",
"taxForm": ""
},
"veteranDescription": "",
"webTime": {
"badgeNumber": "",
"chargeRate": "",
"isTimeLaborEnabled": False
},
"workAddress": {
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"location": "",
"mailStop": "",
"mobilePhone": "",
"pager": "",
"phone": "",
"phoneExtension": "",
"postalCode": "",
"state": ""
},
"workEligibility": {
"alienOrAdmissionDocumentNumber": "",
"attestedDate": "",
"countryOfIssuance": "",
"foreignPassportNumber": "",
"i94AdmissionNumber": "",
"i9DateVerified": "",
"i9Notes": "",
"isI9Verified": False,
"isSsnVerified": False,
"ssnDateVerified": "",
"ssnNotes": "",
"visaType": "",
"workAuthorization": "",
"workUntil": ""
}
}
headers = {"content-type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId"
payload <- "{\n \"additionalDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"amount\": \"\",\n \"amountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"additionalRate\": [\n {\n \"changeReason\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"endCheckDate\": \"\",\n \"job\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"rateNotes\": \"\",\n \"ratePer\": \"\",\n \"shift\": \"\"\n }\n ],\n \"benefitSetup\": {\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n },\n \"birthDate\": \"\",\n \"coEmpCode\": \"\",\n \"companyFEIN\": \"\",\n \"companyName\": \"\",\n \"currency\": \"\",\n \"customBooleanFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": false\n }\n ],\n \"customDateFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customDropDownFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customNumberFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customTextFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"departmentPosition\": {\n \"changeReason\": \"\",\n \"clockBadgeNumber\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"employeeType\": \"\",\n \"equalEmploymentOpportunityClass\": \"\",\n \"isMinimumWageExempt\": false,\n \"isOvertimeExempt\": false,\n \"isSupervisorReviewer\": false,\n \"isUnionDuesCollected\": false,\n \"isUnionInitiationCollected\": false,\n \"jobTitle\": \"\",\n \"payGroup\": \"\",\n \"positionCode\": \"\",\n \"reviewerCompanyNumber\": \"\",\n \"reviewerEmployeeId\": \"\",\n \"shift\": \"\",\n \"supervisorCompanyNumber\": \"\",\n \"supervisorEmployeeId\": \"\",\n \"tipped\": \"\",\n \"unionAffiliationDate\": \"\",\n \"unionCode\": \"\",\n \"unionPosition\": \"\",\n \"workersCompensation\": \"\"\n },\n \"disabilityDescription\": \"\",\n \"emergencyContacts\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"homePhone\": \"\",\n \"lastName\": \"\",\n \"mobilePhone\": \"\",\n \"notes\": \"\",\n \"pager\": \"\",\n \"primaryPhone\": \"\",\n \"priority\": \"\",\n \"relationship\": \"\",\n \"state\": \"\",\n \"syncEmployeeInfo\": false,\n \"workExtension\": \"\",\n \"workPhone\": \"\",\n \"zip\": \"\"\n }\n ],\n \"employeeId\": \"\",\n \"ethnicity\": \"\",\n \"federalTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"taxCalculationCode\": \"\",\n \"w4FormYear\": 0\n },\n \"firstName\": \"\",\n \"gender\": \"\",\n \"homeAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"isHighlyCompensated\": false,\n \"isSmoker\": false,\n \"lastName\": \"\",\n \"localTax\": [\n {\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n }\n ],\n \"mainDirectDeposit\": {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n },\n \"maritalStatus\": \"\",\n \"middleName\": \"\",\n \"nonPrimaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"ownerPercent\": \"\",\n \"preferredName\": \"\",\n \"primaryPayRate\": {\n \"annualSalary\": \"\",\n \"baseRate\": \"\",\n \"beginCheckDate\": \"\",\n \"changeReason\": \"\",\n \"defaultHours\": \"\",\n \"effectiveDate\": \"\",\n \"isAutoPay\": false,\n \"payFrequency\": \"\",\n \"payGrade\": \"\",\n \"payRateNote\": \"\",\n \"payType\": \"\",\n \"ratePer\": \"\",\n \"salary\": \"\"\n },\n \"primaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"priorLastName\": \"\",\n \"salutation\": \"\",\n \"ssn\": \"\",\n \"status\": {\n \"adjustedSeniorityDate\": \"\",\n \"changeReason\": \"\",\n \"effectiveDate\": \"\",\n \"employeeStatus\": \"\",\n \"hireDate\": \"\",\n \"isEligibleForRehire\": false,\n \"reHireDate\": \"\",\n \"statusType\": \"\",\n \"terminationDate\": \"\"\n },\n \"suffix\": \"\",\n \"taxSetup\": {\n \"fitwExemptNotes\": \"\",\n \"fitwExemptReason\": \"\",\n \"futaExemptNotes\": \"\",\n \"futaExemptReason\": \"\",\n \"isEmployee943\": false,\n \"isPension\": false,\n \"isStatutory\": false,\n \"medExemptNotes\": \"\",\n \"medExemptReason\": \"\",\n \"sitwExemptNotes\": \"\",\n \"sitwExemptReason\": \"\",\n \"ssExemptNotes\": \"\",\n \"ssExemptReason\": \"\",\n \"suiExemptNotes\": \"\",\n \"suiExemptReason\": \"\",\n \"suiState\": \"\",\n \"taxDistributionCode1099R\": \"\",\n \"taxForm\": \"\"\n },\n \"veteranDescription\": \"\",\n \"webTime\": {\n \"badgeNumber\": \"\",\n \"chargeRate\": \"\",\n \"isTimeLaborEnabled\": false\n },\n \"workAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"location\": \"\",\n \"mailStop\": \"\",\n \"mobilePhone\": \"\",\n \"pager\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"workEligibility\": {\n \"alienOrAdmissionDocumentNumber\": \"\",\n \"attestedDate\": \"\",\n \"countryOfIssuance\": \"\",\n \"foreignPassportNumber\": \"\",\n \"i94AdmissionNumber\": \"\",\n \"i9DateVerified\": \"\",\n \"i9Notes\": \"\",\n \"isI9Verified\": false,\n \"isSsnVerified\": false,\n \"ssnDateVerified\": \"\",\n \"ssnNotes\": \"\",\n \"visaType\": \"\",\n \"workAuthorization\": \"\",\n \"workUntil\": \"\"\n }\n}"
encode <- "json"
response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"additionalDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"amount\": \"\",\n \"amountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"additionalRate\": [\n {\n \"changeReason\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"endCheckDate\": \"\",\n \"job\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"rateNotes\": \"\",\n \"ratePer\": \"\",\n \"shift\": \"\"\n }\n ],\n \"benefitSetup\": {\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n },\n \"birthDate\": \"\",\n \"coEmpCode\": \"\",\n \"companyFEIN\": \"\",\n \"companyName\": \"\",\n \"currency\": \"\",\n \"customBooleanFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": false\n }\n ],\n \"customDateFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customDropDownFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customNumberFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customTextFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"departmentPosition\": {\n \"changeReason\": \"\",\n \"clockBadgeNumber\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"employeeType\": \"\",\n \"equalEmploymentOpportunityClass\": \"\",\n \"isMinimumWageExempt\": false,\n \"isOvertimeExempt\": false,\n \"isSupervisorReviewer\": false,\n \"isUnionDuesCollected\": false,\n \"isUnionInitiationCollected\": false,\n \"jobTitle\": \"\",\n \"payGroup\": \"\",\n \"positionCode\": \"\",\n \"reviewerCompanyNumber\": \"\",\n \"reviewerEmployeeId\": \"\",\n \"shift\": \"\",\n \"supervisorCompanyNumber\": \"\",\n \"supervisorEmployeeId\": \"\",\n \"tipped\": \"\",\n \"unionAffiliationDate\": \"\",\n \"unionCode\": \"\",\n \"unionPosition\": \"\",\n \"workersCompensation\": \"\"\n },\n \"disabilityDescription\": \"\",\n \"emergencyContacts\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"homePhone\": \"\",\n \"lastName\": \"\",\n \"mobilePhone\": \"\",\n \"notes\": \"\",\n \"pager\": \"\",\n \"primaryPhone\": \"\",\n \"priority\": \"\",\n \"relationship\": \"\",\n \"state\": \"\",\n \"syncEmployeeInfo\": false,\n \"workExtension\": \"\",\n \"workPhone\": \"\",\n \"zip\": \"\"\n }\n ],\n \"employeeId\": \"\",\n \"ethnicity\": \"\",\n \"federalTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"taxCalculationCode\": \"\",\n \"w4FormYear\": 0\n },\n \"firstName\": \"\",\n \"gender\": \"\",\n \"homeAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"isHighlyCompensated\": false,\n \"isSmoker\": false,\n \"lastName\": \"\",\n \"localTax\": [\n {\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n }\n ],\n \"mainDirectDeposit\": {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n },\n \"maritalStatus\": \"\",\n \"middleName\": \"\",\n \"nonPrimaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"ownerPercent\": \"\",\n \"preferredName\": \"\",\n \"primaryPayRate\": {\n \"annualSalary\": \"\",\n \"baseRate\": \"\",\n \"beginCheckDate\": \"\",\n \"changeReason\": \"\",\n \"defaultHours\": \"\",\n \"effectiveDate\": \"\",\n \"isAutoPay\": false,\n \"payFrequency\": \"\",\n \"payGrade\": \"\",\n \"payRateNote\": \"\",\n \"payType\": \"\",\n \"ratePer\": \"\",\n \"salary\": \"\"\n },\n \"primaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"priorLastName\": \"\",\n \"salutation\": \"\",\n \"ssn\": \"\",\n \"status\": {\n \"adjustedSeniorityDate\": \"\",\n \"changeReason\": \"\",\n \"effectiveDate\": \"\",\n \"employeeStatus\": \"\",\n \"hireDate\": \"\",\n \"isEligibleForRehire\": false,\n \"reHireDate\": \"\",\n \"statusType\": \"\",\n \"terminationDate\": \"\"\n },\n \"suffix\": \"\",\n \"taxSetup\": {\n \"fitwExemptNotes\": \"\",\n \"fitwExemptReason\": \"\",\n \"futaExemptNotes\": \"\",\n \"futaExemptReason\": \"\",\n \"isEmployee943\": false,\n \"isPension\": false,\n \"isStatutory\": false,\n \"medExemptNotes\": \"\",\n \"medExemptReason\": \"\",\n \"sitwExemptNotes\": \"\",\n \"sitwExemptReason\": \"\",\n \"ssExemptNotes\": \"\",\n \"ssExemptReason\": \"\",\n \"suiExemptNotes\": \"\",\n \"suiExemptReason\": \"\",\n \"suiState\": \"\",\n \"taxDistributionCode1099R\": \"\",\n \"taxForm\": \"\"\n },\n \"veteranDescription\": \"\",\n \"webTime\": {\n \"badgeNumber\": \"\",\n \"chargeRate\": \"\",\n \"isTimeLaborEnabled\": false\n },\n \"workAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"location\": \"\",\n \"mailStop\": \"\",\n \"mobilePhone\": \"\",\n \"pager\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"workEligibility\": {\n \"alienOrAdmissionDocumentNumber\": \"\",\n \"attestedDate\": \"\",\n \"countryOfIssuance\": \"\",\n \"foreignPassportNumber\": \"\",\n \"i94AdmissionNumber\": \"\",\n \"i9DateVerified\": \"\",\n \"i9Notes\": \"\",\n \"isI9Verified\": false,\n \"isSsnVerified\": false,\n \"ssnDateVerified\": \"\",\n \"ssnNotes\": \"\",\n \"visaType\": \"\",\n \"workAuthorization\": \"\",\n \"workUntil\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.patch('/baseUrl/v2/companies/:companyId/employees/:employeeId') do |req|
req.body = "{\n \"additionalDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"amount\": \"\",\n \"amountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"additionalRate\": [\n {\n \"changeReason\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"endCheckDate\": \"\",\n \"job\": \"\",\n \"rate\": \"\",\n \"rateCode\": \"\",\n \"rateNotes\": \"\",\n \"ratePer\": \"\",\n \"shift\": \"\"\n }\n ],\n \"benefitSetup\": {\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n },\n \"birthDate\": \"\",\n \"coEmpCode\": \"\",\n \"companyFEIN\": \"\",\n \"companyName\": \"\",\n \"currency\": \"\",\n \"customBooleanFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": false\n }\n ],\n \"customDateFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customDropDownFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customNumberFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customTextFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"departmentPosition\": {\n \"changeReason\": \"\",\n \"clockBadgeNumber\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"employeeType\": \"\",\n \"equalEmploymentOpportunityClass\": \"\",\n \"isMinimumWageExempt\": false,\n \"isOvertimeExempt\": false,\n \"isSupervisorReviewer\": false,\n \"isUnionDuesCollected\": false,\n \"isUnionInitiationCollected\": false,\n \"jobTitle\": \"\",\n \"payGroup\": \"\",\n \"positionCode\": \"\",\n \"reviewerCompanyNumber\": \"\",\n \"reviewerEmployeeId\": \"\",\n \"shift\": \"\",\n \"supervisorCompanyNumber\": \"\",\n \"supervisorEmployeeId\": \"\",\n \"tipped\": \"\",\n \"unionAffiliationDate\": \"\",\n \"unionCode\": \"\",\n \"unionPosition\": \"\",\n \"workersCompensation\": \"\"\n },\n \"disabilityDescription\": \"\",\n \"emergencyContacts\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"email\": \"\",\n \"firstName\": \"\",\n \"homePhone\": \"\",\n \"lastName\": \"\",\n \"mobilePhone\": \"\",\n \"notes\": \"\",\n \"pager\": \"\",\n \"primaryPhone\": \"\",\n \"priority\": \"\",\n \"relationship\": \"\",\n \"state\": \"\",\n \"syncEmployeeInfo\": false,\n \"workExtension\": \"\",\n \"workPhone\": \"\",\n \"zip\": \"\"\n }\n ],\n \"employeeId\": \"\",\n \"ethnicity\": \"\",\n \"federalTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"taxCalculationCode\": \"\",\n \"w4FormYear\": 0\n },\n \"firstName\": \"\",\n \"gender\": \"\",\n \"homeAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"isHighlyCompensated\": false,\n \"isSmoker\": false,\n \"lastName\": \"\",\n \"localTax\": [\n {\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n }\n ],\n \"mainDirectDeposit\": {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"blockSpecial\": false,\n \"isSkipPreNote\": false,\n \"nameOnAccount\": \"\",\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n },\n \"maritalStatus\": \"\",\n \"middleName\": \"\",\n \"nonPrimaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"ownerPercent\": \"\",\n \"preferredName\": \"\",\n \"primaryPayRate\": {\n \"annualSalary\": \"\",\n \"baseRate\": \"\",\n \"beginCheckDate\": \"\",\n \"changeReason\": \"\",\n \"defaultHours\": \"\",\n \"effectiveDate\": \"\",\n \"isAutoPay\": false,\n \"payFrequency\": \"\",\n \"payGrade\": \"\",\n \"payRateNote\": \"\",\n \"payType\": \"\",\n \"ratePer\": \"\",\n \"salary\": \"\"\n },\n \"primaryStateTax\": {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n },\n \"priorLastName\": \"\",\n \"salutation\": \"\",\n \"ssn\": \"\",\n \"status\": {\n \"adjustedSeniorityDate\": \"\",\n \"changeReason\": \"\",\n \"effectiveDate\": \"\",\n \"employeeStatus\": \"\",\n \"hireDate\": \"\",\n \"isEligibleForRehire\": false,\n \"reHireDate\": \"\",\n \"statusType\": \"\",\n \"terminationDate\": \"\"\n },\n \"suffix\": \"\",\n \"taxSetup\": {\n \"fitwExemptNotes\": \"\",\n \"fitwExemptReason\": \"\",\n \"futaExemptNotes\": \"\",\n \"futaExemptReason\": \"\",\n \"isEmployee943\": false,\n \"isPension\": false,\n \"isStatutory\": false,\n \"medExemptNotes\": \"\",\n \"medExemptReason\": \"\",\n \"sitwExemptNotes\": \"\",\n \"sitwExemptReason\": \"\",\n \"ssExemptNotes\": \"\",\n \"ssExemptReason\": \"\",\n \"suiExemptNotes\": \"\",\n \"suiExemptReason\": \"\",\n \"suiState\": \"\",\n \"taxDistributionCode1099R\": \"\",\n \"taxForm\": \"\"\n },\n \"veteranDescription\": \"\",\n \"webTime\": {\n \"badgeNumber\": \"\",\n \"chargeRate\": \"\",\n \"isTimeLaborEnabled\": false\n },\n \"workAddress\": {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"location\": \"\",\n \"mailStop\": \"\",\n \"mobilePhone\": \"\",\n \"pager\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n },\n \"workEligibility\": {\n \"alienOrAdmissionDocumentNumber\": \"\",\n \"attestedDate\": \"\",\n \"countryOfIssuance\": \"\",\n \"foreignPassportNumber\": \"\",\n \"i94AdmissionNumber\": \"\",\n \"i9DateVerified\": \"\",\n \"i9Notes\": \"\",\n \"isI9Verified\": false,\n \"isSsnVerified\": false,\n \"ssnDateVerified\": \"\",\n \"ssnNotes\": \"\",\n \"visaType\": \"\",\n \"workAuthorization\": \"\",\n \"workUntil\": \"\"\n }\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId";
let payload = json!({
"additionalDirectDeposit": (
json!({
"accountNumber": "",
"accountType": "",
"amount": "",
"amountType": "",
"blockSpecial": false,
"isSkipPreNote": false,
"nameOnAccount": "",
"preNoteDate": "",
"routingNumber": ""
})
),
"additionalRate": (
json!({
"changeReason": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"endCheckDate": "",
"job": "",
"rate": "",
"rateCode": "",
"rateNotes": "",
"ratePer": "",
"shift": ""
})
),
"benefitSetup": json!({
"benefitClass": "",
"benefitClassEffectiveDate": "",
"benefitSalary": "",
"benefitSalaryEffectiveDate": "",
"doNotApplyAdministrativePeriod": false,
"isMeasureAcaEligibility": false
}),
"birthDate": "",
"coEmpCode": "",
"companyFEIN": "",
"companyName": "",
"currency": "",
"customBooleanFields": (
json!({
"category": "",
"label": "",
"value": false
})
),
"customDateFields": (
json!({
"category": "",
"label": "",
"value": ""
})
),
"customDropDownFields": (
json!({
"category": "",
"label": "",
"value": ""
})
),
"customNumberFields": (
json!({
"category": "",
"label": "",
"value": ""
})
),
"customTextFields": (
json!({
"category": "",
"label": "",
"value": ""
})
),
"departmentPosition": json!({
"changeReason": "",
"clockBadgeNumber": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"employeeType": "",
"equalEmploymentOpportunityClass": "",
"isMinimumWageExempt": false,
"isOvertimeExempt": false,
"isSupervisorReviewer": false,
"isUnionDuesCollected": false,
"isUnionInitiationCollected": false,
"jobTitle": "",
"payGroup": "",
"positionCode": "",
"reviewerCompanyNumber": "",
"reviewerEmployeeId": "",
"shift": "",
"supervisorCompanyNumber": "",
"supervisorEmployeeId": "",
"tipped": "",
"unionAffiliationDate": "",
"unionCode": "",
"unionPosition": "",
"workersCompensation": ""
}),
"disabilityDescription": "",
"emergencyContacts": (
json!({
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"email": "",
"firstName": "",
"homePhone": "",
"lastName": "",
"mobilePhone": "",
"notes": "",
"pager": "",
"primaryPhone": "",
"priority": "",
"relationship": "",
"state": "",
"syncEmployeeInfo": false,
"workExtension": "",
"workPhone": "",
"zip": ""
})
),
"employeeId": "",
"ethnicity": "",
"federalTax": json!({
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"taxCalculationCode": "",
"w4FormYear": 0
}),
"firstName": "",
"gender": "",
"homeAddress": json!({
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"mobilePhone": "",
"phone": "",
"postalCode": "",
"state": ""
}),
"isHighlyCompensated": false,
"isSmoker": false,
"lastName": "",
"localTax": (
json!({
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"residentPSD": "",
"taxCode": "",
"workPSD": ""
})
),
"mainDirectDeposit": json!({
"accountNumber": "",
"accountType": "",
"blockSpecial": false,
"isSkipPreNote": false,
"nameOnAccount": "",
"preNoteDate": "",
"routingNumber": ""
}),
"maritalStatus": "",
"middleName": "",
"nonPrimaryStateTax": json!({
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"reciprocityCode": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
}),
"ownerPercent": "",
"preferredName": "",
"primaryPayRate": json!({
"annualSalary": "",
"baseRate": "",
"beginCheckDate": "",
"changeReason": "",
"defaultHours": "",
"effectiveDate": "",
"isAutoPay": false,
"payFrequency": "",
"payGrade": "",
"payRateNote": "",
"payType": "",
"ratePer": "",
"salary": ""
}),
"primaryStateTax": json!({
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
}),
"priorLastName": "",
"salutation": "",
"ssn": "",
"status": json!({
"adjustedSeniorityDate": "",
"changeReason": "",
"effectiveDate": "",
"employeeStatus": "",
"hireDate": "",
"isEligibleForRehire": false,
"reHireDate": "",
"statusType": "",
"terminationDate": ""
}),
"suffix": "",
"taxSetup": json!({
"fitwExemptNotes": "",
"fitwExemptReason": "",
"futaExemptNotes": "",
"futaExemptReason": "",
"isEmployee943": false,
"isPension": false,
"isStatutory": false,
"medExemptNotes": "",
"medExemptReason": "",
"sitwExemptNotes": "",
"sitwExemptReason": "",
"ssExemptNotes": "",
"ssExemptReason": "",
"suiExemptNotes": "",
"suiExemptReason": "",
"suiState": "",
"taxDistributionCode1099R": "",
"taxForm": ""
}),
"veteranDescription": "",
"webTime": json!({
"badgeNumber": "",
"chargeRate": "",
"isTimeLaborEnabled": false
}),
"workAddress": json!({
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"location": "",
"mailStop": "",
"mobilePhone": "",
"pager": "",
"phone": "",
"phoneExtension": "",
"postalCode": "",
"state": ""
}),
"workEligibility": json!({
"alienOrAdmissionDocumentNumber": "",
"attestedDate": "",
"countryOfIssuance": "",
"foreignPassportNumber": "",
"i94AdmissionNumber": "",
"i9DateVerified": "",
"i9Notes": "",
"isI9Verified": false,
"isSsnVerified": false,
"ssnDateVerified": "",
"ssnNotes": "",
"visaType": "",
"workAuthorization": "",
"workUntil": ""
})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PATCH \
--url {{baseUrl}}/v2/companies/:companyId/employees/:employeeId \
--header 'content-type: application/json' \
--data '{
"additionalDirectDeposit": [
{
"accountNumber": "",
"accountType": "",
"amount": "",
"amountType": "",
"blockSpecial": false,
"isSkipPreNote": false,
"nameOnAccount": "",
"preNoteDate": "",
"routingNumber": ""
}
],
"additionalRate": [
{
"changeReason": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"endCheckDate": "",
"job": "",
"rate": "",
"rateCode": "",
"rateNotes": "",
"ratePer": "",
"shift": ""
}
],
"benefitSetup": {
"benefitClass": "",
"benefitClassEffectiveDate": "",
"benefitSalary": "",
"benefitSalaryEffectiveDate": "",
"doNotApplyAdministrativePeriod": false,
"isMeasureAcaEligibility": false
},
"birthDate": "",
"coEmpCode": "",
"companyFEIN": "",
"companyName": "",
"currency": "",
"customBooleanFields": [
{
"category": "",
"label": "",
"value": false
}
],
"customDateFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customDropDownFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customNumberFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customTextFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"departmentPosition": {
"changeReason": "",
"clockBadgeNumber": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"employeeType": "",
"equalEmploymentOpportunityClass": "",
"isMinimumWageExempt": false,
"isOvertimeExempt": false,
"isSupervisorReviewer": false,
"isUnionDuesCollected": false,
"isUnionInitiationCollected": false,
"jobTitle": "",
"payGroup": "",
"positionCode": "",
"reviewerCompanyNumber": "",
"reviewerEmployeeId": "",
"shift": "",
"supervisorCompanyNumber": "",
"supervisorEmployeeId": "",
"tipped": "",
"unionAffiliationDate": "",
"unionCode": "",
"unionPosition": "",
"workersCompensation": ""
},
"disabilityDescription": "",
"emergencyContacts": [
{
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"email": "",
"firstName": "",
"homePhone": "",
"lastName": "",
"mobilePhone": "",
"notes": "",
"pager": "",
"primaryPhone": "",
"priority": "",
"relationship": "",
"state": "",
"syncEmployeeInfo": false,
"workExtension": "",
"workPhone": "",
"zip": ""
}
],
"employeeId": "",
"ethnicity": "",
"federalTax": {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"taxCalculationCode": "",
"w4FormYear": 0
},
"firstName": "",
"gender": "",
"homeAddress": {
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"mobilePhone": "",
"phone": "",
"postalCode": "",
"state": ""
},
"isHighlyCompensated": false,
"isSmoker": false,
"lastName": "",
"localTax": [
{
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"residentPSD": "",
"taxCode": "",
"workPSD": ""
}
],
"mainDirectDeposit": {
"accountNumber": "",
"accountType": "",
"blockSpecial": false,
"isSkipPreNote": false,
"nameOnAccount": "",
"preNoteDate": "",
"routingNumber": ""
},
"maritalStatus": "",
"middleName": "",
"nonPrimaryStateTax": {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"reciprocityCode": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
},
"ownerPercent": "",
"preferredName": "",
"primaryPayRate": {
"annualSalary": "",
"baseRate": "",
"beginCheckDate": "",
"changeReason": "",
"defaultHours": "",
"effectiveDate": "",
"isAutoPay": false,
"payFrequency": "",
"payGrade": "",
"payRateNote": "",
"payType": "",
"ratePer": "",
"salary": ""
},
"primaryStateTax": {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
},
"priorLastName": "",
"salutation": "",
"ssn": "",
"status": {
"adjustedSeniorityDate": "",
"changeReason": "",
"effectiveDate": "",
"employeeStatus": "",
"hireDate": "",
"isEligibleForRehire": false,
"reHireDate": "",
"statusType": "",
"terminationDate": ""
},
"suffix": "",
"taxSetup": {
"fitwExemptNotes": "",
"fitwExemptReason": "",
"futaExemptNotes": "",
"futaExemptReason": "",
"isEmployee943": false,
"isPension": false,
"isStatutory": false,
"medExemptNotes": "",
"medExemptReason": "",
"sitwExemptNotes": "",
"sitwExemptReason": "",
"ssExemptNotes": "",
"ssExemptReason": "",
"suiExemptNotes": "",
"suiExemptReason": "",
"suiState": "",
"taxDistributionCode1099R": "",
"taxForm": ""
},
"veteranDescription": "",
"webTime": {
"badgeNumber": "",
"chargeRate": "",
"isTimeLaborEnabled": false
},
"workAddress": {
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"location": "",
"mailStop": "",
"mobilePhone": "",
"pager": "",
"phone": "",
"phoneExtension": "",
"postalCode": "",
"state": ""
},
"workEligibility": {
"alienOrAdmissionDocumentNumber": "",
"attestedDate": "",
"countryOfIssuance": "",
"foreignPassportNumber": "",
"i94AdmissionNumber": "",
"i9DateVerified": "",
"i9Notes": "",
"isI9Verified": false,
"isSsnVerified": false,
"ssnDateVerified": "",
"ssnNotes": "",
"visaType": "",
"workAuthorization": "",
"workUntil": ""
}
}'
echo '{
"additionalDirectDeposit": [
{
"accountNumber": "",
"accountType": "",
"amount": "",
"amountType": "",
"blockSpecial": false,
"isSkipPreNote": false,
"nameOnAccount": "",
"preNoteDate": "",
"routingNumber": ""
}
],
"additionalRate": [
{
"changeReason": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"endCheckDate": "",
"job": "",
"rate": "",
"rateCode": "",
"rateNotes": "",
"ratePer": "",
"shift": ""
}
],
"benefitSetup": {
"benefitClass": "",
"benefitClassEffectiveDate": "",
"benefitSalary": "",
"benefitSalaryEffectiveDate": "",
"doNotApplyAdministrativePeriod": false,
"isMeasureAcaEligibility": false
},
"birthDate": "",
"coEmpCode": "",
"companyFEIN": "",
"companyName": "",
"currency": "",
"customBooleanFields": [
{
"category": "",
"label": "",
"value": false
}
],
"customDateFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customDropDownFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customNumberFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customTextFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"departmentPosition": {
"changeReason": "",
"clockBadgeNumber": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"employeeType": "",
"equalEmploymentOpportunityClass": "",
"isMinimumWageExempt": false,
"isOvertimeExempt": false,
"isSupervisorReviewer": false,
"isUnionDuesCollected": false,
"isUnionInitiationCollected": false,
"jobTitle": "",
"payGroup": "",
"positionCode": "",
"reviewerCompanyNumber": "",
"reviewerEmployeeId": "",
"shift": "",
"supervisorCompanyNumber": "",
"supervisorEmployeeId": "",
"tipped": "",
"unionAffiliationDate": "",
"unionCode": "",
"unionPosition": "",
"workersCompensation": ""
},
"disabilityDescription": "",
"emergencyContacts": [
{
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"email": "",
"firstName": "",
"homePhone": "",
"lastName": "",
"mobilePhone": "",
"notes": "",
"pager": "",
"primaryPhone": "",
"priority": "",
"relationship": "",
"state": "",
"syncEmployeeInfo": false,
"workExtension": "",
"workPhone": "",
"zip": ""
}
],
"employeeId": "",
"ethnicity": "",
"federalTax": {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"taxCalculationCode": "",
"w4FormYear": 0
},
"firstName": "",
"gender": "",
"homeAddress": {
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"mobilePhone": "",
"phone": "",
"postalCode": "",
"state": ""
},
"isHighlyCompensated": false,
"isSmoker": false,
"lastName": "",
"localTax": [
{
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"residentPSD": "",
"taxCode": "",
"workPSD": ""
}
],
"mainDirectDeposit": {
"accountNumber": "",
"accountType": "",
"blockSpecial": false,
"isSkipPreNote": false,
"nameOnAccount": "",
"preNoteDate": "",
"routingNumber": ""
},
"maritalStatus": "",
"middleName": "",
"nonPrimaryStateTax": {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"reciprocityCode": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
},
"ownerPercent": "",
"preferredName": "",
"primaryPayRate": {
"annualSalary": "",
"baseRate": "",
"beginCheckDate": "",
"changeReason": "",
"defaultHours": "",
"effectiveDate": "",
"isAutoPay": false,
"payFrequency": "",
"payGrade": "",
"payRateNote": "",
"payType": "",
"ratePer": "",
"salary": ""
},
"primaryStateTax": {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
},
"priorLastName": "",
"salutation": "",
"ssn": "",
"status": {
"adjustedSeniorityDate": "",
"changeReason": "",
"effectiveDate": "",
"employeeStatus": "",
"hireDate": "",
"isEligibleForRehire": false,
"reHireDate": "",
"statusType": "",
"terminationDate": ""
},
"suffix": "",
"taxSetup": {
"fitwExemptNotes": "",
"fitwExemptReason": "",
"futaExemptNotes": "",
"futaExemptReason": "",
"isEmployee943": false,
"isPension": false,
"isStatutory": false,
"medExemptNotes": "",
"medExemptReason": "",
"sitwExemptNotes": "",
"sitwExemptReason": "",
"ssExemptNotes": "",
"ssExemptReason": "",
"suiExemptNotes": "",
"suiExemptReason": "",
"suiState": "",
"taxDistributionCode1099R": "",
"taxForm": ""
},
"veteranDescription": "",
"webTime": {
"badgeNumber": "",
"chargeRate": "",
"isTimeLaborEnabled": false
},
"workAddress": {
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"location": "",
"mailStop": "",
"mobilePhone": "",
"pager": "",
"phone": "",
"phoneExtension": "",
"postalCode": "",
"state": ""
},
"workEligibility": {
"alienOrAdmissionDocumentNumber": "",
"attestedDate": "",
"countryOfIssuance": "",
"foreignPassportNumber": "",
"i94AdmissionNumber": "",
"i9DateVerified": "",
"i9Notes": "",
"isI9Verified": false,
"isSsnVerified": false,
"ssnDateVerified": "",
"ssnNotes": "",
"visaType": "",
"workAuthorization": "",
"workUntil": ""
}
}' | \
http PATCH {{baseUrl}}/v2/companies/:companyId/employees/:employeeId \
content-type:application/json
wget --quiet \
--method PATCH \
--header 'content-type: application/json' \
--body-data '{\n "additionalDirectDeposit": [\n {\n "accountNumber": "",\n "accountType": "",\n "amount": "",\n "amountType": "",\n "blockSpecial": false,\n "isSkipPreNote": false,\n "nameOnAccount": "",\n "preNoteDate": "",\n "routingNumber": ""\n }\n ],\n "additionalRate": [\n {\n "changeReason": "",\n "costCenter1": "",\n "costCenter2": "",\n "costCenter3": "",\n "effectiveDate": "",\n "endCheckDate": "",\n "job": "",\n "rate": "",\n "rateCode": "",\n "rateNotes": "",\n "ratePer": "",\n "shift": ""\n }\n ],\n "benefitSetup": {\n "benefitClass": "",\n "benefitClassEffectiveDate": "",\n "benefitSalary": "",\n "benefitSalaryEffectiveDate": "",\n "doNotApplyAdministrativePeriod": false,\n "isMeasureAcaEligibility": false\n },\n "birthDate": "",\n "coEmpCode": "",\n "companyFEIN": "",\n "companyName": "",\n "currency": "",\n "customBooleanFields": [\n {\n "category": "",\n "label": "",\n "value": false\n }\n ],\n "customDateFields": [\n {\n "category": "",\n "label": "",\n "value": ""\n }\n ],\n "customDropDownFields": [\n {\n "category": "",\n "label": "",\n "value": ""\n }\n ],\n "customNumberFields": [\n {\n "category": "",\n "label": "",\n "value": ""\n }\n ],\n "customTextFields": [\n {\n "category": "",\n "label": "",\n "value": ""\n }\n ],\n "departmentPosition": {\n "changeReason": "",\n "clockBadgeNumber": "",\n "costCenter1": "",\n "costCenter2": "",\n "costCenter3": "",\n "effectiveDate": "",\n "employeeType": "",\n "equalEmploymentOpportunityClass": "",\n "isMinimumWageExempt": false,\n "isOvertimeExempt": false,\n "isSupervisorReviewer": false,\n "isUnionDuesCollected": false,\n "isUnionInitiationCollected": false,\n "jobTitle": "",\n "payGroup": "",\n "positionCode": "",\n "reviewerCompanyNumber": "",\n "reviewerEmployeeId": "",\n "shift": "",\n "supervisorCompanyNumber": "",\n "supervisorEmployeeId": "",\n "tipped": "",\n "unionAffiliationDate": "",\n "unionCode": "",\n "unionPosition": "",\n "workersCompensation": ""\n },\n "disabilityDescription": "",\n "emergencyContacts": [\n {\n "address1": "",\n "address2": "",\n "city": "",\n "country": "",\n "county": "",\n "email": "",\n "firstName": "",\n "homePhone": "",\n "lastName": "",\n "mobilePhone": "",\n "notes": "",\n "pager": "",\n "primaryPhone": "",\n "priority": "",\n "relationship": "",\n "state": "",\n "syncEmployeeInfo": false,\n "workExtension": "",\n "workPhone": "",\n "zip": ""\n }\n ],\n "employeeId": "",\n "ethnicity": "",\n "federalTax": {\n "amount": "",\n "deductionsAmount": "",\n "dependentsAmount": "",\n "exemptions": "",\n "filingStatus": "",\n "higherRate": false,\n "otherIncomeAmount": "",\n "percentage": "",\n "taxCalculationCode": "",\n "w4FormYear": 0\n },\n "firstName": "",\n "gender": "",\n "homeAddress": {\n "address1": "",\n "address2": "",\n "city": "",\n "country": "",\n "county": "",\n "emailAddress": "",\n "mobilePhone": "",\n "phone": "",\n "postalCode": "",\n "state": ""\n },\n "isHighlyCompensated": false,\n "isSmoker": false,\n "lastName": "",\n "localTax": [\n {\n "exemptions": "",\n "exemptions2": "",\n "filingStatus": "",\n "residentPSD": "",\n "taxCode": "",\n "workPSD": ""\n }\n ],\n "mainDirectDeposit": {\n "accountNumber": "",\n "accountType": "",\n "blockSpecial": false,\n "isSkipPreNote": false,\n "nameOnAccount": "",\n "preNoteDate": "",\n "routingNumber": ""\n },\n "maritalStatus": "",\n "middleName": "",\n "nonPrimaryStateTax": {\n "amount": "",\n "deductionsAmount": "",\n "dependentsAmount": "",\n "exemptions": "",\n "exemptions2": "",\n "filingStatus": "",\n "higherRate": false,\n "otherIncomeAmount": "",\n "percentage": "",\n "reciprocityCode": "",\n "specialCheckCalc": "",\n "taxCalculationCode": "",\n "taxCode": "",\n "w4FormYear": 0\n },\n "ownerPercent": "",\n "preferredName": "",\n "primaryPayRate": {\n "annualSalary": "",\n "baseRate": "",\n "beginCheckDate": "",\n "changeReason": "",\n "defaultHours": "",\n "effectiveDate": "",\n "isAutoPay": false,\n "payFrequency": "",\n "payGrade": "",\n "payRateNote": "",\n "payType": "",\n "ratePer": "",\n "salary": ""\n },\n "primaryStateTax": {\n "amount": "",\n "deductionsAmount": "",\n "dependentsAmount": "",\n "exemptions": "",\n "exemptions2": "",\n "filingStatus": "",\n "higherRate": false,\n "otherIncomeAmount": "",\n "percentage": "",\n "specialCheckCalc": "",\n "taxCalculationCode": "",\n "taxCode": "",\n "w4FormYear": 0\n },\n "priorLastName": "",\n "salutation": "",\n "ssn": "",\n "status": {\n "adjustedSeniorityDate": "",\n "changeReason": "",\n "effectiveDate": "",\n "employeeStatus": "",\n "hireDate": "",\n "isEligibleForRehire": false,\n "reHireDate": "",\n "statusType": "",\n "terminationDate": ""\n },\n "suffix": "",\n "taxSetup": {\n "fitwExemptNotes": "",\n "fitwExemptReason": "",\n "futaExemptNotes": "",\n "futaExemptReason": "",\n "isEmployee943": false,\n "isPension": false,\n "isStatutory": false,\n "medExemptNotes": "",\n "medExemptReason": "",\n "sitwExemptNotes": "",\n "sitwExemptReason": "",\n "ssExemptNotes": "",\n "ssExemptReason": "",\n "suiExemptNotes": "",\n "suiExemptReason": "",\n "suiState": "",\n "taxDistributionCode1099R": "",\n "taxForm": ""\n },\n "veteranDescription": "",\n "webTime": {\n "badgeNumber": "",\n "chargeRate": "",\n "isTimeLaborEnabled": false\n },\n "workAddress": {\n "address1": "",\n "address2": "",\n "city": "",\n "country": "",\n "county": "",\n "emailAddress": "",\n "location": "",\n "mailStop": "",\n "mobilePhone": "",\n "pager": "",\n "phone": "",\n "phoneExtension": "",\n "postalCode": "",\n "state": ""\n },\n "workEligibility": {\n "alienOrAdmissionDocumentNumber": "",\n "attestedDate": "",\n "countryOfIssuance": "",\n "foreignPassportNumber": "",\n "i94AdmissionNumber": "",\n "i9DateVerified": "",\n "i9Notes": "",\n "isI9Verified": false,\n "isSsnVerified": false,\n "ssnDateVerified": "",\n "ssnNotes": "",\n "visaType": "",\n "workAuthorization": "",\n "workUntil": ""\n }\n}' \
--output-document \
- {{baseUrl}}/v2/companies/:companyId/employees/:employeeId
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"additionalDirectDeposit": [
[
"accountNumber": "",
"accountType": "",
"amount": "",
"amountType": "",
"blockSpecial": false,
"isSkipPreNote": false,
"nameOnAccount": "",
"preNoteDate": "",
"routingNumber": ""
]
],
"additionalRate": [
[
"changeReason": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"endCheckDate": "",
"job": "",
"rate": "",
"rateCode": "",
"rateNotes": "",
"ratePer": "",
"shift": ""
]
],
"benefitSetup": [
"benefitClass": "",
"benefitClassEffectiveDate": "",
"benefitSalary": "",
"benefitSalaryEffectiveDate": "",
"doNotApplyAdministrativePeriod": false,
"isMeasureAcaEligibility": false
],
"birthDate": "",
"coEmpCode": "",
"companyFEIN": "",
"companyName": "",
"currency": "",
"customBooleanFields": [
[
"category": "",
"label": "",
"value": false
]
],
"customDateFields": [
[
"category": "",
"label": "",
"value": ""
]
],
"customDropDownFields": [
[
"category": "",
"label": "",
"value": ""
]
],
"customNumberFields": [
[
"category": "",
"label": "",
"value": ""
]
],
"customTextFields": [
[
"category": "",
"label": "",
"value": ""
]
],
"departmentPosition": [
"changeReason": "",
"clockBadgeNumber": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"employeeType": "",
"equalEmploymentOpportunityClass": "",
"isMinimumWageExempt": false,
"isOvertimeExempt": false,
"isSupervisorReviewer": false,
"isUnionDuesCollected": false,
"isUnionInitiationCollected": false,
"jobTitle": "",
"payGroup": "",
"positionCode": "",
"reviewerCompanyNumber": "",
"reviewerEmployeeId": "",
"shift": "",
"supervisorCompanyNumber": "",
"supervisorEmployeeId": "",
"tipped": "",
"unionAffiliationDate": "",
"unionCode": "",
"unionPosition": "",
"workersCompensation": ""
],
"disabilityDescription": "",
"emergencyContacts": [
[
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"email": "",
"firstName": "",
"homePhone": "",
"lastName": "",
"mobilePhone": "",
"notes": "",
"pager": "",
"primaryPhone": "",
"priority": "",
"relationship": "",
"state": "",
"syncEmployeeInfo": false,
"workExtension": "",
"workPhone": "",
"zip": ""
]
],
"employeeId": "",
"ethnicity": "",
"federalTax": [
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"taxCalculationCode": "",
"w4FormYear": 0
],
"firstName": "",
"gender": "",
"homeAddress": [
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"mobilePhone": "",
"phone": "",
"postalCode": "",
"state": ""
],
"isHighlyCompensated": false,
"isSmoker": false,
"lastName": "",
"localTax": [
[
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"residentPSD": "",
"taxCode": "",
"workPSD": ""
]
],
"mainDirectDeposit": [
"accountNumber": "",
"accountType": "",
"blockSpecial": false,
"isSkipPreNote": false,
"nameOnAccount": "",
"preNoteDate": "",
"routingNumber": ""
],
"maritalStatus": "",
"middleName": "",
"nonPrimaryStateTax": [
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"reciprocityCode": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
],
"ownerPercent": "",
"preferredName": "",
"primaryPayRate": [
"annualSalary": "",
"baseRate": "",
"beginCheckDate": "",
"changeReason": "",
"defaultHours": "",
"effectiveDate": "",
"isAutoPay": false,
"payFrequency": "",
"payGrade": "",
"payRateNote": "",
"payType": "",
"ratePer": "",
"salary": ""
],
"primaryStateTax": [
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
],
"priorLastName": "",
"salutation": "",
"ssn": "",
"status": [
"adjustedSeniorityDate": "",
"changeReason": "",
"effectiveDate": "",
"employeeStatus": "",
"hireDate": "",
"isEligibleForRehire": false,
"reHireDate": "",
"statusType": "",
"terminationDate": ""
],
"suffix": "",
"taxSetup": [
"fitwExemptNotes": "",
"fitwExemptReason": "",
"futaExemptNotes": "",
"futaExemptReason": "",
"isEmployee943": false,
"isPension": false,
"isStatutory": false,
"medExemptNotes": "",
"medExemptReason": "",
"sitwExemptNotes": "",
"sitwExemptReason": "",
"ssExemptNotes": "",
"ssExemptReason": "",
"suiExemptNotes": "",
"suiExemptReason": "",
"suiState": "",
"taxDistributionCode1099R": "",
"taxForm": ""
],
"veteranDescription": "",
"webTime": [
"badgeNumber": "",
"chargeRate": "",
"isTimeLaborEnabled": false
],
"workAddress": [
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"location": "",
"mailStop": "",
"mobilePhone": "",
"pager": "",
"phone": "",
"phoneExtension": "",
"postalCode": "",
"state": ""
],
"workEligibility": [
"alienOrAdmissionDocumentNumber": "",
"attestedDate": "",
"countryOfIssuance": "",
"foreignPassportNumber": "",
"i94AdmissionNumber": "",
"i9DateVerified": "",
"i9Notes": "",
"isI9Verified": false,
"isSsnVerified": false,
"ssnDateVerified": "",
"ssnNotes": "",
"visaType": "",
"workAuthorization": "",
"workUntil": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
Add-update employee's benefit setup
{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/benefitSetup
QUERY PARAMS
companyId
employeeId
BODY json
{
"benefitClass": "",
"benefitClassEffectiveDate": "",
"benefitSalary": "",
"benefitSalaryEffectiveDate": "",
"doNotApplyAdministrativePeriod": false,
"isMeasureAcaEligibility": false
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/benefitSetup");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/benefitSetup" {:content-type :json
:form-params {:benefitClass ""
:benefitClassEffectiveDate ""
:benefitSalary ""
:benefitSalaryEffectiveDate ""
:doNotApplyAdministrativePeriod false
:isMeasureAcaEligibility false}})
require "http/client"
url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/benefitSetup"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/benefitSetup"),
Content = new StringContent("{\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/benefitSetup");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/benefitSetup"
payload := strings.NewReader("{\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/v2/companies/:companyId/employees/:employeeId/benefitSetup HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 197
{
"benefitClass": "",
"benefitClassEffectiveDate": "",
"benefitSalary": "",
"benefitSalaryEffectiveDate": "",
"doNotApplyAdministrativePeriod": false,
"isMeasureAcaEligibility": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/benefitSetup")
.setHeader("content-type", "application/json")
.setBody("{\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/benefitSetup"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/benefitSetup")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/benefitSetup")
.header("content-type", "application/json")
.body("{\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n}")
.asString();
const data = JSON.stringify({
benefitClass: '',
benefitClassEffectiveDate: '',
benefitSalary: '',
benefitSalaryEffectiveDate: '',
doNotApplyAdministrativePeriod: false,
isMeasureAcaEligibility: false
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/benefitSetup');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/benefitSetup',
headers: {'content-type': 'application/json'},
data: {
benefitClass: '',
benefitClassEffectiveDate: '',
benefitSalary: '',
benefitSalaryEffectiveDate: '',
doNotApplyAdministrativePeriod: false,
isMeasureAcaEligibility: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/benefitSetup';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"benefitClass":"","benefitClassEffectiveDate":"","benefitSalary":"","benefitSalaryEffectiveDate":"","doNotApplyAdministrativePeriod":false,"isMeasureAcaEligibility":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/benefitSetup',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "benefitClass": "",\n "benefitClassEffectiveDate": "",\n "benefitSalary": "",\n "benefitSalaryEffectiveDate": "",\n "doNotApplyAdministrativePeriod": false,\n "isMeasureAcaEligibility": false\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/benefitSetup")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/companies/:companyId/employees/:employeeId/benefitSetup',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
benefitClass: '',
benefitClassEffectiveDate: '',
benefitSalary: '',
benefitSalaryEffectiveDate: '',
doNotApplyAdministrativePeriod: false,
isMeasureAcaEligibility: false
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/benefitSetup',
headers: {'content-type': 'application/json'},
body: {
benefitClass: '',
benefitClassEffectiveDate: '',
benefitSalary: '',
benefitSalaryEffectiveDate: '',
doNotApplyAdministrativePeriod: false,
isMeasureAcaEligibility: false
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/benefitSetup');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
benefitClass: '',
benefitClassEffectiveDate: '',
benefitSalary: '',
benefitSalaryEffectiveDate: '',
doNotApplyAdministrativePeriod: false,
isMeasureAcaEligibility: false
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/benefitSetup',
headers: {'content-type': 'application/json'},
data: {
benefitClass: '',
benefitClassEffectiveDate: '',
benefitSalary: '',
benefitSalaryEffectiveDate: '',
doNotApplyAdministrativePeriod: false,
isMeasureAcaEligibility: false
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/benefitSetup';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"benefitClass":"","benefitClassEffectiveDate":"","benefitSalary":"","benefitSalaryEffectiveDate":"","doNotApplyAdministrativePeriod":false,"isMeasureAcaEligibility":false}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"benefitClass": @"",
@"benefitClassEffectiveDate": @"",
@"benefitSalary": @"",
@"benefitSalaryEffectiveDate": @"",
@"doNotApplyAdministrativePeriod": @NO,
@"isMeasureAcaEligibility": @NO };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/benefitSetup"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/benefitSetup" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/benefitSetup",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'benefitClass' => '',
'benefitClassEffectiveDate' => '',
'benefitSalary' => '',
'benefitSalaryEffectiveDate' => '',
'doNotApplyAdministrativePeriod' => null,
'isMeasureAcaEligibility' => null
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/benefitSetup', [
'body' => '{
"benefitClass": "",
"benefitClassEffectiveDate": "",
"benefitSalary": "",
"benefitSalaryEffectiveDate": "",
"doNotApplyAdministrativePeriod": false,
"isMeasureAcaEligibility": false
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/benefitSetup');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'benefitClass' => '',
'benefitClassEffectiveDate' => '',
'benefitSalary' => '',
'benefitSalaryEffectiveDate' => '',
'doNotApplyAdministrativePeriod' => null,
'isMeasureAcaEligibility' => null
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'benefitClass' => '',
'benefitClassEffectiveDate' => '',
'benefitSalary' => '',
'benefitSalaryEffectiveDate' => '',
'doNotApplyAdministrativePeriod' => null,
'isMeasureAcaEligibility' => null
]));
$request->setRequestUrl('{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/benefitSetup');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/benefitSetup' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"benefitClass": "",
"benefitClassEffectiveDate": "",
"benefitSalary": "",
"benefitSalaryEffectiveDate": "",
"doNotApplyAdministrativePeriod": false,
"isMeasureAcaEligibility": false
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/benefitSetup' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"benefitClass": "",
"benefitClassEffectiveDate": "",
"benefitSalary": "",
"benefitSalaryEffectiveDate": "",
"doNotApplyAdministrativePeriod": false,
"isMeasureAcaEligibility": false
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v2/companies/:companyId/employees/:employeeId/benefitSetup", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/benefitSetup"
payload = {
"benefitClass": "",
"benefitClassEffectiveDate": "",
"benefitSalary": "",
"benefitSalaryEffectiveDate": "",
"doNotApplyAdministrativePeriod": False,
"isMeasureAcaEligibility": False
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/benefitSetup"
payload <- "{\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/benefitSetup")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/v2/companies/:companyId/employees/:employeeId/benefitSetup') do |req|
req.body = "{\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/benefitSetup";
let payload = json!({
"benefitClass": "",
"benefitClassEffectiveDate": "",
"benefitSalary": "",
"benefitSalaryEffectiveDate": "",
"doNotApplyAdministrativePeriod": false,
"isMeasureAcaEligibility": false
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/benefitSetup \
--header 'content-type: application/json' \
--data '{
"benefitClass": "",
"benefitClassEffectiveDate": "",
"benefitSalary": "",
"benefitSalaryEffectiveDate": "",
"doNotApplyAdministrativePeriod": false,
"isMeasureAcaEligibility": false
}'
echo '{
"benefitClass": "",
"benefitClassEffectiveDate": "",
"benefitSalary": "",
"benefitSalaryEffectiveDate": "",
"doNotApplyAdministrativePeriod": false,
"isMeasureAcaEligibility": false
}' | \
http PUT {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/benefitSetup \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "benefitClass": "",\n "benefitClassEffectiveDate": "",\n "benefitSalary": "",\n "benefitSalaryEffectiveDate": "",\n "doNotApplyAdministrativePeriod": false,\n "isMeasureAcaEligibility": false\n}' \
--output-document \
- {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/benefitSetup
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"benefitClass": "",
"benefitClassEffectiveDate": "",
"benefitSalary": "",
"benefitSalaryEffectiveDate": "",
"doNotApplyAdministrativePeriod": false,
"isMeasureAcaEligibility": false
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/benefitSetup")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Add new employee to Web Link
{{baseUrl}}/v2/weblinkstaging/companies/:companyId/employees/newemployees
QUERY PARAMS
companyId
BODY json
{
"additionalDirectDeposit": [
{
"accountNumber": "",
"accountType": "",
"amount": "",
"amountType": "",
"isSkipPreNote": false,
"preNoteDate": "",
"routingNumber": ""
}
],
"benefitSetup": [
{
"benefitClass": "",
"benefitClassEffectiveDate": "",
"benefitSalary": "",
"benefitSalaryEffectiveDate": "",
"doNotApplyAdministrativePeriod": false,
"isMeasureAcaEligibility": false
}
],
"birthDate": "",
"customBooleanFields": [
{
"category": "",
"label": "",
"value": false
}
],
"customDateFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customDropDownFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customNumberFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customTextFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"departmentPosition": [
{
"changeReason": "",
"clockBadgeNumber": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"employeeType": "",
"equalEmploymentOpportunityClass": "",
"isMinimumWageExempt": false,
"isOvertimeExempt": false,
"isSupervisorReviewer": false,
"isUnionDuesCollected": false,
"isUnionInitiationCollected": false,
"jobTitle": "",
"payGroup": "",
"positionCode": "",
"shift": "",
"supervisorCompanyNumber": "",
"supervisorEmployeeId": "",
"tipped": "",
"unionAffiliationDate": "",
"unionCode": "",
"unionPosition": "",
"workersCompensation": ""
}
],
"disabilityDescription": "",
"employeeId": "",
"ethnicity": "",
"federalTax": [
{
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"taxCalculationCode": "",
"w4FormYear": 0
}
],
"firstName": "",
"fitwExemptReason": "",
"futaExemptReason": "",
"gender": "",
"homeAddress": [
{
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"mobilePhone": "",
"phone": "",
"postalCode": "",
"state": ""
}
],
"isEmployee943": false,
"isSmoker": false,
"lastName": "",
"localTax": [
{
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"residentPSD": "",
"taxCode": "",
"workPSD": ""
}
],
"mainDirectDeposit": [
{
"accountNumber": "",
"accountType": "",
"isSkipPreNote": false,
"preNoteDate": "",
"routingNumber": ""
}
],
"maritalStatus": "",
"medExemptReason": "",
"middleName": "",
"nonPrimaryStateTax": [
{
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"reciprocityCode": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
}
],
"preferredName": "",
"primaryPayRate": [
{
"baseRate": "",
"changeReason": "",
"defaultHours": "",
"effectiveDate": "",
"isAutoPay": false,
"payFrequency": "",
"payGrade": "",
"payType": "",
"ratePer": "",
"salary": ""
}
],
"primaryStateTax": [
{
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
}
],
"priorLastName": "",
"salutation": "",
"sitwExemptReason": "",
"ssExemptReason": "",
"ssn": "",
"status": [
{
"adjustedSeniorityDate": "",
"changeReason": "",
"effectiveDate": "",
"employeeStatus": "",
"hireDate": "",
"isEligibleForRehire": false
}
],
"suffix": "",
"suiExemptReason": "",
"suiState": "",
"taxDistributionCode1099R": "",
"taxForm": "",
"veteranDescription": "",
"webTime": {
"badgeNumber": "",
"chargeRate": "",
"isTimeLaborEnabled": false
},
"workAddress": [
{
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"mobilePhone": "",
"pager": "",
"phone": "",
"phoneExtension": "",
"postalCode": "",
"state": ""
}
],
"workEligibility": [
{
"alienOrAdmissionDocumentNumber": "",
"attestedDate": "",
"countryOfIssuance": "",
"foreignPassportNumber": "",
"i94AdmissionNumber": "",
"i9DateVerified": "",
"i9Notes": "",
"isI9Verified": false,
"isSsnVerified": false,
"ssnDateVerified": "",
"ssnNotes": "",
"visaType": "",
"workAuthorization": "",
"workUntil": ""
}
]
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/weblinkstaging/companies/:companyId/employees/newemployees");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"additionalDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"amount\": \"\",\n \"amountType\": \"\",\n \"isSkipPreNote\": false,\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"benefitSetup\": [\n {\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n }\n ],\n \"birthDate\": \"\",\n \"customBooleanFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": false\n }\n ],\n \"customDateFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customDropDownFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customNumberFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customTextFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"departmentPosition\": [\n {\n \"changeReason\": \"\",\n \"clockBadgeNumber\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"employeeType\": \"\",\n \"equalEmploymentOpportunityClass\": \"\",\n \"isMinimumWageExempt\": false,\n \"isOvertimeExempt\": false,\n \"isSupervisorReviewer\": false,\n \"isUnionDuesCollected\": false,\n \"isUnionInitiationCollected\": false,\n \"jobTitle\": \"\",\n \"payGroup\": \"\",\n \"positionCode\": \"\",\n \"shift\": \"\",\n \"supervisorCompanyNumber\": \"\",\n \"supervisorEmployeeId\": \"\",\n \"tipped\": \"\",\n \"unionAffiliationDate\": \"\",\n \"unionCode\": \"\",\n \"unionPosition\": \"\",\n \"workersCompensation\": \"\"\n }\n ],\n \"disabilityDescription\": \"\",\n \"employeeId\": \"\",\n \"ethnicity\": \"\",\n \"federalTax\": [\n {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"taxCalculationCode\": \"\",\n \"w4FormYear\": 0\n }\n ],\n \"firstName\": \"\",\n \"fitwExemptReason\": \"\",\n \"futaExemptReason\": \"\",\n \"gender\": \"\",\n \"homeAddress\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n }\n ],\n \"isEmployee943\": false,\n \"isSmoker\": false,\n \"lastName\": \"\",\n \"localTax\": [\n {\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n }\n ],\n \"mainDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"isSkipPreNote\": false,\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"maritalStatus\": \"\",\n \"medExemptReason\": \"\",\n \"middleName\": \"\",\n \"nonPrimaryStateTax\": [\n {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n }\n ],\n \"preferredName\": \"\",\n \"primaryPayRate\": [\n {\n \"baseRate\": \"\",\n \"changeReason\": \"\",\n \"defaultHours\": \"\",\n \"effectiveDate\": \"\",\n \"isAutoPay\": false,\n \"payFrequency\": \"\",\n \"payGrade\": \"\",\n \"payType\": \"\",\n \"ratePer\": \"\",\n \"salary\": \"\"\n }\n ],\n \"primaryStateTax\": [\n {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n }\n ],\n \"priorLastName\": \"\",\n \"salutation\": \"\",\n \"sitwExemptReason\": \"\",\n \"ssExemptReason\": \"\",\n \"ssn\": \"\",\n \"status\": [\n {\n \"adjustedSeniorityDate\": \"\",\n \"changeReason\": \"\",\n \"effectiveDate\": \"\",\n \"employeeStatus\": \"\",\n \"hireDate\": \"\",\n \"isEligibleForRehire\": false\n }\n ],\n \"suffix\": \"\",\n \"suiExemptReason\": \"\",\n \"suiState\": \"\",\n \"taxDistributionCode1099R\": \"\",\n \"taxForm\": \"\",\n \"veteranDescription\": \"\",\n \"webTime\": {\n \"badgeNumber\": \"\",\n \"chargeRate\": \"\",\n \"isTimeLaborEnabled\": false\n },\n \"workAddress\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"pager\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n }\n ],\n \"workEligibility\": [\n {\n \"alienOrAdmissionDocumentNumber\": \"\",\n \"attestedDate\": \"\",\n \"countryOfIssuance\": \"\",\n \"foreignPassportNumber\": \"\",\n \"i94AdmissionNumber\": \"\",\n \"i9DateVerified\": \"\",\n \"i9Notes\": \"\",\n \"isI9Verified\": false,\n \"isSsnVerified\": false,\n \"ssnDateVerified\": \"\",\n \"ssnNotes\": \"\",\n \"visaType\": \"\",\n \"workAuthorization\": \"\",\n \"workUntil\": \"\"\n }\n ]\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v2/weblinkstaging/companies/:companyId/employees/newemployees" {:content-type :json
:form-params {:additionalDirectDeposit [{:accountNumber ""
:accountType ""
:amount ""
:amountType ""
:isSkipPreNote false
:preNoteDate ""
:routingNumber ""}]
:benefitSetup [{:benefitClass ""
:benefitClassEffectiveDate ""
:benefitSalary ""
:benefitSalaryEffectiveDate ""
:doNotApplyAdministrativePeriod false
:isMeasureAcaEligibility false}]
:birthDate ""
:customBooleanFields [{:category ""
:label ""
:value false}]
:customDateFields [{:category ""
:label ""
:value ""}]
:customDropDownFields [{:category ""
:label ""
:value ""}]
:customNumberFields [{:category ""
:label ""
:value ""}]
:customTextFields [{:category ""
:label ""
:value ""}]
:departmentPosition [{:changeReason ""
:clockBadgeNumber ""
:costCenter1 ""
:costCenter2 ""
:costCenter3 ""
:effectiveDate ""
:employeeType ""
:equalEmploymentOpportunityClass ""
:isMinimumWageExempt false
:isOvertimeExempt false
:isSupervisorReviewer false
:isUnionDuesCollected false
:isUnionInitiationCollected false
:jobTitle ""
:payGroup ""
:positionCode ""
:shift ""
:supervisorCompanyNumber ""
:supervisorEmployeeId ""
:tipped ""
:unionAffiliationDate ""
:unionCode ""
:unionPosition ""
:workersCompensation ""}]
:disabilityDescription ""
:employeeId ""
:ethnicity ""
:federalTax [{:amount ""
:deductionsAmount ""
:dependentsAmount ""
:exemptions ""
:filingStatus ""
:higherRate false
:otherIncomeAmount ""
:percentage ""
:taxCalculationCode ""
:w4FormYear 0}]
:firstName ""
:fitwExemptReason ""
:futaExemptReason ""
:gender ""
:homeAddress [{:address1 ""
:address2 ""
:city ""
:country ""
:county ""
:emailAddress ""
:mobilePhone ""
:phone ""
:postalCode ""
:state ""}]
:isEmployee943 false
:isSmoker false
:lastName ""
:localTax [{:exemptions ""
:exemptions2 ""
:filingStatus ""
:residentPSD ""
:taxCode ""
:workPSD ""}]
:mainDirectDeposit [{:accountNumber ""
:accountType ""
:isSkipPreNote false
:preNoteDate ""
:routingNumber ""}]
:maritalStatus ""
:medExemptReason ""
:middleName ""
:nonPrimaryStateTax [{:amount ""
:deductionsAmount ""
:dependentsAmount ""
:exemptions ""
:exemptions2 ""
:filingStatus ""
:higherRate false
:otherIncomeAmount ""
:percentage ""
:reciprocityCode ""
:specialCheckCalc ""
:taxCalculationCode ""
:taxCode ""
:w4FormYear 0}]
:preferredName ""
:primaryPayRate [{:baseRate ""
:changeReason ""
:defaultHours ""
:effectiveDate ""
:isAutoPay false
:payFrequency ""
:payGrade ""
:payType ""
:ratePer ""
:salary ""}]
:primaryStateTax [{:amount ""
:deductionsAmount ""
:dependentsAmount ""
:exemptions ""
:exemptions2 ""
:filingStatus ""
:higherRate false
:otherIncomeAmount ""
:percentage ""
:specialCheckCalc ""
:taxCalculationCode ""
:taxCode ""
:w4FormYear 0}]
:priorLastName ""
:salutation ""
:sitwExemptReason ""
:ssExemptReason ""
:ssn ""
:status [{:adjustedSeniorityDate ""
:changeReason ""
:effectiveDate ""
:employeeStatus ""
:hireDate ""
:isEligibleForRehire false}]
:suffix ""
:suiExemptReason ""
:suiState ""
:taxDistributionCode1099R ""
:taxForm ""
:veteranDescription ""
:webTime {:badgeNumber ""
:chargeRate ""
:isTimeLaborEnabled false}
:workAddress [{:address1 ""
:address2 ""
:city ""
:country ""
:county ""
:emailAddress ""
:mobilePhone ""
:pager ""
:phone ""
:phoneExtension ""
:postalCode ""
:state ""}]
:workEligibility [{:alienOrAdmissionDocumentNumber ""
:attestedDate ""
:countryOfIssuance ""
:foreignPassportNumber ""
:i94AdmissionNumber ""
:i9DateVerified ""
:i9Notes ""
:isI9Verified false
:isSsnVerified false
:ssnDateVerified ""
:ssnNotes ""
:visaType ""
:workAuthorization ""
:workUntil ""}]}})
require "http/client"
url = "{{baseUrl}}/v2/weblinkstaging/companies/:companyId/employees/newemployees"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"additionalDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"amount\": \"\",\n \"amountType\": \"\",\n \"isSkipPreNote\": false,\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"benefitSetup\": [\n {\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n }\n ],\n \"birthDate\": \"\",\n \"customBooleanFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": false\n }\n ],\n \"customDateFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customDropDownFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customNumberFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customTextFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"departmentPosition\": [\n {\n \"changeReason\": \"\",\n \"clockBadgeNumber\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"employeeType\": \"\",\n \"equalEmploymentOpportunityClass\": \"\",\n \"isMinimumWageExempt\": false,\n \"isOvertimeExempt\": false,\n \"isSupervisorReviewer\": false,\n \"isUnionDuesCollected\": false,\n \"isUnionInitiationCollected\": false,\n \"jobTitle\": \"\",\n \"payGroup\": \"\",\n \"positionCode\": \"\",\n \"shift\": \"\",\n \"supervisorCompanyNumber\": \"\",\n \"supervisorEmployeeId\": \"\",\n \"tipped\": \"\",\n \"unionAffiliationDate\": \"\",\n \"unionCode\": \"\",\n \"unionPosition\": \"\",\n \"workersCompensation\": \"\"\n }\n ],\n \"disabilityDescription\": \"\",\n \"employeeId\": \"\",\n \"ethnicity\": \"\",\n \"federalTax\": [\n {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"taxCalculationCode\": \"\",\n \"w4FormYear\": 0\n }\n ],\n \"firstName\": \"\",\n \"fitwExemptReason\": \"\",\n \"futaExemptReason\": \"\",\n \"gender\": \"\",\n \"homeAddress\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n }\n ],\n \"isEmployee943\": false,\n \"isSmoker\": false,\n \"lastName\": \"\",\n \"localTax\": [\n {\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n }\n ],\n \"mainDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"isSkipPreNote\": false,\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"maritalStatus\": \"\",\n \"medExemptReason\": \"\",\n \"middleName\": \"\",\n \"nonPrimaryStateTax\": [\n {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n }\n ],\n \"preferredName\": \"\",\n \"primaryPayRate\": [\n {\n \"baseRate\": \"\",\n \"changeReason\": \"\",\n \"defaultHours\": \"\",\n \"effectiveDate\": \"\",\n \"isAutoPay\": false,\n \"payFrequency\": \"\",\n \"payGrade\": \"\",\n \"payType\": \"\",\n \"ratePer\": \"\",\n \"salary\": \"\"\n }\n ],\n \"primaryStateTax\": [\n {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n }\n ],\n \"priorLastName\": \"\",\n \"salutation\": \"\",\n \"sitwExemptReason\": \"\",\n \"ssExemptReason\": \"\",\n \"ssn\": \"\",\n \"status\": [\n {\n \"adjustedSeniorityDate\": \"\",\n \"changeReason\": \"\",\n \"effectiveDate\": \"\",\n \"employeeStatus\": \"\",\n \"hireDate\": \"\",\n \"isEligibleForRehire\": false\n }\n ],\n \"suffix\": \"\",\n \"suiExemptReason\": \"\",\n \"suiState\": \"\",\n \"taxDistributionCode1099R\": \"\",\n \"taxForm\": \"\",\n \"veteranDescription\": \"\",\n \"webTime\": {\n \"badgeNumber\": \"\",\n \"chargeRate\": \"\",\n \"isTimeLaborEnabled\": false\n },\n \"workAddress\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"pager\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n }\n ],\n \"workEligibility\": [\n {\n \"alienOrAdmissionDocumentNumber\": \"\",\n \"attestedDate\": \"\",\n \"countryOfIssuance\": \"\",\n \"foreignPassportNumber\": \"\",\n \"i94AdmissionNumber\": \"\",\n \"i9DateVerified\": \"\",\n \"i9Notes\": \"\",\n \"isI9Verified\": false,\n \"isSsnVerified\": false,\n \"ssnDateVerified\": \"\",\n \"ssnNotes\": \"\",\n \"visaType\": \"\",\n \"workAuthorization\": \"\",\n \"workUntil\": \"\"\n }\n ]\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v2/weblinkstaging/companies/:companyId/employees/newemployees"),
Content = new StringContent("{\n \"additionalDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"amount\": \"\",\n \"amountType\": \"\",\n \"isSkipPreNote\": false,\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"benefitSetup\": [\n {\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n }\n ],\n \"birthDate\": \"\",\n \"customBooleanFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": false\n }\n ],\n \"customDateFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customDropDownFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customNumberFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customTextFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"departmentPosition\": [\n {\n \"changeReason\": \"\",\n \"clockBadgeNumber\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"employeeType\": \"\",\n \"equalEmploymentOpportunityClass\": \"\",\n \"isMinimumWageExempt\": false,\n \"isOvertimeExempt\": false,\n \"isSupervisorReviewer\": false,\n \"isUnionDuesCollected\": false,\n \"isUnionInitiationCollected\": false,\n \"jobTitle\": \"\",\n \"payGroup\": \"\",\n \"positionCode\": \"\",\n \"shift\": \"\",\n \"supervisorCompanyNumber\": \"\",\n \"supervisorEmployeeId\": \"\",\n \"tipped\": \"\",\n \"unionAffiliationDate\": \"\",\n \"unionCode\": \"\",\n \"unionPosition\": \"\",\n \"workersCompensation\": \"\"\n }\n ],\n \"disabilityDescription\": \"\",\n \"employeeId\": \"\",\n \"ethnicity\": \"\",\n \"federalTax\": [\n {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"taxCalculationCode\": \"\",\n \"w4FormYear\": 0\n }\n ],\n \"firstName\": \"\",\n \"fitwExemptReason\": \"\",\n \"futaExemptReason\": \"\",\n \"gender\": \"\",\n \"homeAddress\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n }\n ],\n \"isEmployee943\": false,\n \"isSmoker\": false,\n \"lastName\": \"\",\n \"localTax\": [\n {\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n }\n ],\n \"mainDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"isSkipPreNote\": false,\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"maritalStatus\": \"\",\n \"medExemptReason\": \"\",\n \"middleName\": \"\",\n \"nonPrimaryStateTax\": [\n {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n }\n ],\n \"preferredName\": \"\",\n \"primaryPayRate\": [\n {\n \"baseRate\": \"\",\n \"changeReason\": \"\",\n \"defaultHours\": \"\",\n \"effectiveDate\": \"\",\n \"isAutoPay\": false,\n \"payFrequency\": \"\",\n \"payGrade\": \"\",\n \"payType\": \"\",\n \"ratePer\": \"\",\n \"salary\": \"\"\n }\n ],\n \"primaryStateTax\": [\n {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n }\n ],\n \"priorLastName\": \"\",\n \"salutation\": \"\",\n \"sitwExemptReason\": \"\",\n \"ssExemptReason\": \"\",\n \"ssn\": \"\",\n \"status\": [\n {\n \"adjustedSeniorityDate\": \"\",\n \"changeReason\": \"\",\n \"effectiveDate\": \"\",\n \"employeeStatus\": \"\",\n \"hireDate\": \"\",\n \"isEligibleForRehire\": false\n }\n ],\n \"suffix\": \"\",\n \"suiExemptReason\": \"\",\n \"suiState\": \"\",\n \"taxDistributionCode1099R\": \"\",\n \"taxForm\": \"\",\n \"veteranDescription\": \"\",\n \"webTime\": {\n \"badgeNumber\": \"\",\n \"chargeRate\": \"\",\n \"isTimeLaborEnabled\": false\n },\n \"workAddress\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"pager\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n }\n ],\n \"workEligibility\": [\n {\n \"alienOrAdmissionDocumentNumber\": \"\",\n \"attestedDate\": \"\",\n \"countryOfIssuance\": \"\",\n \"foreignPassportNumber\": \"\",\n \"i94AdmissionNumber\": \"\",\n \"i9DateVerified\": \"\",\n \"i9Notes\": \"\",\n \"isI9Verified\": false,\n \"isSsnVerified\": false,\n \"ssnDateVerified\": \"\",\n \"ssnNotes\": \"\",\n \"visaType\": \"\",\n \"workAuthorization\": \"\",\n \"workUntil\": \"\"\n }\n ]\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/weblinkstaging/companies/:companyId/employees/newemployees");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"additionalDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"amount\": \"\",\n \"amountType\": \"\",\n \"isSkipPreNote\": false,\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"benefitSetup\": [\n {\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n }\n ],\n \"birthDate\": \"\",\n \"customBooleanFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": false\n }\n ],\n \"customDateFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customDropDownFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customNumberFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customTextFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"departmentPosition\": [\n {\n \"changeReason\": \"\",\n \"clockBadgeNumber\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"employeeType\": \"\",\n \"equalEmploymentOpportunityClass\": \"\",\n \"isMinimumWageExempt\": false,\n \"isOvertimeExempt\": false,\n \"isSupervisorReviewer\": false,\n \"isUnionDuesCollected\": false,\n \"isUnionInitiationCollected\": false,\n \"jobTitle\": \"\",\n \"payGroup\": \"\",\n \"positionCode\": \"\",\n \"shift\": \"\",\n \"supervisorCompanyNumber\": \"\",\n \"supervisorEmployeeId\": \"\",\n \"tipped\": \"\",\n \"unionAffiliationDate\": \"\",\n \"unionCode\": \"\",\n \"unionPosition\": \"\",\n \"workersCompensation\": \"\"\n }\n ],\n \"disabilityDescription\": \"\",\n \"employeeId\": \"\",\n \"ethnicity\": \"\",\n \"federalTax\": [\n {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"taxCalculationCode\": \"\",\n \"w4FormYear\": 0\n }\n ],\n \"firstName\": \"\",\n \"fitwExemptReason\": \"\",\n \"futaExemptReason\": \"\",\n \"gender\": \"\",\n \"homeAddress\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n }\n ],\n \"isEmployee943\": false,\n \"isSmoker\": false,\n \"lastName\": \"\",\n \"localTax\": [\n {\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n }\n ],\n \"mainDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"isSkipPreNote\": false,\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"maritalStatus\": \"\",\n \"medExemptReason\": \"\",\n \"middleName\": \"\",\n \"nonPrimaryStateTax\": [\n {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n }\n ],\n \"preferredName\": \"\",\n \"primaryPayRate\": [\n {\n \"baseRate\": \"\",\n \"changeReason\": \"\",\n \"defaultHours\": \"\",\n \"effectiveDate\": \"\",\n \"isAutoPay\": false,\n \"payFrequency\": \"\",\n \"payGrade\": \"\",\n \"payType\": \"\",\n \"ratePer\": \"\",\n \"salary\": \"\"\n }\n ],\n \"primaryStateTax\": [\n {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n }\n ],\n \"priorLastName\": \"\",\n \"salutation\": \"\",\n \"sitwExemptReason\": \"\",\n \"ssExemptReason\": \"\",\n \"ssn\": \"\",\n \"status\": [\n {\n \"adjustedSeniorityDate\": \"\",\n \"changeReason\": \"\",\n \"effectiveDate\": \"\",\n \"employeeStatus\": \"\",\n \"hireDate\": \"\",\n \"isEligibleForRehire\": false\n }\n ],\n \"suffix\": \"\",\n \"suiExemptReason\": \"\",\n \"suiState\": \"\",\n \"taxDistributionCode1099R\": \"\",\n \"taxForm\": \"\",\n \"veteranDescription\": \"\",\n \"webTime\": {\n \"badgeNumber\": \"\",\n \"chargeRate\": \"\",\n \"isTimeLaborEnabled\": false\n },\n \"workAddress\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"pager\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n }\n ],\n \"workEligibility\": [\n {\n \"alienOrAdmissionDocumentNumber\": \"\",\n \"attestedDate\": \"\",\n \"countryOfIssuance\": \"\",\n \"foreignPassportNumber\": \"\",\n \"i94AdmissionNumber\": \"\",\n \"i9DateVerified\": \"\",\n \"i9Notes\": \"\",\n \"isI9Verified\": false,\n \"isSsnVerified\": false,\n \"ssnDateVerified\": \"\",\n \"ssnNotes\": \"\",\n \"visaType\": \"\",\n \"workAuthorization\": \"\",\n \"workUntil\": \"\"\n }\n ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/weblinkstaging/companies/:companyId/employees/newemployees"
payload := strings.NewReader("{\n \"additionalDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"amount\": \"\",\n \"amountType\": \"\",\n \"isSkipPreNote\": false,\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"benefitSetup\": [\n {\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n }\n ],\n \"birthDate\": \"\",\n \"customBooleanFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": false\n }\n ],\n \"customDateFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customDropDownFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customNumberFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customTextFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"departmentPosition\": [\n {\n \"changeReason\": \"\",\n \"clockBadgeNumber\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"employeeType\": \"\",\n \"equalEmploymentOpportunityClass\": \"\",\n \"isMinimumWageExempt\": false,\n \"isOvertimeExempt\": false,\n \"isSupervisorReviewer\": false,\n \"isUnionDuesCollected\": false,\n \"isUnionInitiationCollected\": false,\n \"jobTitle\": \"\",\n \"payGroup\": \"\",\n \"positionCode\": \"\",\n \"shift\": \"\",\n \"supervisorCompanyNumber\": \"\",\n \"supervisorEmployeeId\": \"\",\n \"tipped\": \"\",\n \"unionAffiliationDate\": \"\",\n \"unionCode\": \"\",\n \"unionPosition\": \"\",\n \"workersCompensation\": \"\"\n }\n ],\n \"disabilityDescription\": \"\",\n \"employeeId\": \"\",\n \"ethnicity\": \"\",\n \"federalTax\": [\n {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"taxCalculationCode\": \"\",\n \"w4FormYear\": 0\n }\n ],\n \"firstName\": \"\",\n \"fitwExemptReason\": \"\",\n \"futaExemptReason\": \"\",\n \"gender\": \"\",\n \"homeAddress\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n }\n ],\n \"isEmployee943\": false,\n \"isSmoker\": false,\n \"lastName\": \"\",\n \"localTax\": [\n {\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n }\n ],\n \"mainDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"isSkipPreNote\": false,\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"maritalStatus\": \"\",\n \"medExemptReason\": \"\",\n \"middleName\": \"\",\n \"nonPrimaryStateTax\": [\n {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n }\n ],\n \"preferredName\": \"\",\n \"primaryPayRate\": [\n {\n \"baseRate\": \"\",\n \"changeReason\": \"\",\n \"defaultHours\": \"\",\n \"effectiveDate\": \"\",\n \"isAutoPay\": false,\n \"payFrequency\": \"\",\n \"payGrade\": \"\",\n \"payType\": \"\",\n \"ratePer\": \"\",\n \"salary\": \"\"\n }\n ],\n \"primaryStateTax\": [\n {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n }\n ],\n \"priorLastName\": \"\",\n \"salutation\": \"\",\n \"sitwExemptReason\": \"\",\n \"ssExemptReason\": \"\",\n \"ssn\": \"\",\n \"status\": [\n {\n \"adjustedSeniorityDate\": \"\",\n \"changeReason\": \"\",\n \"effectiveDate\": \"\",\n \"employeeStatus\": \"\",\n \"hireDate\": \"\",\n \"isEligibleForRehire\": false\n }\n ],\n \"suffix\": \"\",\n \"suiExemptReason\": \"\",\n \"suiState\": \"\",\n \"taxDistributionCode1099R\": \"\",\n \"taxForm\": \"\",\n \"veteranDescription\": \"\",\n \"webTime\": {\n \"badgeNumber\": \"\",\n \"chargeRate\": \"\",\n \"isTimeLaborEnabled\": false\n },\n \"workAddress\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"pager\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n }\n ],\n \"workEligibility\": [\n {\n \"alienOrAdmissionDocumentNumber\": \"\",\n \"attestedDate\": \"\",\n \"countryOfIssuance\": \"\",\n \"foreignPassportNumber\": \"\",\n \"i94AdmissionNumber\": \"\",\n \"i9DateVerified\": \"\",\n \"i9Notes\": \"\",\n \"isI9Verified\": false,\n \"isSsnVerified\": false,\n \"ssnDateVerified\": \"\",\n \"ssnNotes\": \"\",\n \"visaType\": \"\",\n \"workAuthorization\": \"\",\n \"workUntil\": \"\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v2/weblinkstaging/companies/:companyId/employees/newemployees HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 5337
{
"additionalDirectDeposit": [
{
"accountNumber": "",
"accountType": "",
"amount": "",
"amountType": "",
"isSkipPreNote": false,
"preNoteDate": "",
"routingNumber": ""
}
],
"benefitSetup": [
{
"benefitClass": "",
"benefitClassEffectiveDate": "",
"benefitSalary": "",
"benefitSalaryEffectiveDate": "",
"doNotApplyAdministrativePeriod": false,
"isMeasureAcaEligibility": false
}
],
"birthDate": "",
"customBooleanFields": [
{
"category": "",
"label": "",
"value": false
}
],
"customDateFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customDropDownFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customNumberFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customTextFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"departmentPosition": [
{
"changeReason": "",
"clockBadgeNumber": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"employeeType": "",
"equalEmploymentOpportunityClass": "",
"isMinimumWageExempt": false,
"isOvertimeExempt": false,
"isSupervisorReviewer": false,
"isUnionDuesCollected": false,
"isUnionInitiationCollected": false,
"jobTitle": "",
"payGroup": "",
"positionCode": "",
"shift": "",
"supervisorCompanyNumber": "",
"supervisorEmployeeId": "",
"tipped": "",
"unionAffiliationDate": "",
"unionCode": "",
"unionPosition": "",
"workersCompensation": ""
}
],
"disabilityDescription": "",
"employeeId": "",
"ethnicity": "",
"federalTax": [
{
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"taxCalculationCode": "",
"w4FormYear": 0
}
],
"firstName": "",
"fitwExemptReason": "",
"futaExemptReason": "",
"gender": "",
"homeAddress": [
{
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"mobilePhone": "",
"phone": "",
"postalCode": "",
"state": ""
}
],
"isEmployee943": false,
"isSmoker": false,
"lastName": "",
"localTax": [
{
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"residentPSD": "",
"taxCode": "",
"workPSD": ""
}
],
"mainDirectDeposit": [
{
"accountNumber": "",
"accountType": "",
"isSkipPreNote": false,
"preNoteDate": "",
"routingNumber": ""
}
],
"maritalStatus": "",
"medExemptReason": "",
"middleName": "",
"nonPrimaryStateTax": [
{
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"reciprocityCode": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
}
],
"preferredName": "",
"primaryPayRate": [
{
"baseRate": "",
"changeReason": "",
"defaultHours": "",
"effectiveDate": "",
"isAutoPay": false,
"payFrequency": "",
"payGrade": "",
"payType": "",
"ratePer": "",
"salary": ""
}
],
"primaryStateTax": [
{
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
}
],
"priorLastName": "",
"salutation": "",
"sitwExemptReason": "",
"ssExemptReason": "",
"ssn": "",
"status": [
{
"adjustedSeniorityDate": "",
"changeReason": "",
"effectiveDate": "",
"employeeStatus": "",
"hireDate": "",
"isEligibleForRehire": false
}
],
"suffix": "",
"suiExemptReason": "",
"suiState": "",
"taxDistributionCode1099R": "",
"taxForm": "",
"veteranDescription": "",
"webTime": {
"badgeNumber": "",
"chargeRate": "",
"isTimeLaborEnabled": false
},
"workAddress": [
{
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"mobilePhone": "",
"pager": "",
"phone": "",
"phoneExtension": "",
"postalCode": "",
"state": ""
}
],
"workEligibility": [
{
"alienOrAdmissionDocumentNumber": "",
"attestedDate": "",
"countryOfIssuance": "",
"foreignPassportNumber": "",
"i94AdmissionNumber": "",
"i9DateVerified": "",
"i9Notes": "",
"isI9Verified": false,
"isSsnVerified": false,
"ssnDateVerified": "",
"ssnNotes": "",
"visaType": "",
"workAuthorization": "",
"workUntil": ""
}
]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v2/weblinkstaging/companies/:companyId/employees/newemployees")
.setHeader("content-type", "application/json")
.setBody("{\n \"additionalDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"amount\": \"\",\n \"amountType\": \"\",\n \"isSkipPreNote\": false,\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"benefitSetup\": [\n {\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n }\n ],\n \"birthDate\": \"\",\n \"customBooleanFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": false\n }\n ],\n \"customDateFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customDropDownFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customNumberFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customTextFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"departmentPosition\": [\n {\n \"changeReason\": \"\",\n \"clockBadgeNumber\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"employeeType\": \"\",\n \"equalEmploymentOpportunityClass\": \"\",\n \"isMinimumWageExempt\": false,\n \"isOvertimeExempt\": false,\n \"isSupervisorReviewer\": false,\n \"isUnionDuesCollected\": false,\n \"isUnionInitiationCollected\": false,\n \"jobTitle\": \"\",\n \"payGroup\": \"\",\n \"positionCode\": \"\",\n \"shift\": \"\",\n \"supervisorCompanyNumber\": \"\",\n \"supervisorEmployeeId\": \"\",\n \"tipped\": \"\",\n \"unionAffiliationDate\": \"\",\n \"unionCode\": \"\",\n \"unionPosition\": \"\",\n \"workersCompensation\": \"\"\n }\n ],\n \"disabilityDescription\": \"\",\n \"employeeId\": \"\",\n \"ethnicity\": \"\",\n \"federalTax\": [\n {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"taxCalculationCode\": \"\",\n \"w4FormYear\": 0\n }\n ],\n \"firstName\": \"\",\n \"fitwExemptReason\": \"\",\n \"futaExemptReason\": \"\",\n \"gender\": \"\",\n \"homeAddress\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n }\n ],\n \"isEmployee943\": false,\n \"isSmoker\": false,\n \"lastName\": \"\",\n \"localTax\": [\n {\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n }\n ],\n \"mainDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"isSkipPreNote\": false,\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"maritalStatus\": \"\",\n \"medExemptReason\": \"\",\n \"middleName\": \"\",\n \"nonPrimaryStateTax\": [\n {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n }\n ],\n \"preferredName\": \"\",\n \"primaryPayRate\": [\n {\n \"baseRate\": \"\",\n \"changeReason\": \"\",\n \"defaultHours\": \"\",\n \"effectiveDate\": \"\",\n \"isAutoPay\": false,\n \"payFrequency\": \"\",\n \"payGrade\": \"\",\n \"payType\": \"\",\n \"ratePer\": \"\",\n \"salary\": \"\"\n }\n ],\n \"primaryStateTax\": [\n {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n }\n ],\n \"priorLastName\": \"\",\n \"salutation\": \"\",\n \"sitwExemptReason\": \"\",\n \"ssExemptReason\": \"\",\n \"ssn\": \"\",\n \"status\": [\n {\n \"adjustedSeniorityDate\": \"\",\n \"changeReason\": \"\",\n \"effectiveDate\": \"\",\n \"employeeStatus\": \"\",\n \"hireDate\": \"\",\n \"isEligibleForRehire\": false\n }\n ],\n \"suffix\": \"\",\n \"suiExemptReason\": \"\",\n \"suiState\": \"\",\n \"taxDistributionCode1099R\": \"\",\n \"taxForm\": \"\",\n \"veteranDescription\": \"\",\n \"webTime\": {\n \"badgeNumber\": \"\",\n \"chargeRate\": \"\",\n \"isTimeLaborEnabled\": false\n },\n \"workAddress\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"pager\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n }\n ],\n \"workEligibility\": [\n {\n \"alienOrAdmissionDocumentNumber\": \"\",\n \"attestedDate\": \"\",\n \"countryOfIssuance\": \"\",\n \"foreignPassportNumber\": \"\",\n \"i94AdmissionNumber\": \"\",\n \"i9DateVerified\": \"\",\n \"i9Notes\": \"\",\n \"isI9Verified\": false,\n \"isSsnVerified\": false,\n \"ssnDateVerified\": \"\",\n \"ssnNotes\": \"\",\n \"visaType\": \"\",\n \"workAuthorization\": \"\",\n \"workUntil\": \"\"\n }\n ]\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/weblinkstaging/companies/:companyId/employees/newemployees"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"additionalDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"amount\": \"\",\n \"amountType\": \"\",\n \"isSkipPreNote\": false,\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"benefitSetup\": [\n {\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n }\n ],\n \"birthDate\": \"\",\n \"customBooleanFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": false\n }\n ],\n \"customDateFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customDropDownFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customNumberFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customTextFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"departmentPosition\": [\n {\n \"changeReason\": \"\",\n \"clockBadgeNumber\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"employeeType\": \"\",\n \"equalEmploymentOpportunityClass\": \"\",\n \"isMinimumWageExempt\": false,\n \"isOvertimeExempt\": false,\n \"isSupervisorReviewer\": false,\n \"isUnionDuesCollected\": false,\n \"isUnionInitiationCollected\": false,\n \"jobTitle\": \"\",\n \"payGroup\": \"\",\n \"positionCode\": \"\",\n \"shift\": \"\",\n \"supervisorCompanyNumber\": \"\",\n \"supervisorEmployeeId\": \"\",\n \"tipped\": \"\",\n \"unionAffiliationDate\": \"\",\n \"unionCode\": \"\",\n \"unionPosition\": \"\",\n \"workersCompensation\": \"\"\n }\n ],\n \"disabilityDescription\": \"\",\n \"employeeId\": \"\",\n \"ethnicity\": \"\",\n \"federalTax\": [\n {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"taxCalculationCode\": \"\",\n \"w4FormYear\": 0\n }\n ],\n \"firstName\": \"\",\n \"fitwExemptReason\": \"\",\n \"futaExemptReason\": \"\",\n \"gender\": \"\",\n \"homeAddress\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n }\n ],\n \"isEmployee943\": false,\n \"isSmoker\": false,\n \"lastName\": \"\",\n \"localTax\": [\n {\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n }\n ],\n \"mainDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"isSkipPreNote\": false,\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"maritalStatus\": \"\",\n \"medExemptReason\": \"\",\n \"middleName\": \"\",\n \"nonPrimaryStateTax\": [\n {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n }\n ],\n \"preferredName\": \"\",\n \"primaryPayRate\": [\n {\n \"baseRate\": \"\",\n \"changeReason\": \"\",\n \"defaultHours\": \"\",\n \"effectiveDate\": \"\",\n \"isAutoPay\": false,\n \"payFrequency\": \"\",\n \"payGrade\": \"\",\n \"payType\": \"\",\n \"ratePer\": \"\",\n \"salary\": \"\"\n }\n ],\n \"primaryStateTax\": [\n {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n }\n ],\n \"priorLastName\": \"\",\n \"salutation\": \"\",\n \"sitwExemptReason\": \"\",\n \"ssExemptReason\": \"\",\n \"ssn\": \"\",\n \"status\": [\n {\n \"adjustedSeniorityDate\": \"\",\n \"changeReason\": \"\",\n \"effectiveDate\": \"\",\n \"employeeStatus\": \"\",\n \"hireDate\": \"\",\n \"isEligibleForRehire\": false\n }\n ],\n \"suffix\": \"\",\n \"suiExemptReason\": \"\",\n \"suiState\": \"\",\n \"taxDistributionCode1099R\": \"\",\n \"taxForm\": \"\",\n \"veteranDescription\": \"\",\n \"webTime\": {\n \"badgeNumber\": \"\",\n \"chargeRate\": \"\",\n \"isTimeLaborEnabled\": false\n },\n \"workAddress\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"pager\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n }\n ],\n \"workEligibility\": [\n {\n \"alienOrAdmissionDocumentNumber\": \"\",\n \"attestedDate\": \"\",\n \"countryOfIssuance\": \"\",\n \"foreignPassportNumber\": \"\",\n \"i94AdmissionNumber\": \"\",\n \"i9DateVerified\": \"\",\n \"i9Notes\": \"\",\n \"isI9Verified\": false,\n \"isSsnVerified\": false,\n \"ssnDateVerified\": \"\",\n \"ssnNotes\": \"\",\n \"visaType\": \"\",\n \"workAuthorization\": \"\",\n \"workUntil\": \"\"\n }\n ]\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"additionalDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"amount\": \"\",\n \"amountType\": \"\",\n \"isSkipPreNote\": false,\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"benefitSetup\": [\n {\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n }\n ],\n \"birthDate\": \"\",\n \"customBooleanFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": false\n }\n ],\n \"customDateFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customDropDownFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customNumberFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customTextFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"departmentPosition\": [\n {\n \"changeReason\": \"\",\n \"clockBadgeNumber\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"employeeType\": \"\",\n \"equalEmploymentOpportunityClass\": \"\",\n \"isMinimumWageExempt\": false,\n \"isOvertimeExempt\": false,\n \"isSupervisorReviewer\": false,\n \"isUnionDuesCollected\": false,\n \"isUnionInitiationCollected\": false,\n \"jobTitle\": \"\",\n \"payGroup\": \"\",\n \"positionCode\": \"\",\n \"shift\": \"\",\n \"supervisorCompanyNumber\": \"\",\n \"supervisorEmployeeId\": \"\",\n \"tipped\": \"\",\n \"unionAffiliationDate\": \"\",\n \"unionCode\": \"\",\n \"unionPosition\": \"\",\n \"workersCompensation\": \"\"\n }\n ],\n \"disabilityDescription\": \"\",\n \"employeeId\": \"\",\n \"ethnicity\": \"\",\n \"federalTax\": [\n {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"taxCalculationCode\": \"\",\n \"w4FormYear\": 0\n }\n ],\n \"firstName\": \"\",\n \"fitwExemptReason\": \"\",\n \"futaExemptReason\": \"\",\n \"gender\": \"\",\n \"homeAddress\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n }\n ],\n \"isEmployee943\": false,\n \"isSmoker\": false,\n \"lastName\": \"\",\n \"localTax\": [\n {\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n }\n ],\n \"mainDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"isSkipPreNote\": false,\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"maritalStatus\": \"\",\n \"medExemptReason\": \"\",\n \"middleName\": \"\",\n \"nonPrimaryStateTax\": [\n {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n }\n ],\n \"preferredName\": \"\",\n \"primaryPayRate\": [\n {\n \"baseRate\": \"\",\n \"changeReason\": \"\",\n \"defaultHours\": \"\",\n \"effectiveDate\": \"\",\n \"isAutoPay\": false,\n \"payFrequency\": \"\",\n \"payGrade\": \"\",\n \"payType\": \"\",\n \"ratePer\": \"\",\n \"salary\": \"\"\n }\n ],\n \"primaryStateTax\": [\n {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n }\n ],\n \"priorLastName\": \"\",\n \"salutation\": \"\",\n \"sitwExemptReason\": \"\",\n \"ssExemptReason\": \"\",\n \"ssn\": \"\",\n \"status\": [\n {\n \"adjustedSeniorityDate\": \"\",\n \"changeReason\": \"\",\n \"effectiveDate\": \"\",\n \"employeeStatus\": \"\",\n \"hireDate\": \"\",\n \"isEligibleForRehire\": false\n }\n ],\n \"suffix\": \"\",\n \"suiExemptReason\": \"\",\n \"suiState\": \"\",\n \"taxDistributionCode1099R\": \"\",\n \"taxForm\": \"\",\n \"veteranDescription\": \"\",\n \"webTime\": {\n \"badgeNumber\": \"\",\n \"chargeRate\": \"\",\n \"isTimeLaborEnabled\": false\n },\n \"workAddress\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"pager\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n }\n ],\n \"workEligibility\": [\n {\n \"alienOrAdmissionDocumentNumber\": \"\",\n \"attestedDate\": \"\",\n \"countryOfIssuance\": \"\",\n \"foreignPassportNumber\": \"\",\n \"i94AdmissionNumber\": \"\",\n \"i9DateVerified\": \"\",\n \"i9Notes\": \"\",\n \"isI9Verified\": false,\n \"isSsnVerified\": false,\n \"ssnDateVerified\": \"\",\n \"ssnNotes\": \"\",\n \"visaType\": \"\",\n \"workAuthorization\": \"\",\n \"workUntil\": \"\"\n }\n ]\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/weblinkstaging/companies/:companyId/employees/newemployees")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v2/weblinkstaging/companies/:companyId/employees/newemployees")
.header("content-type", "application/json")
.body("{\n \"additionalDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"amount\": \"\",\n \"amountType\": \"\",\n \"isSkipPreNote\": false,\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"benefitSetup\": [\n {\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n }\n ],\n \"birthDate\": \"\",\n \"customBooleanFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": false\n }\n ],\n \"customDateFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customDropDownFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customNumberFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customTextFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"departmentPosition\": [\n {\n \"changeReason\": \"\",\n \"clockBadgeNumber\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"employeeType\": \"\",\n \"equalEmploymentOpportunityClass\": \"\",\n \"isMinimumWageExempt\": false,\n \"isOvertimeExempt\": false,\n \"isSupervisorReviewer\": false,\n \"isUnionDuesCollected\": false,\n \"isUnionInitiationCollected\": false,\n \"jobTitle\": \"\",\n \"payGroup\": \"\",\n \"positionCode\": \"\",\n \"shift\": \"\",\n \"supervisorCompanyNumber\": \"\",\n \"supervisorEmployeeId\": \"\",\n \"tipped\": \"\",\n \"unionAffiliationDate\": \"\",\n \"unionCode\": \"\",\n \"unionPosition\": \"\",\n \"workersCompensation\": \"\"\n }\n ],\n \"disabilityDescription\": \"\",\n \"employeeId\": \"\",\n \"ethnicity\": \"\",\n \"federalTax\": [\n {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"taxCalculationCode\": \"\",\n \"w4FormYear\": 0\n }\n ],\n \"firstName\": \"\",\n \"fitwExemptReason\": \"\",\n \"futaExemptReason\": \"\",\n \"gender\": \"\",\n \"homeAddress\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n }\n ],\n \"isEmployee943\": false,\n \"isSmoker\": false,\n \"lastName\": \"\",\n \"localTax\": [\n {\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n }\n ],\n \"mainDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"isSkipPreNote\": false,\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"maritalStatus\": \"\",\n \"medExemptReason\": \"\",\n \"middleName\": \"\",\n \"nonPrimaryStateTax\": [\n {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n }\n ],\n \"preferredName\": \"\",\n \"primaryPayRate\": [\n {\n \"baseRate\": \"\",\n \"changeReason\": \"\",\n \"defaultHours\": \"\",\n \"effectiveDate\": \"\",\n \"isAutoPay\": false,\n \"payFrequency\": \"\",\n \"payGrade\": \"\",\n \"payType\": \"\",\n \"ratePer\": \"\",\n \"salary\": \"\"\n }\n ],\n \"primaryStateTax\": [\n {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n }\n ],\n \"priorLastName\": \"\",\n \"salutation\": \"\",\n \"sitwExemptReason\": \"\",\n \"ssExemptReason\": \"\",\n \"ssn\": \"\",\n \"status\": [\n {\n \"adjustedSeniorityDate\": \"\",\n \"changeReason\": \"\",\n \"effectiveDate\": \"\",\n \"employeeStatus\": \"\",\n \"hireDate\": \"\",\n \"isEligibleForRehire\": false\n }\n ],\n \"suffix\": \"\",\n \"suiExemptReason\": \"\",\n \"suiState\": \"\",\n \"taxDistributionCode1099R\": \"\",\n \"taxForm\": \"\",\n \"veteranDescription\": \"\",\n \"webTime\": {\n \"badgeNumber\": \"\",\n \"chargeRate\": \"\",\n \"isTimeLaborEnabled\": false\n },\n \"workAddress\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"pager\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n }\n ],\n \"workEligibility\": [\n {\n \"alienOrAdmissionDocumentNumber\": \"\",\n \"attestedDate\": \"\",\n \"countryOfIssuance\": \"\",\n \"foreignPassportNumber\": \"\",\n \"i94AdmissionNumber\": \"\",\n \"i9DateVerified\": \"\",\n \"i9Notes\": \"\",\n \"isI9Verified\": false,\n \"isSsnVerified\": false,\n \"ssnDateVerified\": \"\",\n \"ssnNotes\": \"\",\n \"visaType\": \"\",\n \"workAuthorization\": \"\",\n \"workUntil\": \"\"\n }\n ]\n}")
.asString();
const data = JSON.stringify({
additionalDirectDeposit: [
{
accountNumber: '',
accountType: '',
amount: '',
amountType: '',
isSkipPreNote: false,
preNoteDate: '',
routingNumber: ''
}
],
benefitSetup: [
{
benefitClass: '',
benefitClassEffectiveDate: '',
benefitSalary: '',
benefitSalaryEffectiveDate: '',
doNotApplyAdministrativePeriod: false,
isMeasureAcaEligibility: false
}
],
birthDate: '',
customBooleanFields: [
{
category: '',
label: '',
value: false
}
],
customDateFields: [
{
category: '',
label: '',
value: ''
}
],
customDropDownFields: [
{
category: '',
label: '',
value: ''
}
],
customNumberFields: [
{
category: '',
label: '',
value: ''
}
],
customTextFields: [
{
category: '',
label: '',
value: ''
}
],
departmentPosition: [
{
changeReason: '',
clockBadgeNumber: '',
costCenter1: '',
costCenter2: '',
costCenter3: '',
effectiveDate: '',
employeeType: '',
equalEmploymentOpportunityClass: '',
isMinimumWageExempt: false,
isOvertimeExempt: false,
isSupervisorReviewer: false,
isUnionDuesCollected: false,
isUnionInitiationCollected: false,
jobTitle: '',
payGroup: '',
positionCode: '',
shift: '',
supervisorCompanyNumber: '',
supervisorEmployeeId: '',
tipped: '',
unionAffiliationDate: '',
unionCode: '',
unionPosition: '',
workersCompensation: ''
}
],
disabilityDescription: '',
employeeId: '',
ethnicity: '',
federalTax: [
{
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
taxCalculationCode: '',
w4FormYear: 0
}
],
firstName: '',
fitwExemptReason: '',
futaExemptReason: '',
gender: '',
homeAddress: [
{
address1: '',
address2: '',
city: '',
country: '',
county: '',
emailAddress: '',
mobilePhone: '',
phone: '',
postalCode: '',
state: ''
}
],
isEmployee943: false,
isSmoker: false,
lastName: '',
localTax: [
{
exemptions: '',
exemptions2: '',
filingStatus: '',
residentPSD: '',
taxCode: '',
workPSD: ''
}
],
mainDirectDeposit: [
{
accountNumber: '',
accountType: '',
isSkipPreNote: false,
preNoteDate: '',
routingNumber: ''
}
],
maritalStatus: '',
medExemptReason: '',
middleName: '',
nonPrimaryStateTax: [
{
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
exemptions2: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
reciprocityCode: '',
specialCheckCalc: '',
taxCalculationCode: '',
taxCode: '',
w4FormYear: 0
}
],
preferredName: '',
primaryPayRate: [
{
baseRate: '',
changeReason: '',
defaultHours: '',
effectiveDate: '',
isAutoPay: false,
payFrequency: '',
payGrade: '',
payType: '',
ratePer: '',
salary: ''
}
],
primaryStateTax: [
{
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
exemptions2: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
specialCheckCalc: '',
taxCalculationCode: '',
taxCode: '',
w4FormYear: 0
}
],
priorLastName: '',
salutation: '',
sitwExemptReason: '',
ssExemptReason: '',
ssn: '',
status: [
{
adjustedSeniorityDate: '',
changeReason: '',
effectiveDate: '',
employeeStatus: '',
hireDate: '',
isEligibleForRehire: false
}
],
suffix: '',
suiExemptReason: '',
suiState: '',
taxDistributionCode1099R: '',
taxForm: '',
veteranDescription: '',
webTime: {
badgeNumber: '',
chargeRate: '',
isTimeLaborEnabled: false
},
workAddress: [
{
address1: '',
address2: '',
city: '',
country: '',
county: '',
emailAddress: '',
mobilePhone: '',
pager: '',
phone: '',
phoneExtension: '',
postalCode: '',
state: ''
}
],
workEligibility: [
{
alienOrAdmissionDocumentNumber: '',
attestedDate: '',
countryOfIssuance: '',
foreignPassportNumber: '',
i94AdmissionNumber: '',
i9DateVerified: '',
i9Notes: '',
isI9Verified: false,
isSsnVerified: false,
ssnDateVerified: '',
ssnNotes: '',
visaType: '',
workAuthorization: '',
workUntil: ''
}
]
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v2/weblinkstaging/companies/:companyId/employees/newemployees');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/weblinkstaging/companies/:companyId/employees/newemployees',
headers: {'content-type': 'application/json'},
data: {
additionalDirectDeposit: [
{
accountNumber: '',
accountType: '',
amount: '',
amountType: '',
isSkipPreNote: false,
preNoteDate: '',
routingNumber: ''
}
],
benefitSetup: [
{
benefitClass: '',
benefitClassEffectiveDate: '',
benefitSalary: '',
benefitSalaryEffectiveDate: '',
doNotApplyAdministrativePeriod: false,
isMeasureAcaEligibility: false
}
],
birthDate: '',
customBooleanFields: [{category: '', label: '', value: false}],
customDateFields: [{category: '', label: '', value: ''}],
customDropDownFields: [{category: '', label: '', value: ''}],
customNumberFields: [{category: '', label: '', value: ''}],
customTextFields: [{category: '', label: '', value: ''}],
departmentPosition: [
{
changeReason: '',
clockBadgeNumber: '',
costCenter1: '',
costCenter2: '',
costCenter3: '',
effectiveDate: '',
employeeType: '',
equalEmploymentOpportunityClass: '',
isMinimumWageExempt: false,
isOvertimeExempt: false,
isSupervisorReviewer: false,
isUnionDuesCollected: false,
isUnionInitiationCollected: false,
jobTitle: '',
payGroup: '',
positionCode: '',
shift: '',
supervisorCompanyNumber: '',
supervisorEmployeeId: '',
tipped: '',
unionAffiliationDate: '',
unionCode: '',
unionPosition: '',
workersCompensation: ''
}
],
disabilityDescription: '',
employeeId: '',
ethnicity: '',
federalTax: [
{
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
taxCalculationCode: '',
w4FormYear: 0
}
],
firstName: '',
fitwExemptReason: '',
futaExemptReason: '',
gender: '',
homeAddress: [
{
address1: '',
address2: '',
city: '',
country: '',
county: '',
emailAddress: '',
mobilePhone: '',
phone: '',
postalCode: '',
state: ''
}
],
isEmployee943: false,
isSmoker: false,
lastName: '',
localTax: [
{
exemptions: '',
exemptions2: '',
filingStatus: '',
residentPSD: '',
taxCode: '',
workPSD: ''
}
],
mainDirectDeposit: [
{
accountNumber: '',
accountType: '',
isSkipPreNote: false,
preNoteDate: '',
routingNumber: ''
}
],
maritalStatus: '',
medExemptReason: '',
middleName: '',
nonPrimaryStateTax: [
{
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
exemptions2: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
reciprocityCode: '',
specialCheckCalc: '',
taxCalculationCode: '',
taxCode: '',
w4FormYear: 0
}
],
preferredName: '',
primaryPayRate: [
{
baseRate: '',
changeReason: '',
defaultHours: '',
effectiveDate: '',
isAutoPay: false,
payFrequency: '',
payGrade: '',
payType: '',
ratePer: '',
salary: ''
}
],
primaryStateTax: [
{
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
exemptions2: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
specialCheckCalc: '',
taxCalculationCode: '',
taxCode: '',
w4FormYear: 0
}
],
priorLastName: '',
salutation: '',
sitwExemptReason: '',
ssExemptReason: '',
ssn: '',
status: [
{
adjustedSeniorityDate: '',
changeReason: '',
effectiveDate: '',
employeeStatus: '',
hireDate: '',
isEligibleForRehire: false
}
],
suffix: '',
suiExemptReason: '',
suiState: '',
taxDistributionCode1099R: '',
taxForm: '',
veteranDescription: '',
webTime: {badgeNumber: '', chargeRate: '', isTimeLaborEnabled: false},
workAddress: [
{
address1: '',
address2: '',
city: '',
country: '',
county: '',
emailAddress: '',
mobilePhone: '',
pager: '',
phone: '',
phoneExtension: '',
postalCode: '',
state: ''
}
],
workEligibility: [
{
alienOrAdmissionDocumentNumber: '',
attestedDate: '',
countryOfIssuance: '',
foreignPassportNumber: '',
i94AdmissionNumber: '',
i9DateVerified: '',
i9Notes: '',
isI9Verified: false,
isSsnVerified: false,
ssnDateVerified: '',
ssnNotes: '',
visaType: '',
workAuthorization: '',
workUntil: ''
}
]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/weblinkstaging/companies/:companyId/employees/newemployees';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"additionalDirectDeposit":[{"accountNumber":"","accountType":"","amount":"","amountType":"","isSkipPreNote":false,"preNoteDate":"","routingNumber":""}],"benefitSetup":[{"benefitClass":"","benefitClassEffectiveDate":"","benefitSalary":"","benefitSalaryEffectiveDate":"","doNotApplyAdministrativePeriod":false,"isMeasureAcaEligibility":false}],"birthDate":"","customBooleanFields":[{"category":"","label":"","value":false}],"customDateFields":[{"category":"","label":"","value":""}],"customDropDownFields":[{"category":"","label":"","value":""}],"customNumberFields":[{"category":"","label":"","value":""}],"customTextFields":[{"category":"","label":"","value":""}],"departmentPosition":[{"changeReason":"","clockBadgeNumber":"","costCenter1":"","costCenter2":"","costCenter3":"","effectiveDate":"","employeeType":"","equalEmploymentOpportunityClass":"","isMinimumWageExempt":false,"isOvertimeExempt":false,"isSupervisorReviewer":false,"isUnionDuesCollected":false,"isUnionInitiationCollected":false,"jobTitle":"","payGroup":"","positionCode":"","shift":"","supervisorCompanyNumber":"","supervisorEmployeeId":"","tipped":"","unionAffiliationDate":"","unionCode":"","unionPosition":"","workersCompensation":""}],"disabilityDescription":"","employeeId":"","ethnicity":"","federalTax":[{"amount":"","deductionsAmount":"","dependentsAmount":"","exemptions":"","filingStatus":"","higherRate":false,"otherIncomeAmount":"","percentage":"","taxCalculationCode":"","w4FormYear":0}],"firstName":"","fitwExemptReason":"","futaExemptReason":"","gender":"","homeAddress":[{"address1":"","address2":"","city":"","country":"","county":"","emailAddress":"","mobilePhone":"","phone":"","postalCode":"","state":""}],"isEmployee943":false,"isSmoker":false,"lastName":"","localTax":[{"exemptions":"","exemptions2":"","filingStatus":"","residentPSD":"","taxCode":"","workPSD":""}],"mainDirectDeposit":[{"accountNumber":"","accountType":"","isSkipPreNote":false,"preNoteDate":"","routingNumber":""}],"maritalStatus":"","medExemptReason":"","middleName":"","nonPrimaryStateTax":[{"amount":"","deductionsAmount":"","dependentsAmount":"","exemptions":"","exemptions2":"","filingStatus":"","higherRate":false,"otherIncomeAmount":"","percentage":"","reciprocityCode":"","specialCheckCalc":"","taxCalculationCode":"","taxCode":"","w4FormYear":0}],"preferredName":"","primaryPayRate":[{"baseRate":"","changeReason":"","defaultHours":"","effectiveDate":"","isAutoPay":false,"payFrequency":"","payGrade":"","payType":"","ratePer":"","salary":""}],"primaryStateTax":[{"amount":"","deductionsAmount":"","dependentsAmount":"","exemptions":"","exemptions2":"","filingStatus":"","higherRate":false,"otherIncomeAmount":"","percentage":"","specialCheckCalc":"","taxCalculationCode":"","taxCode":"","w4FormYear":0}],"priorLastName":"","salutation":"","sitwExemptReason":"","ssExemptReason":"","ssn":"","status":[{"adjustedSeniorityDate":"","changeReason":"","effectiveDate":"","employeeStatus":"","hireDate":"","isEligibleForRehire":false}],"suffix":"","suiExemptReason":"","suiState":"","taxDistributionCode1099R":"","taxForm":"","veteranDescription":"","webTime":{"badgeNumber":"","chargeRate":"","isTimeLaborEnabled":false},"workAddress":[{"address1":"","address2":"","city":"","country":"","county":"","emailAddress":"","mobilePhone":"","pager":"","phone":"","phoneExtension":"","postalCode":"","state":""}],"workEligibility":[{"alienOrAdmissionDocumentNumber":"","attestedDate":"","countryOfIssuance":"","foreignPassportNumber":"","i94AdmissionNumber":"","i9DateVerified":"","i9Notes":"","isI9Verified":false,"isSsnVerified":false,"ssnDateVerified":"","ssnNotes":"","visaType":"","workAuthorization":"","workUntil":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/weblinkstaging/companies/:companyId/employees/newemployees',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "additionalDirectDeposit": [\n {\n "accountNumber": "",\n "accountType": "",\n "amount": "",\n "amountType": "",\n "isSkipPreNote": false,\n "preNoteDate": "",\n "routingNumber": ""\n }\n ],\n "benefitSetup": [\n {\n "benefitClass": "",\n "benefitClassEffectiveDate": "",\n "benefitSalary": "",\n "benefitSalaryEffectiveDate": "",\n "doNotApplyAdministrativePeriod": false,\n "isMeasureAcaEligibility": false\n }\n ],\n "birthDate": "",\n "customBooleanFields": [\n {\n "category": "",\n "label": "",\n "value": false\n }\n ],\n "customDateFields": [\n {\n "category": "",\n "label": "",\n "value": ""\n }\n ],\n "customDropDownFields": [\n {\n "category": "",\n "label": "",\n "value": ""\n }\n ],\n "customNumberFields": [\n {\n "category": "",\n "label": "",\n "value": ""\n }\n ],\n "customTextFields": [\n {\n "category": "",\n "label": "",\n "value": ""\n }\n ],\n "departmentPosition": [\n {\n "changeReason": "",\n "clockBadgeNumber": "",\n "costCenter1": "",\n "costCenter2": "",\n "costCenter3": "",\n "effectiveDate": "",\n "employeeType": "",\n "equalEmploymentOpportunityClass": "",\n "isMinimumWageExempt": false,\n "isOvertimeExempt": false,\n "isSupervisorReviewer": false,\n "isUnionDuesCollected": false,\n "isUnionInitiationCollected": false,\n "jobTitle": "",\n "payGroup": "",\n "positionCode": "",\n "shift": "",\n "supervisorCompanyNumber": "",\n "supervisorEmployeeId": "",\n "tipped": "",\n "unionAffiliationDate": "",\n "unionCode": "",\n "unionPosition": "",\n "workersCompensation": ""\n }\n ],\n "disabilityDescription": "",\n "employeeId": "",\n "ethnicity": "",\n "federalTax": [\n {\n "amount": "",\n "deductionsAmount": "",\n "dependentsAmount": "",\n "exemptions": "",\n "filingStatus": "",\n "higherRate": false,\n "otherIncomeAmount": "",\n "percentage": "",\n "taxCalculationCode": "",\n "w4FormYear": 0\n }\n ],\n "firstName": "",\n "fitwExemptReason": "",\n "futaExemptReason": "",\n "gender": "",\n "homeAddress": [\n {\n "address1": "",\n "address2": "",\n "city": "",\n "country": "",\n "county": "",\n "emailAddress": "",\n "mobilePhone": "",\n "phone": "",\n "postalCode": "",\n "state": ""\n }\n ],\n "isEmployee943": false,\n "isSmoker": false,\n "lastName": "",\n "localTax": [\n {\n "exemptions": "",\n "exemptions2": "",\n "filingStatus": "",\n "residentPSD": "",\n "taxCode": "",\n "workPSD": ""\n }\n ],\n "mainDirectDeposit": [\n {\n "accountNumber": "",\n "accountType": "",\n "isSkipPreNote": false,\n "preNoteDate": "",\n "routingNumber": ""\n }\n ],\n "maritalStatus": "",\n "medExemptReason": "",\n "middleName": "",\n "nonPrimaryStateTax": [\n {\n "amount": "",\n "deductionsAmount": "",\n "dependentsAmount": "",\n "exemptions": "",\n "exemptions2": "",\n "filingStatus": "",\n "higherRate": false,\n "otherIncomeAmount": "",\n "percentage": "",\n "reciprocityCode": "",\n "specialCheckCalc": "",\n "taxCalculationCode": "",\n "taxCode": "",\n "w4FormYear": 0\n }\n ],\n "preferredName": "",\n "primaryPayRate": [\n {\n "baseRate": "",\n "changeReason": "",\n "defaultHours": "",\n "effectiveDate": "",\n "isAutoPay": false,\n "payFrequency": "",\n "payGrade": "",\n "payType": "",\n "ratePer": "",\n "salary": ""\n }\n ],\n "primaryStateTax": [\n {\n "amount": "",\n "deductionsAmount": "",\n "dependentsAmount": "",\n "exemptions": "",\n "exemptions2": "",\n "filingStatus": "",\n "higherRate": false,\n "otherIncomeAmount": "",\n "percentage": "",\n "specialCheckCalc": "",\n "taxCalculationCode": "",\n "taxCode": "",\n "w4FormYear": 0\n }\n ],\n "priorLastName": "",\n "salutation": "",\n "sitwExemptReason": "",\n "ssExemptReason": "",\n "ssn": "",\n "status": [\n {\n "adjustedSeniorityDate": "",\n "changeReason": "",\n "effectiveDate": "",\n "employeeStatus": "",\n "hireDate": "",\n "isEligibleForRehire": false\n }\n ],\n "suffix": "",\n "suiExemptReason": "",\n "suiState": "",\n "taxDistributionCode1099R": "",\n "taxForm": "",\n "veteranDescription": "",\n "webTime": {\n "badgeNumber": "",\n "chargeRate": "",\n "isTimeLaborEnabled": false\n },\n "workAddress": [\n {\n "address1": "",\n "address2": "",\n "city": "",\n "country": "",\n "county": "",\n "emailAddress": "",\n "mobilePhone": "",\n "pager": "",\n "phone": "",\n "phoneExtension": "",\n "postalCode": "",\n "state": ""\n }\n ],\n "workEligibility": [\n {\n "alienOrAdmissionDocumentNumber": "",\n "attestedDate": "",\n "countryOfIssuance": "",\n "foreignPassportNumber": "",\n "i94AdmissionNumber": "",\n "i9DateVerified": "",\n "i9Notes": "",\n "isI9Verified": false,\n "isSsnVerified": false,\n "ssnDateVerified": "",\n "ssnNotes": "",\n "visaType": "",\n "workAuthorization": "",\n "workUntil": ""\n }\n ]\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"additionalDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"amount\": \"\",\n \"amountType\": \"\",\n \"isSkipPreNote\": false,\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"benefitSetup\": [\n {\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n }\n ],\n \"birthDate\": \"\",\n \"customBooleanFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": false\n }\n ],\n \"customDateFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customDropDownFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customNumberFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customTextFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"departmentPosition\": [\n {\n \"changeReason\": \"\",\n \"clockBadgeNumber\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"employeeType\": \"\",\n \"equalEmploymentOpportunityClass\": \"\",\n \"isMinimumWageExempt\": false,\n \"isOvertimeExempt\": false,\n \"isSupervisorReviewer\": false,\n \"isUnionDuesCollected\": false,\n \"isUnionInitiationCollected\": false,\n \"jobTitle\": \"\",\n \"payGroup\": \"\",\n \"positionCode\": \"\",\n \"shift\": \"\",\n \"supervisorCompanyNumber\": \"\",\n \"supervisorEmployeeId\": \"\",\n \"tipped\": \"\",\n \"unionAffiliationDate\": \"\",\n \"unionCode\": \"\",\n \"unionPosition\": \"\",\n \"workersCompensation\": \"\"\n }\n ],\n \"disabilityDescription\": \"\",\n \"employeeId\": \"\",\n \"ethnicity\": \"\",\n \"federalTax\": [\n {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"taxCalculationCode\": \"\",\n \"w4FormYear\": 0\n }\n ],\n \"firstName\": \"\",\n \"fitwExemptReason\": \"\",\n \"futaExemptReason\": \"\",\n \"gender\": \"\",\n \"homeAddress\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n }\n ],\n \"isEmployee943\": false,\n \"isSmoker\": false,\n \"lastName\": \"\",\n \"localTax\": [\n {\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n }\n ],\n \"mainDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"isSkipPreNote\": false,\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"maritalStatus\": \"\",\n \"medExemptReason\": \"\",\n \"middleName\": \"\",\n \"nonPrimaryStateTax\": [\n {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n }\n ],\n \"preferredName\": \"\",\n \"primaryPayRate\": [\n {\n \"baseRate\": \"\",\n \"changeReason\": \"\",\n \"defaultHours\": \"\",\n \"effectiveDate\": \"\",\n \"isAutoPay\": false,\n \"payFrequency\": \"\",\n \"payGrade\": \"\",\n \"payType\": \"\",\n \"ratePer\": \"\",\n \"salary\": \"\"\n }\n ],\n \"primaryStateTax\": [\n {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n }\n ],\n \"priorLastName\": \"\",\n \"salutation\": \"\",\n \"sitwExemptReason\": \"\",\n \"ssExemptReason\": \"\",\n \"ssn\": \"\",\n \"status\": [\n {\n \"adjustedSeniorityDate\": \"\",\n \"changeReason\": \"\",\n \"effectiveDate\": \"\",\n \"employeeStatus\": \"\",\n \"hireDate\": \"\",\n \"isEligibleForRehire\": false\n }\n ],\n \"suffix\": \"\",\n \"suiExemptReason\": \"\",\n \"suiState\": \"\",\n \"taxDistributionCode1099R\": \"\",\n \"taxForm\": \"\",\n \"veteranDescription\": \"\",\n \"webTime\": {\n \"badgeNumber\": \"\",\n \"chargeRate\": \"\",\n \"isTimeLaborEnabled\": false\n },\n \"workAddress\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"pager\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n }\n ],\n \"workEligibility\": [\n {\n \"alienOrAdmissionDocumentNumber\": \"\",\n \"attestedDate\": \"\",\n \"countryOfIssuance\": \"\",\n \"foreignPassportNumber\": \"\",\n \"i94AdmissionNumber\": \"\",\n \"i9DateVerified\": \"\",\n \"i9Notes\": \"\",\n \"isI9Verified\": false,\n \"isSsnVerified\": false,\n \"ssnDateVerified\": \"\",\n \"ssnNotes\": \"\",\n \"visaType\": \"\",\n \"workAuthorization\": \"\",\n \"workUntil\": \"\"\n }\n ]\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v2/weblinkstaging/companies/:companyId/employees/newemployees")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/weblinkstaging/companies/:companyId/employees/newemployees',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
additionalDirectDeposit: [
{
accountNumber: '',
accountType: '',
amount: '',
amountType: '',
isSkipPreNote: false,
preNoteDate: '',
routingNumber: ''
}
],
benefitSetup: [
{
benefitClass: '',
benefitClassEffectiveDate: '',
benefitSalary: '',
benefitSalaryEffectiveDate: '',
doNotApplyAdministrativePeriod: false,
isMeasureAcaEligibility: false
}
],
birthDate: '',
customBooleanFields: [{category: '', label: '', value: false}],
customDateFields: [{category: '', label: '', value: ''}],
customDropDownFields: [{category: '', label: '', value: ''}],
customNumberFields: [{category: '', label: '', value: ''}],
customTextFields: [{category: '', label: '', value: ''}],
departmentPosition: [
{
changeReason: '',
clockBadgeNumber: '',
costCenter1: '',
costCenter2: '',
costCenter3: '',
effectiveDate: '',
employeeType: '',
equalEmploymentOpportunityClass: '',
isMinimumWageExempt: false,
isOvertimeExempt: false,
isSupervisorReviewer: false,
isUnionDuesCollected: false,
isUnionInitiationCollected: false,
jobTitle: '',
payGroup: '',
positionCode: '',
shift: '',
supervisorCompanyNumber: '',
supervisorEmployeeId: '',
tipped: '',
unionAffiliationDate: '',
unionCode: '',
unionPosition: '',
workersCompensation: ''
}
],
disabilityDescription: '',
employeeId: '',
ethnicity: '',
federalTax: [
{
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
taxCalculationCode: '',
w4FormYear: 0
}
],
firstName: '',
fitwExemptReason: '',
futaExemptReason: '',
gender: '',
homeAddress: [
{
address1: '',
address2: '',
city: '',
country: '',
county: '',
emailAddress: '',
mobilePhone: '',
phone: '',
postalCode: '',
state: ''
}
],
isEmployee943: false,
isSmoker: false,
lastName: '',
localTax: [
{
exemptions: '',
exemptions2: '',
filingStatus: '',
residentPSD: '',
taxCode: '',
workPSD: ''
}
],
mainDirectDeposit: [
{
accountNumber: '',
accountType: '',
isSkipPreNote: false,
preNoteDate: '',
routingNumber: ''
}
],
maritalStatus: '',
medExemptReason: '',
middleName: '',
nonPrimaryStateTax: [
{
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
exemptions2: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
reciprocityCode: '',
specialCheckCalc: '',
taxCalculationCode: '',
taxCode: '',
w4FormYear: 0
}
],
preferredName: '',
primaryPayRate: [
{
baseRate: '',
changeReason: '',
defaultHours: '',
effectiveDate: '',
isAutoPay: false,
payFrequency: '',
payGrade: '',
payType: '',
ratePer: '',
salary: ''
}
],
primaryStateTax: [
{
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
exemptions2: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
specialCheckCalc: '',
taxCalculationCode: '',
taxCode: '',
w4FormYear: 0
}
],
priorLastName: '',
salutation: '',
sitwExemptReason: '',
ssExemptReason: '',
ssn: '',
status: [
{
adjustedSeniorityDate: '',
changeReason: '',
effectiveDate: '',
employeeStatus: '',
hireDate: '',
isEligibleForRehire: false
}
],
suffix: '',
suiExemptReason: '',
suiState: '',
taxDistributionCode1099R: '',
taxForm: '',
veteranDescription: '',
webTime: {badgeNumber: '', chargeRate: '', isTimeLaborEnabled: false},
workAddress: [
{
address1: '',
address2: '',
city: '',
country: '',
county: '',
emailAddress: '',
mobilePhone: '',
pager: '',
phone: '',
phoneExtension: '',
postalCode: '',
state: ''
}
],
workEligibility: [
{
alienOrAdmissionDocumentNumber: '',
attestedDate: '',
countryOfIssuance: '',
foreignPassportNumber: '',
i94AdmissionNumber: '',
i9DateVerified: '',
i9Notes: '',
isI9Verified: false,
isSsnVerified: false,
ssnDateVerified: '',
ssnNotes: '',
visaType: '',
workAuthorization: '',
workUntil: ''
}
]
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/weblinkstaging/companies/:companyId/employees/newemployees',
headers: {'content-type': 'application/json'},
body: {
additionalDirectDeposit: [
{
accountNumber: '',
accountType: '',
amount: '',
amountType: '',
isSkipPreNote: false,
preNoteDate: '',
routingNumber: ''
}
],
benefitSetup: [
{
benefitClass: '',
benefitClassEffectiveDate: '',
benefitSalary: '',
benefitSalaryEffectiveDate: '',
doNotApplyAdministrativePeriod: false,
isMeasureAcaEligibility: false
}
],
birthDate: '',
customBooleanFields: [{category: '', label: '', value: false}],
customDateFields: [{category: '', label: '', value: ''}],
customDropDownFields: [{category: '', label: '', value: ''}],
customNumberFields: [{category: '', label: '', value: ''}],
customTextFields: [{category: '', label: '', value: ''}],
departmentPosition: [
{
changeReason: '',
clockBadgeNumber: '',
costCenter1: '',
costCenter2: '',
costCenter3: '',
effectiveDate: '',
employeeType: '',
equalEmploymentOpportunityClass: '',
isMinimumWageExempt: false,
isOvertimeExempt: false,
isSupervisorReviewer: false,
isUnionDuesCollected: false,
isUnionInitiationCollected: false,
jobTitle: '',
payGroup: '',
positionCode: '',
shift: '',
supervisorCompanyNumber: '',
supervisorEmployeeId: '',
tipped: '',
unionAffiliationDate: '',
unionCode: '',
unionPosition: '',
workersCompensation: ''
}
],
disabilityDescription: '',
employeeId: '',
ethnicity: '',
federalTax: [
{
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
taxCalculationCode: '',
w4FormYear: 0
}
],
firstName: '',
fitwExemptReason: '',
futaExemptReason: '',
gender: '',
homeAddress: [
{
address1: '',
address2: '',
city: '',
country: '',
county: '',
emailAddress: '',
mobilePhone: '',
phone: '',
postalCode: '',
state: ''
}
],
isEmployee943: false,
isSmoker: false,
lastName: '',
localTax: [
{
exemptions: '',
exemptions2: '',
filingStatus: '',
residentPSD: '',
taxCode: '',
workPSD: ''
}
],
mainDirectDeposit: [
{
accountNumber: '',
accountType: '',
isSkipPreNote: false,
preNoteDate: '',
routingNumber: ''
}
],
maritalStatus: '',
medExemptReason: '',
middleName: '',
nonPrimaryStateTax: [
{
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
exemptions2: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
reciprocityCode: '',
specialCheckCalc: '',
taxCalculationCode: '',
taxCode: '',
w4FormYear: 0
}
],
preferredName: '',
primaryPayRate: [
{
baseRate: '',
changeReason: '',
defaultHours: '',
effectiveDate: '',
isAutoPay: false,
payFrequency: '',
payGrade: '',
payType: '',
ratePer: '',
salary: ''
}
],
primaryStateTax: [
{
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
exemptions2: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
specialCheckCalc: '',
taxCalculationCode: '',
taxCode: '',
w4FormYear: 0
}
],
priorLastName: '',
salutation: '',
sitwExemptReason: '',
ssExemptReason: '',
ssn: '',
status: [
{
adjustedSeniorityDate: '',
changeReason: '',
effectiveDate: '',
employeeStatus: '',
hireDate: '',
isEligibleForRehire: false
}
],
suffix: '',
suiExemptReason: '',
suiState: '',
taxDistributionCode1099R: '',
taxForm: '',
veteranDescription: '',
webTime: {badgeNumber: '', chargeRate: '', isTimeLaborEnabled: false},
workAddress: [
{
address1: '',
address2: '',
city: '',
country: '',
county: '',
emailAddress: '',
mobilePhone: '',
pager: '',
phone: '',
phoneExtension: '',
postalCode: '',
state: ''
}
],
workEligibility: [
{
alienOrAdmissionDocumentNumber: '',
attestedDate: '',
countryOfIssuance: '',
foreignPassportNumber: '',
i94AdmissionNumber: '',
i9DateVerified: '',
i9Notes: '',
isI9Verified: false,
isSsnVerified: false,
ssnDateVerified: '',
ssnNotes: '',
visaType: '',
workAuthorization: '',
workUntil: ''
}
]
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v2/weblinkstaging/companies/:companyId/employees/newemployees');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
additionalDirectDeposit: [
{
accountNumber: '',
accountType: '',
amount: '',
amountType: '',
isSkipPreNote: false,
preNoteDate: '',
routingNumber: ''
}
],
benefitSetup: [
{
benefitClass: '',
benefitClassEffectiveDate: '',
benefitSalary: '',
benefitSalaryEffectiveDate: '',
doNotApplyAdministrativePeriod: false,
isMeasureAcaEligibility: false
}
],
birthDate: '',
customBooleanFields: [
{
category: '',
label: '',
value: false
}
],
customDateFields: [
{
category: '',
label: '',
value: ''
}
],
customDropDownFields: [
{
category: '',
label: '',
value: ''
}
],
customNumberFields: [
{
category: '',
label: '',
value: ''
}
],
customTextFields: [
{
category: '',
label: '',
value: ''
}
],
departmentPosition: [
{
changeReason: '',
clockBadgeNumber: '',
costCenter1: '',
costCenter2: '',
costCenter3: '',
effectiveDate: '',
employeeType: '',
equalEmploymentOpportunityClass: '',
isMinimumWageExempt: false,
isOvertimeExempt: false,
isSupervisorReviewer: false,
isUnionDuesCollected: false,
isUnionInitiationCollected: false,
jobTitle: '',
payGroup: '',
positionCode: '',
shift: '',
supervisorCompanyNumber: '',
supervisorEmployeeId: '',
tipped: '',
unionAffiliationDate: '',
unionCode: '',
unionPosition: '',
workersCompensation: ''
}
],
disabilityDescription: '',
employeeId: '',
ethnicity: '',
federalTax: [
{
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
taxCalculationCode: '',
w4FormYear: 0
}
],
firstName: '',
fitwExemptReason: '',
futaExemptReason: '',
gender: '',
homeAddress: [
{
address1: '',
address2: '',
city: '',
country: '',
county: '',
emailAddress: '',
mobilePhone: '',
phone: '',
postalCode: '',
state: ''
}
],
isEmployee943: false,
isSmoker: false,
lastName: '',
localTax: [
{
exemptions: '',
exemptions2: '',
filingStatus: '',
residentPSD: '',
taxCode: '',
workPSD: ''
}
],
mainDirectDeposit: [
{
accountNumber: '',
accountType: '',
isSkipPreNote: false,
preNoteDate: '',
routingNumber: ''
}
],
maritalStatus: '',
medExemptReason: '',
middleName: '',
nonPrimaryStateTax: [
{
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
exemptions2: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
reciprocityCode: '',
specialCheckCalc: '',
taxCalculationCode: '',
taxCode: '',
w4FormYear: 0
}
],
preferredName: '',
primaryPayRate: [
{
baseRate: '',
changeReason: '',
defaultHours: '',
effectiveDate: '',
isAutoPay: false,
payFrequency: '',
payGrade: '',
payType: '',
ratePer: '',
salary: ''
}
],
primaryStateTax: [
{
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
exemptions2: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
specialCheckCalc: '',
taxCalculationCode: '',
taxCode: '',
w4FormYear: 0
}
],
priorLastName: '',
salutation: '',
sitwExemptReason: '',
ssExemptReason: '',
ssn: '',
status: [
{
adjustedSeniorityDate: '',
changeReason: '',
effectiveDate: '',
employeeStatus: '',
hireDate: '',
isEligibleForRehire: false
}
],
suffix: '',
suiExemptReason: '',
suiState: '',
taxDistributionCode1099R: '',
taxForm: '',
veteranDescription: '',
webTime: {
badgeNumber: '',
chargeRate: '',
isTimeLaborEnabled: false
},
workAddress: [
{
address1: '',
address2: '',
city: '',
country: '',
county: '',
emailAddress: '',
mobilePhone: '',
pager: '',
phone: '',
phoneExtension: '',
postalCode: '',
state: ''
}
],
workEligibility: [
{
alienOrAdmissionDocumentNumber: '',
attestedDate: '',
countryOfIssuance: '',
foreignPassportNumber: '',
i94AdmissionNumber: '',
i9DateVerified: '',
i9Notes: '',
isI9Verified: false,
isSsnVerified: false,
ssnDateVerified: '',
ssnNotes: '',
visaType: '',
workAuthorization: '',
workUntil: ''
}
]
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/weblinkstaging/companies/:companyId/employees/newemployees',
headers: {'content-type': 'application/json'},
data: {
additionalDirectDeposit: [
{
accountNumber: '',
accountType: '',
amount: '',
amountType: '',
isSkipPreNote: false,
preNoteDate: '',
routingNumber: ''
}
],
benefitSetup: [
{
benefitClass: '',
benefitClassEffectiveDate: '',
benefitSalary: '',
benefitSalaryEffectiveDate: '',
doNotApplyAdministrativePeriod: false,
isMeasureAcaEligibility: false
}
],
birthDate: '',
customBooleanFields: [{category: '', label: '', value: false}],
customDateFields: [{category: '', label: '', value: ''}],
customDropDownFields: [{category: '', label: '', value: ''}],
customNumberFields: [{category: '', label: '', value: ''}],
customTextFields: [{category: '', label: '', value: ''}],
departmentPosition: [
{
changeReason: '',
clockBadgeNumber: '',
costCenter1: '',
costCenter2: '',
costCenter3: '',
effectiveDate: '',
employeeType: '',
equalEmploymentOpportunityClass: '',
isMinimumWageExempt: false,
isOvertimeExempt: false,
isSupervisorReviewer: false,
isUnionDuesCollected: false,
isUnionInitiationCollected: false,
jobTitle: '',
payGroup: '',
positionCode: '',
shift: '',
supervisorCompanyNumber: '',
supervisorEmployeeId: '',
tipped: '',
unionAffiliationDate: '',
unionCode: '',
unionPosition: '',
workersCompensation: ''
}
],
disabilityDescription: '',
employeeId: '',
ethnicity: '',
federalTax: [
{
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
taxCalculationCode: '',
w4FormYear: 0
}
],
firstName: '',
fitwExemptReason: '',
futaExemptReason: '',
gender: '',
homeAddress: [
{
address1: '',
address2: '',
city: '',
country: '',
county: '',
emailAddress: '',
mobilePhone: '',
phone: '',
postalCode: '',
state: ''
}
],
isEmployee943: false,
isSmoker: false,
lastName: '',
localTax: [
{
exemptions: '',
exemptions2: '',
filingStatus: '',
residentPSD: '',
taxCode: '',
workPSD: ''
}
],
mainDirectDeposit: [
{
accountNumber: '',
accountType: '',
isSkipPreNote: false,
preNoteDate: '',
routingNumber: ''
}
],
maritalStatus: '',
medExemptReason: '',
middleName: '',
nonPrimaryStateTax: [
{
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
exemptions2: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
reciprocityCode: '',
specialCheckCalc: '',
taxCalculationCode: '',
taxCode: '',
w4FormYear: 0
}
],
preferredName: '',
primaryPayRate: [
{
baseRate: '',
changeReason: '',
defaultHours: '',
effectiveDate: '',
isAutoPay: false,
payFrequency: '',
payGrade: '',
payType: '',
ratePer: '',
salary: ''
}
],
primaryStateTax: [
{
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
exemptions2: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
specialCheckCalc: '',
taxCalculationCode: '',
taxCode: '',
w4FormYear: 0
}
],
priorLastName: '',
salutation: '',
sitwExemptReason: '',
ssExemptReason: '',
ssn: '',
status: [
{
adjustedSeniorityDate: '',
changeReason: '',
effectiveDate: '',
employeeStatus: '',
hireDate: '',
isEligibleForRehire: false
}
],
suffix: '',
suiExemptReason: '',
suiState: '',
taxDistributionCode1099R: '',
taxForm: '',
veteranDescription: '',
webTime: {badgeNumber: '', chargeRate: '', isTimeLaborEnabled: false},
workAddress: [
{
address1: '',
address2: '',
city: '',
country: '',
county: '',
emailAddress: '',
mobilePhone: '',
pager: '',
phone: '',
phoneExtension: '',
postalCode: '',
state: ''
}
],
workEligibility: [
{
alienOrAdmissionDocumentNumber: '',
attestedDate: '',
countryOfIssuance: '',
foreignPassportNumber: '',
i94AdmissionNumber: '',
i9DateVerified: '',
i9Notes: '',
isI9Verified: false,
isSsnVerified: false,
ssnDateVerified: '',
ssnNotes: '',
visaType: '',
workAuthorization: '',
workUntil: ''
}
]
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/weblinkstaging/companies/:companyId/employees/newemployees';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"additionalDirectDeposit":[{"accountNumber":"","accountType":"","amount":"","amountType":"","isSkipPreNote":false,"preNoteDate":"","routingNumber":""}],"benefitSetup":[{"benefitClass":"","benefitClassEffectiveDate":"","benefitSalary":"","benefitSalaryEffectiveDate":"","doNotApplyAdministrativePeriod":false,"isMeasureAcaEligibility":false}],"birthDate":"","customBooleanFields":[{"category":"","label":"","value":false}],"customDateFields":[{"category":"","label":"","value":""}],"customDropDownFields":[{"category":"","label":"","value":""}],"customNumberFields":[{"category":"","label":"","value":""}],"customTextFields":[{"category":"","label":"","value":""}],"departmentPosition":[{"changeReason":"","clockBadgeNumber":"","costCenter1":"","costCenter2":"","costCenter3":"","effectiveDate":"","employeeType":"","equalEmploymentOpportunityClass":"","isMinimumWageExempt":false,"isOvertimeExempt":false,"isSupervisorReviewer":false,"isUnionDuesCollected":false,"isUnionInitiationCollected":false,"jobTitle":"","payGroup":"","positionCode":"","shift":"","supervisorCompanyNumber":"","supervisorEmployeeId":"","tipped":"","unionAffiliationDate":"","unionCode":"","unionPosition":"","workersCompensation":""}],"disabilityDescription":"","employeeId":"","ethnicity":"","federalTax":[{"amount":"","deductionsAmount":"","dependentsAmount":"","exemptions":"","filingStatus":"","higherRate":false,"otherIncomeAmount":"","percentage":"","taxCalculationCode":"","w4FormYear":0}],"firstName":"","fitwExemptReason":"","futaExemptReason":"","gender":"","homeAddress":[{"address1":"","address2":"","city":"","country":"","county":"","emailAddress":"","mobilePhone":"","phone":"","postalCode":"","state":""}],"isEmployee943":false,"isSmoker":false,"lastName":"","localTax":[{"exemptions":"","exemptions2":"","filingStatus":"","residentPSD":"","taxCode":"","workPSD":""}],"mainDirectDeposit":[{"accountNumber":"","accountType":"","isSkipPreNote":false,"preNoteDate":"","routingNumber":""}],"maritalStatus":"","medExemptReason":"","middleName":"","nonPrimaryStateTax":[{"amount":"","deductionsAmount":"","dependentsAmount":"","exemptions":"","exemptions2":"","filingStatus":"","higherRate":false,"otherIncomeAmount":"","percentage":"","reciprocityCode":"","specialCheckCalc":"","taxCalculationCode":"","taxCode":"","w4FormYear":0}],"preferredName":"","primaryPayRate":[{"baseRate":"","changeReason":"","defaultHours":"","effectiveDate":"","isAutoPay":false,"payFrequency":"","payGrade":"","payType":"","ratePer":"","salary":""}],"primaryStateTax":[{"amount":"","deductionsAmount":"","dependentsAmount":"","exemptions":"","exemptions2":"","filingStatus":"","higherRate":false,"otherIncomeAmount":"","percentage":"","specialCheckCalc":"","taxCalculationCode":"","taxCode":"","w4FormYear":0}],"priorLastName":"","salutation":"","sitwExemptReason":"","ssExemptReason":"","ssn":"","status":[{"adjustedSeniorityDate":"","changeReason":"","effectiveDate":"","employeeStatus":"","hireDate":"","isEligibleForRehire":false}],"suffix":"","suiExemptReason":"","suiState":"","taxDistributionCode1099R":"","taxForm":"","veteranDescription":"","webTime":{"badgeNumber":"","chargeRate":"","isTimeLaborEnabled":false},"workAddress":[{"address1":"","address2":"","city":"","country":"","county":"","emailAddress":"","mobilePhone":"","pager":"","phone":"","phoneExtension":"","postalCode":"","state":""}],"workEligibility":[{"alienOrAdmissionDocumentNumber":"","attestedDate":"","countryOfIssuance":"","foreignPassportNumber":"","i94AdmissionNumber":"","i9DateVerified":"","i9Notes":"","isI9Verified":false,"isSsnVerified":false,"ssnDateVerified":"","ssnNotes":"","visaType":"","workAuthorization":"","workUntil":""}]}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"additionalDirectDeposit": @[ @{ @"accountNumber": @"", @"accountType": @"", @"amount": @"", @"amountType": @"", @"isSkipPreNote": @NO, @"preNoteDate": @"", @"routingNumber": @"" } ],
@"benefitSetup": @[ @{ @"benefitClass": @"", @"benefitClassEffectiveDate": @"", @"benefitSalary": @"", @"benefitSalaryEffectiveDate": @"", @"doNotApplyAdministrativePeriod": @NO, @"isMeasureAcaEligibility": @NO } ],
@"birthDate": @"",
@"customBooleanFields": @[ @{ @"category": @"", @"label": @"", @"value": @NO } ],
@"customDateFields": @[ @{ @"category": @"", @"label": @"", @"value": @"" } ],
@"customDropDownFields": @[ @{ @"category": @"", @"label": @"", @"value": @"" } ],
@"customNumberFields": @[ @{ @"category": @"", @"label": @"", @"value": @"" } ],
@"customTextFields": @[ @{ @"category": @"", @"label": @"", @"value": @"" } ],
@"departmentPosition": @[ @{ @"changeReason": @"", @"clockBadgeNumber": @"", @"costCenter1": @"", @"costCenter2": @"", @"costCenter3": @"", @"effectiveDate": @"", @"employeeType": @"", @"equalEmploymentOpportunityClass": @"", @"isMinimumWageExempt": @NO, @"isOvertimeExempt": @NO, @"isSupervisorReviewer": @NO, @"isUnionDuesCollected": @NO, @"isUnionInitiationCollected": @NO, @"jobTitle": @"", @"payGroup": @"", @"positionCode": @"", @"shift": @"", @"supervisorCompanyNumber": @"", @"supervisorEmployeeId": @"", @"tipped": @"", @"unionAffiliationDate": @"", @"unionCode": @"", @"unionPosition": @"", @"workersCompensation": @"" } ],
@"disabilityDescription": @"",
@"employeeId": @"",
@"ethnicity": @"",
@"federalTax": @[ @{ @"amount": @"", @"deductionsAmount": @"", @"dependentsAmount": @"", @"exemptions": @"", @"filingStatus": @"", @"higherRate": @NO, @"otherIncomeAmount": @"", @"percentage": @"", @"taxCalculationCode": @"", @"w4FormYear": @0 } ],
@"firstName": @"",
@"fitwExemptReason": @"",
@"futaExemptReason": @"",
@"gender": @"",
@"homeAddress": @[ @{ @"address1": @"", @"address2": @"", @"city": @"", @"country": @"", @"county": @"", @"emailAddress": @"", @"mobilePhone": @"", @"phone": @"", @"postalCode": @"", @"state": @"" } ],
@"isEmployee943": @NO,
@"isSmoker": @NO,
@"lastName": @"",
@"localTax": @[ @{ @"exemptions": @"", @"exemptions2": @"", @"filingStatus": @"", @"residentPSD": @"", @"taxCode": @"", @"workPSD": @"" } ],
@"mainDirectDeposit": @[ @{ @"accountNumber": @"", @"accountType": @"", @"isSkipPreNote": @NO, @"preNoteDate": @"", @"routingNumber": @"" } ],
@"maritalStatus": @"",
@"medExemptReason": @"",
@"middleName": @"",
@"nonPrimaryStateTax": @[ @{ @"amount": @"", @"deductionsAmount": @"", @"dependentsAmount": @"", @"exemptions": @"", @"exemptions2": @"", @"filingStatus": @"", @"higherRate": @NO, @"otherIncomeAmount": @"", @"percentage": @"", @"reciprocityCode": @"", @"specialCheckCalc": @"", @"taxCalculationCode": @"", @"taxCode": @"", @"w4FormYear": @0 } ],
@"preferredName": @"",
@"primaryPayRate": @[ @{ @"baseRate": @"", @"changeReason": @"", @"defaultHours": @"", @"effectiveDate": @"", @"isAutoPay": @NO, @"payFrequency": @"", @"payGrade": @"", @"payType": @"", @"ratePer": @"", @"salary": @"" } ],
@"primaryStateTax": @[ @{ @"amount": @"", @"deductionsAmount": @"", @"dependentsAmount": @"", @"exemptions": @"", @"exemptions2": @"", @"filingStatus": @"", @"higherRate": @NO, @"otherIncomeAmount": @"", @"percentage": @"", @"specialCheckCalc": @"", @"taxCalculationCode": @"", @"taxCode": @"", @"w4FormYear": @0 } ],
@"priorLastName": @"",
@"salutation": @"",
@"sitwExemptReason": @"",
@"ssExemptReason": @"",
@"ssn": @"",
@"status": @[ @{ @"adjustedSeniorityDate": @"", @"changeReason": @"", @"effectiveDate": @"", @"employeeStatus": @"", @"hireDate": @"", @"isEligibleForRehire": @NO } ],
@"suffix": @"",
@"suiExemptReason": @"",
@"suiState": @"",
@"taxDistributionCode1099R": @"",
@"taxForm": @"",
@"veteranDescription": @"",
@"webTime": @{ @"badgeNumber": @"", @"chargeRate": @"", @"isTimeLaborEnabled": @NO },
@"workAddress": @[ @{ @"address1": @"", @"address2": @"", @"city": @"", @"country": @"", @"county": @"", @"emailAddress": @"", @"mobilePhone": @"", @"pager": @"", @"phone": @"", @"phoneExtension": @"", @"postalCode": @"", @"state": @"" } ],
@"workEligibility": @[ @{ @"alienOrAdmissionDocumentNumber": @"", @"attestedDate": @"", @"countryOfIssuance": @"", @"foreignPassportNumber": @"", @"i94AdmissionNumber": @"", @"i9DateVerified": @"", @"i9Notes": @"", @"isI9Verified": @NO, @"isSsnVerified": @NO, @"ssnDateVerified": @"", @"ssnNotes": @"", @"visaType": @"", @"workAuthorization": @"", @"workUntil": @"" } ] };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/weblinkstaging/companies/:companyId/employees/newemployees"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/weblinkstaging/companies/:companyId/employees/newemployees" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"additionalDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"amount\": \"\",\n \"amountType\": \"\",\n \"isSkipPreNote\": false,\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"benefitSetup\": [\n {\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n }\n ],\n \"birthDate\": \"\",\n \"customBooleanFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": false\n }\n ],\n \"customDateFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customDropDownFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customNumberFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customTextFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"departmentPosition\": [\n {\n \"changeReason\": \"\",\n \"clockBadgeNumber\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"employeeType\": \"\",\n \"equalEmploymentOpportunityClass\": \"\",\n \"isMinimumWageExempt\": false,\n \"isOvertimeExempt\": false,\n \"isSupervisorReviewer\": false,\n \"isUnionDuesCollected\": false,\n \"isUnionInitiationCollected\": false,\n \"jobTitle\": \"\",\n \"payGroup\": \"\",\n \"positionCode\": \"\",\n \"shift\": \"\",\n \"supervisorCompanyNumber\": \"\",\n \"supervisorEmployeeId\": \"\",\n \"tipped\": \"\",\n \"unionAffiliationDate\": \"\",\n \"unionCode\": \"\",\n \"unionPosition\": \"\",\n \"workersCompensation\": \"\"\n }\n ],\n \"disabilityDescription\": \"\",\n \"employeeId\": \"\",\n \"ethnicity\": \"\",\n \"federalTax\": [\n {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"taxCalculationCode\": \"\",\n \"w4FormYear\": 0\n }\n ],\n \"firstName\": \"\",\n \"fitwExemptReason\": \"\",\n \"futaExemptReason\": \"\",\n \"gender\": \"\",\n \"homeAddress\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n }\n ],\n \"isEmployee943\": false,\n \"isSmoker\": false,\n \"lastName\": \"\",\n \"localTax\": [\n {\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n }\n ],\n \"mainDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"isSkipPreNote\": false,\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"maritalStatus\": \"\",\n \"medExemptReason\": \"\",\n \"middleName\": \"\",\n \"nonPrimaryStateTax\": [\n {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n }\n ],\n \"preferredName\": \"\",\n \"primaryPayRate\": [\n {\n \"baseRate\": \"\",\n \"changeReason\": \"\",\n \"defaultHours\": \"\",\n \"effectiveDate\": \"\",\n \"isAutoPay\": false,\n \"payFrequency\": \"\",\n \"payGrade\": \"\",\n \"payType\": \"\",\n \"ratePer\": \"\",\n \"salary\": \"\"\n }\n ],\n \"primaryStateTax\": [\n {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n }\n ],\n \"priorLastName\": \"\",\n \"salutation\": \"\",\n \"sitwExemptReason\": \"\",\n \"ssExemptReason\": \"\",\n \"ssn\": \"\",\n \"status\": [\n {\n \"adjustedSeniorityDate\": \"\",\n \"changeReason\": \"\",\n \"effectiveDate\": \"\",\n \"employeeStatus\": \"\",\n \"hireDate\": \"\",\n \"isEligibleForRehire\": false\n }\n ],\n \"suffix\": \"\",\n \"suiExemptReason\": \"\",\n \"suiState\": \"\",\n \"taxDistributionCode1099R\": \"\",\n \"taxForm\": \"\",\n \"veteranDescription\": \"\",\n \"webTime\": {\n \"badgeNumber\": \"\",\n \"chargeRate\": \"\",\n \"isTimeLaborEnabled\": false\n },\n \"workAddress\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"pager\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n }\n ],\n \"workEligibility\": [\n {\n \"alienOrAdmissionDocumentNumber\": \"\",\n \"attestedDate\": \"\",\n \"countryOfIssuance\": \"\",\n \"foreignPassportNumber\": \"\",\n \"i94AdmissionNumber\": \"\",\n \"i9DateVerified\": \"\",\n \"i9Notes\": \"\",\n \"isI9Verified\": false,\n \"isSsnVerified\": false,\n \"ssnDateVerified\": \"\",\n \"ssnNotes\": \"\",\n \"visaType\": \"\",\n \"workAuthorization\": \"\",\n \"workUntil\": \"\"\n }\n ]\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/weblinkstaging/companies/:companyId/employees/newemployees",
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([
'additionalDirectDeposit' => [
[
'accountNumber' => '',
'accountType' => '',
'amount' => '',
'amountType' => '',
'isSkipPreNote' => null,
'preNoteDate' => '',
'routingNumber' => ''
]
],
'benefitSetup' => [
[
'benefitClass' => '',
'benefitClassEffectiveDate' => '',
'benefitSalary' => '',
'benefitSalaryEffectiveDate' => '',
'doNotApplyAdministrativePeriod' => null,
'isMeasureAcaEligibility' => null
]
],
'birthDate' => '',
'customBooleanFields' => [
[
'category' => '',
'label' => '',
'value' => null
]
],
'customDateFields' => [
[
'category' => '',
'label' => '',
'value' => ''
]
],
'customDropDownFields' => [
[
'category' => '',
'label' => '',
'value' => ''
]
],
'customNumberFields' => [
[
'category' => '',
'label' => '',
'value' => ''
]
],
'customTextFields' => [
[
'category' => '',
'label' => '',
'value' => ''
]
],
'departmentPosition' => [
[
'changeReason' => '',
'clockBadgeNumber' => '',
'costCenter1' => '',
'costCenter2' => '',
'costCenter3' => '',
'effectiveDate' => '',
'employeeType' => '',
'equalEmploymentOpportunityClass' => '',
'isMinimumWageExempt' => null,
'isOvertimeExempt' => null,
'isSupervisorReviewer' => null,
'isUnionDuesCollected' => null,
'isUnionInitiationCollected' => null,
'jobTitle' => '',
'payGroup' => '',
'positionCode' => '',
'shift' => '',
'supervisorCompanyNumber' => '',
'supervisorEmployeeId' => '',
'tipped' => '',
'unionAffiliationDate' => '',
'unionCode' => '',
'unionPosition' => '',
'workersCompensation' => ''
]
],
'disabilityDescription' => '',
'employeeId' => '',
'ethnicity' => '',
'federalTax' => [
[
'amount' => '',
'deductionsAmount' => '',
'dependentsAmount' => '',
'exemptions' => '',
'filingStatus' => '',
'higherRate' => null,
'otherIncomeAmount' => '',
'percentage' => '',
'taxCalculationCode' => '',
'w4FormYear' => 0
]
],
'firstName' => '',
'fitwExemptReason' => '',
'futaExemptReason' => '',
'gender' => '',
'homeAddress' => [
[
'address1' => '',
'address2' => '',
'city' => '',
'country' => '',
'county' => '',
'emailAddress' => '',
'mobilePhone' => '',
'phone' => '',
'postalCode' => '',
'state' => ''
]
],
'isEmployee943' => null,
'isSmoker' => null,
'lastName' => '',
'localTax' => [
[
'exemptions' => '',
'exemptions2' => '',
'filingStatus' => '',
'residentPSD' => '',
'taxCode' => '',
'workPSD' => ''
]
],
'mainDirectDeposit' => [
[
'accountNumber' => '',
'accountType' => '',
'isSkipPreNote' => null,
'preNoteDate' => '',
'routingNumber' => ''
]
],
'maritalStatus' => '',
'medExemptReason' => '',
'middleName' => '',
'nonPrimaryStateTax' => [
[
'amount' => '',
'deductionsAmount' => '',
'dependentsAmount' => '',
'exemptions' => '',
'exemptions2' => '',
'filingStatus' => '',
'higherRate' => null,
'otherIncomeAmount' => '',
'percentage' => '',
'reciprocityCode' => '',
'specialCheckCalc' => '',
'taxCalculationCode' => '',
'taxCode' => '',
'w4FormYear' => 0
]
],
'preferredName' => '',
'primaryPayRate' => [
[
'baseRate' => '',
'changeReason' => '',
'defaultHours' => '',
'effectiveDate' => '',
'isAutoPay' => null,
'payFrequency' => '',
'payGrade' => '',
'payType' => '',
'ratePer' => '',
'salary' => ''
]
],
'primaryStateTax' => [
[
'amount' => '',
'deductionsAmount' => '',
'dependentsAmount' => '',
'exemptions' => '',
'exemptions2' => '',
'filingStatus' => '',
'higherRate' => null,
'otherIncomeAmount' => '',
'percentage' => '',
'specialCheckCalc' => '',
'taxCalculationCode' => '',
'taxCode' => '',
'w4FormYear' => 0
]
],
'priorLastName' => '',
'salutation' => '',
'sitwExemptReason' => '',
'ssExemptReason' => '',
'ssn' => '',
'status' => [
[
'adjustedSeniorityDate' => '',
'changeReason' => '',
'effectiveDate' => '',
'employeeStatus' => '',
'hireDate' => '',
'isEligibleForRehire' => null
]
],
'suffix' => '',
'suiExemptReason' => '',
'suiState' => '',
'taxDistributionCode1099R' => '',
'taxForm' => '',
'veteranDescription' => '',
'webTime' => [
'badgeNumber' => '',
'chargeRate' => '',
'isTimeLaborEnabled' => null
],
'workAddress' => [
[
'address1' => '',
'address2' => '',
'city' => '',
'country' => '',
'county' => '',
'emailAddress' => '',
'mobilePhone' => '',
'pager' => '',
'phone' => '',
'phoneExtension' => '',
'postalCode' => '',
'state' => ''
]
],
'workEligibility' => [
[
'alienOrAdmissionDocumentNumber' => '',
'attestedDate' => '',
'countryOfIssuance' => '',
'foreignPassportNumber' => '',
'i94AdmissionNumber' => '',
'i9DateVerified' => '',
'i9Notes' => '',
'isI9Verified' => null,
'isSsnVerified' => null,
'ssnDateVerified' => '',
'ssnNotes' => '',
'visaType' => '',
'workAuthorization' => '',
'workUntil' => ''
]
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v2/weblinkstaging/companies/:companyId/employees/newemployees', [
'body' => '{
"additionalDirectDeposit": [
{
"accountNumber": "",
"accountType": "",
"amount": "",
"amountType": "",
"isSkipPreNote": false,
"preNoteDate": "",
"routingNumber": ""
}
],
"benefitSetup": [
{
"benefitClass": "",
"benefitClassEffectiveDate": "",
"benefitSalary": "",
"benefitSalaryEffectiveDate": "",
"doNotApplyAdministrativePeriod": false,
"isMeasureAcaEligibility": false
}
],
"birthDate": "",
"customBooleanFields": [
{
"category": "",
"label": "",
"value": false
}
],
"customDateFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customDropDownFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customNumberFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customTextFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"departmentPosition": [
{
"changeReason": "",
"clockBadgeNumber": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"employeeType": "",
"equalEmploymentOpportunityClass": "",
"isMinimumWageExempt": false,
"isOvertimeExempt": false,
"isSupervisorReviewer": false,
"isUnionDuesCollected": false,
"isUnionInitiationCollected": false,
"jobTitle": "",
"payGroup": "",
"positionCode": "",
"shift": "",
"supervisorCompanyNumber": "",
"supervisorEmployeeId": "",
"tipped": "",
"unionAffiliationDate": "",
"unionCode": "",
"unionPosition": "",
"workersCompensation": ""
}
],
"disabilityDescription": "",
"employeeId": "",
"ethnicity": "",
"federalTax": [
{
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"taxCalculationCode": "",
"w4FormYear": 0
}
],
"firstName": "",
"fitwExemptReason": "",
"futaExemptReason": "",
"gender": "",
"homeAddress": [
{
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"mobilePhone": "",
"phone": "",
"postalCode": "",
"state": ""
}
],
"isEmployee943": false,
"isSmoker": false,
"lastName": "",
"localTax": [
{
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"residentPSD": "",
"taxCode": "",
"workPSD": ""
}
],
"mainDirectDeposit": [
{
"accountNumber": "",
"accountType": "",
"isSkipPreNote": false,
"preNoteDate": "",
"routingNumber": ""
}
],
"maritalStatus": "",
"medExemptReason": "",
"middleName": "",
"nonPrimaryStateTax": [
{
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"reciprocityCode": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
}
],
"preferredName": "",
"primaryPayRate": [
{
"baseRate": "",
"changeReason": "",
"defaultHours": "",
"effectiveDate": "",
"isAutoPay": false,
"payFrequency": "",
"payGrade": "",
"payType": "",
"ratePer": "",
"salary": ""
}
],
"primaryStateTax": [
{
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
}
],
"priorLastName": "",
"salutation": "",
"sitwExemptReason": "",
"ssExemptReason": "",
"ssn": "",
"status": [
{
"adjustedSeniorityDate": "",
"changeReason": "",
"effectiveDate": "",
"employeeStatus": "",
"hireDate": "",
"isEligibleForRehire": false
}
],
"suffix": "",
"suiExemptReason": "",
"suiState": "",
"taxDistributionCode1099R": "",
"taxForm": "",
"veteranDescription": "",
"webTime": {
"badgeNumber": "",
"chargeRate": "",
"isTimeLaborEnabled": false
},
"workAddress": [
{
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"mobilePhone": "",
"pager": "",
"phone": "",
"phoneExtension": "",
"postalCode": "",
"state": ""
}
],
"workEligibility": [
{
"alienOrAdmissionDocumentNumber": "",
"attestedDate": "",
"countryOfIssuance": "",
"foreignPassportNumber": "",
"i94AdmissionNumber": "",
"i9DateVerified": "",
"i9Notes": "",
"isI9Verified": false,
"isSsnVerified": false,
"ssnDateVerified": "",
"ssnNotes": "",
"visaType": "",
"workAuthorization": "",
"workUntil": ""
}
]
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/weblinkstaging/companies/:companyId/employees/newemployees');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'additionalDirectDeposit' => [
[
'accountNumber' => '',
'accountType' => '',
'amount' => '',
'amountType' => '',
'isSkipPreNote' => null,
'preNoteDate' => '',
'routingNumber' => ''
]
],
'benefitSetup' => [
[
'benefitClass' => '',
'benefitClassEffectiveDate' => '',
'benefitSalary' => '',
'benefitSalaryEffectiveDate' => '',
'doNotApplyAdministrativePeriod' => null,
'isMeasureAcaEligibility' => null
]
],
'birthDate' => '',
'customBooleanFields' => [
[
'category' => '',
'label' => '',
'value' => null
]
],
'customDateFields' => [
[
'category' => '',
'label' => '',
'value' => ''
]
],
'customDropDownFields' => [
[
'category' => '',
'label' => '',
'value' => ''
]
],
'customNumberFields' => [
[
'category' => '',
'label' => '',
'value' => ''
]
],
'customTextFields' => [
[
'category' => '',
'label' => '',
'value' => ''
]
],
'departmentPosition' => [
[
'changeReason' => '',
'clockBadgeNumber' => '',
'costCenter1' => '',
'costCenter2' => '',
'costCenter3' => '',
'effectiveDate' => '',
'employeeType' => '',
'equalEmploymentOpportunityClass' => '',
'isMinimumWageExempt' => null,
'isOvertimeExempt' => null,
'isSupervisorReviewer' => null,
'isUnionDuesCollected' => null,
'isUnionInitiationCollected' => null,
'jobTitle' => '',
'payGroup' => '',
'positionCode' => '',
'shift' => '',
'supervisorCompanyNumber' => '',
'supervisorEmployeeId' => '',
'tipped' => '',
'unionAffiliationDate' => '',
'unionCode' => '',
'unionPosition' => '',
'workersCompensation' => ''
]
],
'disabilityDescription' => '',
'employeeId' => '',
'ethnicity' => '',
'federalTax' => [
[
'amount' => '',
'deductionsAmount' => '',
'dependentsAmount' => '',
'exemptions' => '',
'filingStatus' => '',
'higherRate' => null,
'otherIncomeAmount' => '',
'percentage' => '',
'taxCalculationCode' => '',
'w4FormYear' => 0
]
],
'firstName' => '',
'fitwExemptReason' => '',
'futaExemptReason' => '',
'gender' => '',
'homeAddress' => [
[
'address1' => '',
'address2' => '',
'city' => '',
'country' => '',
'county' => '',
'emailAddress' => '',
'mobilePhone' => '',
'phone' => '',
'postalCode' => '',
'state' => ''
]
],
'isEmployee943' => null,
'isSmoker' => null,
'lastName' => '',
'localTax' => [
[
'exemptions' => '',
'exemptions2' => '',
'filingStatus' => '',
'residentPSD' => '',
'taxCode' => '',
'workPSD' => ''
]
],
'mainDirectDeposit' => [
[
'accountNumber' => '',
'accountType' => '',
'isSkipPreNote' => null,
'preNoteDate' => '',
'routingNumber' => ''
]
],
'maritalStatus' => '',
'medExemptReason' => '',
'middleName' => '',
'nonPrimaryStateTax' => [
[
'amount' => '',
'deductionsAmount' => '',
'dependentsAmount' => '',
'exemptions' => '',
'exemptions2' => '',
'filingStatus' => '',
'higherRate' => null,
'otherIncomeAmount' => '',
'percentage' => '',
'reciprocityCode' => '',
'specialCheckCalc' => '',
'taxCalculationCode' => '',
'taxCode' => '',
'w4FormYear' => 0
]
],
'preferredName' => '',
'primaryPayRate' => [
[
'baseRate' => '',
'changeReason' => '',
'defaultHours' => '',
'effectiveDate' => '',
'isAutoPay' => null,
'payFrequency' => '',
'payGrade' => '',
'payType' => '',
'ratePer' => '',
'salary' => ''
]
],
'primaryStateTax' => [
[
'amount' => '',
'deductionsAmount' => '',
'dependentsAmount' => '',
'exemptions' => '',
'exemptions2' => '',
'filingStatus' => '',
'higherRate' => null,
'otherIncomeAmount' => '',
'percentage' => '',
'specialCheckCalc' => '',
'taxCalculationCode' => '',
'taxCode' => '',
'w4FormYear' => 0
]
],
'priorLastName' => '',
'salutation' => '',
'sitwExemptReason' => '',
'ssExemptReason' => '',
'ssn' => '',
'status' => [
[
'adjustedSeniorityDate' => '',
'changeReason' => '',
'effectiveDate' => '',
'employeeStatus' => '',
'hireDate' => '',
'isEligibleForRehire' => null
]
],
'suffix' => '',
'suiExemptReason' => '',
'suiState' => '',
'taxDistributionCode1099R' => '',
'taxForm' => '',
'veteranDescription' => '',
'webTime' => [
'badgeNumber' => '',
'chargeRate' => '',
'isTimeLaborEnabled' => null
],
'workAddress' => [
[
'address1' => '',
'address2' => '',
'city' => '',
'country' => '',
'county' => '',
'emailAddress' => '',
'mobilePhone' => '',
'pager' => '',
'phone' => '',
'phoneExtension' => '',
'postalCode' => '',
'state' => ''
]
],
'workEligibility' => [
[
'alienOrAdmissionDocumentNumber' => '',
'attestedDate' => '',
'countryOfIssuance' => '',
'foreignPassportNumber' => '',
'i94AdmissionNumber' => '',
'i9DateVerified' => '',
'i9Notes' => '',
'isI9Verified' => null,
'isSsnVerified' => null,
'ssnDateVerified' => '',
'ssnNotes' => '',
'visaType' => '',
'workAuthorization' => '',
'workUntil' => ''
]
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'additionalDirectDeposit' => [
[
'accountNumber' => '',
'accountType' => '',
'amount' => '',
'amountType' => '',
'isSkipPreNote' => null,
'preNoteDate' => '',
'routingNumber' => ''
]
],
'benefitSetup' => [
[
'benefitClass' => '',
'benefitClassEffectiveDate' => '',
'benefitSalary' => '',
'benefitSalaryEffectiveDate' => '',
'doNotApplyAdministrativePeriod' => null,
'isMeasureAcaEligibility' => null
]
],
'birthDate' => '',
'customBooleanFields' => [
[
'category' => '',
'label' => '',
'value' => null
]
],
'customDateFields' => [
[
'category' => '',
'label' => '',
'value' => ''
]
],
'customDropDownFields' => [
[
'category' => '',
'label' => '',
'value' => ''
]
],
'customNumberFields' => [
[
'category' => '',
'label' => '',
'value' => ''
]
],
'customTextFields' => [
[
'category' => '',
'label' => '',
'value' => ''
]
],
'departmentPosition' => [
[
'changeReason' => '',
'clockBadgeNumber' => '',
'costCenter1' => '',
'costCenter2' => '',
'costCenter3' => '',
'effectiveDate' => '',
'employeeType' => '',
'equalEmploymentOpportunityClass' => '',
'isMinimumWageExempt' => null,
'isOvertimeExempt' => null,
'isSupervisorReviewer' => null,
'isUnionDuesCollected' => null,
'isUnionInitiationCollected' => null,
'jobTitle' => '',
'payGroup' => '',
'positionCode' => '',
'shift' => '',
'supervisorCompanyNumber' => '',
'supervisorEmployeeId' => '',
'tipped' => '',
'unionAffiliationDate' => '',
'unionCode' => '',
'unionPosition' => '',
'workersCompensation' => ''
]
],
'disabilityDescription' => '',
'employeeId' => '',
'ethnicity' => '',
'federalTax' => [
[
'amount' => '',
'deductionsAmount' => '',
'dependentsAmount' => '',
'exemptions' => '',
'filingStatus' => '',
'higherRate' => null,
'otherIncomeAmount' => '',
'percentage' => '',
'taxCalculationCode' => '',
'w4FormYear' => 0
]
],
'firstName' => '',
'fitwExemptReason' => '',
'futaExemptReason' => '',
'gender' => '',
'homeAddress' => [
[
'address1' => '',
'address2' => '',
'city' => '',
'country' => '',
'county' => '',
'emailAddress' => '',
'mobilePhone' => '',
'phone' => '',
'postalCode' => '',
'state' => ''
]
],
'isEmployee943' => null,
'isSmoker' => null,
'lastName' => '',
'localTax' => [
[
'exemptions' => '',
'exemptions2' => '',
'filingStatus' => '',
'residentPSD' => '',
'taxCode' => '',
'workPSD' => ''
]
],
'mainDirectDeposit' => [
[
'accountNumber' => '',
'accountType' => '',
'isSkipPreNote' => null,
'preNoteDate' => '',
'routingNumber' => ''
]
],
'maritalStatus' => '',
'medExemptReason' => '',
'middleName' => '',
'nonPrimaryStateTax' => [
[
'amount' => '',
'deductionsAmount' => '',
'dependentsAmount' => '',
'exemptions' => '',
'exemptions2' => '',
'filingStatus' => '',
'higherRate' => null,
'otherIncomeAmount' => '',
'percentage' => '',
'reciprocityCode' => '',
'specialCheckCalc' => '',
'taxCalculationCode' => '',
'taxCode' => '',
'w4FormYear' => 0
]
],
'preferredName' => '',
'primaryPayRate' => [
[
'baseRate' => '',
'changeReason' => '',
'defaultHours' => '',
'effectiveDate' => '',
'isAutoPay' => null,
'payFrequency' => '',
'payGrade' => '',
'payType' => '',
'ratePer' => '',
'salary' => ''
]
],
'primaryStateTax' => [
[
'amount' => '',
'deductionsAmount' => '',
'dependentsAmount' => '',
'exemptions' => '',
'exemptions2' => '',
'filingStatus' => '',
'higherRate' => null,
'otherIncomeAmount' => '',
'percentage' => '',
'specialCheckCalc' => '',
'taxCalculationCode' => '',
'taxCode' => '',
'w4FormYear' => 0
]
],
'priorLastName' => '',
'salutation' => '',
'sitwExemptReason' => '',
'ssExemptReason' => '',
'ssn' => '',
'status' => [
[
'adjustedSeniorityDate' => '',
'changeReason' => '',
'effectiveDate' => '',
'employeeStatus' => '',
'hireDate' => '',
'isEligibleForRehire' => null
]
],
'suffix' => '',
'suiExemptReason' => '',
'suiState' => '',
'taxDistributionCode1099R' => '',
'taxForm' => '',
'veteranDescription' => '',
'webTime' => [
'badgeNumber' => '',
'chargeRate' => '',
'isTimeLaborEnabled' => null
],
'workAddress' => [
[
'address1' => '',
'address2' => '',
'city' => '',
'country' => '',
'county' => '',
'emailAddress' => '',
'mobilePhone' => '',
'pager' => '',
'phone' => '',
'phoneExtension' => '',
'postalCode' => '',
'state' => ''
]
],
'workEligibility' => [
[
'alienOrAdmissionDocumentNumber' => '',
'attestedDate' => '',
'countryOfIssuance' => '',
'foreignPassportNumber' => '',
'i94AdmissionNumber' => '',
'i9DateVerified' => '',
'i9Notes' => '',
'isI9Verified' => null,
'isSsnVerified' => null,
'ssnDateVerified' => '',
'ssnNotes' => '',
'visaType' => '',
'workAuthorization' => '',
'workUntil' => ''
]
]
]));
$request->setRequestUrl('{{baseUrl}}/v2/weblinkstaging/companies/:companyId/employees/newemployees');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/weblinkstaging/companies/:companyId/employees/newemployees' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"additionalDirectDeposit": [
{
"accountNumber": "",
"accountType": "",
"amount": "",
"amountType": "",
"isSkipPreNote": false,
"preNoteDate": "",
"routingNumber": ""
}
],
"benefitSetup": [
{
"benefitClass": "",
"benefitClassEffectiveDate": "",
"benefitSalary": "",
"benefitSalaryEffectiveDate": "",
"doNotApplyAdministrativePeriod": false,
"isMeasureAcaEligibility": false
}
],
"birthDate": "",
"customBooleanFields": [
{
"category": "",
"label": "",
"value": false
}
],
"customDateFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customDropDownFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customNumberFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customTextFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"departmentPosition": [
{
"changeReason": "",
"clockBadgeNumber": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"employeeType": "",
"equalEmploymentOpportunityClass": "",
"isMinimumWageExempt": false,
"isOvertimeExempt": false,
"isSupervisorReviewer": false,
"isUnionDuesCollected": false,
"isUnionInitiationCollected": false,
"jobTitle": "",
"payGroup": "",
"positionCode": "",
"shift": "",
"supervisorCompanyNumber": "",
"supervisorEmployeeId": "",
"tipped": "",
"unionAffiliationDate": "",
"unionCode": "",
"unionPosition": "",
"workersCompensation": ""
}
],
"disabilityDescription": "",
"employeeId": "",
"ethnicity": "",
"federalTax": [
{
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"taxCalculationCode": "",
"w4FormYear": 0
}
],
"firstName": "",
"fitwExemptReason": "",
"futaExemptReason": "",
"gender": "",
"homeAddress": [
{
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"mobilePhone": "",
"phone": "",
"postalCode": "",
"state": ""
}
],
"isEmployee943": false,
"isSmoker": false,
"lastName": "",
"localTax": [
{
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"residentPSD": "",
"taxCode": "",
"workPSD": ""
}
],
"mainDirectDeposit": [
{
"accountNumber": "",
"accountType": "",
"isSkipPreNote": false,
"preNoteDate": "",
"routingNumber": ""
}
],
"maritalStatus": "",
"medExemptReason": "",
"middleName": "",
"nonPrimaryStateTax": [
{
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"reciprocityCode": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
}
],
"preferredName": "",
"primaryPayRate": [
{
"baseRate": "",
"changeReason": "",
"defaultHours": "",
"effectiveDate": "",
"isAutoPay": false,
"payFrequency": "",
"payGrade": "",
"payType": "",
"ratePer": "",
"salary": ""
}
],
"primaryStateTax": [
{
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
}
],
"priorLastName": "",
"salutation": "",
"sitwExemptReason": "",
"ssExemptReason": "",
"ssn": "",
"status": [
{
"adjustedSeniorityDate": "",
"changeReason": "",
"effectiveDate": "",
"employeeStatus": "",
"hireDate": "",
"isEligibleForRehire": false
}
],
"suffix": "",
"suiExemptReason": "",
"suiState": "",
"taxDistributionCode1099R": "",
"taxForm": "",
"veteranDescription": "",
"webTime": {
"badgeNumber": "",
"chargeRate": "",
"isTimeLaborEnabled": false
},
"workAddress": [
{
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"mobilePhone": "",
"pager": "",
"phone": "",
"phoneExtension": "",
"postalCode": "",
"state": ""
}
],
"workEligibility": [
{
"alienOrAdmissionDocumentNumber": "",
"attestedDate": "",
"countryOfIssuance": "",
"foreignPassportNumber": "",
"i94AdmissionNumber": "",
"i9DateVerified": "",
"i9Notes": "",
"isI9Verified": false,
"isSsnVerified": false,
"ssnDateVerified": "",
"ssnNotes": "",
"visaType": "",
"workAuthorization": "",
"workUntil": ""
}
]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/weblinkstaging/companies/:companyId/employees/newemployees' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"additionalDirectDeposit": [
{
"accountNumber": "",
"accountType": "",
"amount": "",
"amountType": "",
"isSkipPreNote": false,
"preNoteDate": "",
"routingNumber": ""
}
],
"benefitSetup": [
{
"benefitClass": "",
"benefitClassEffectiveDate": "",
"benefitSalary": "",
"benefitSalaryEffectiveDate": "",
"doNotApplyAdministrativePeriod": false,
"isMeasureAcaEligibility": false
}
],
"birthDate": "",
"customBooleanFields": [
{
"category": "",
"label": "",
"value": false
}
],
"customDateFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customDropDownFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customNumberFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customTextFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"departmentPosition": [
{
"changeReason": "",
"clockBadgeNumber": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"employeeType": "",
"equalEmploymentOpportunityClass": "",
"isMinimumWageExempt": false,
"isOvertimeExempt": false,
"isSupervisorReviewer": false,
"isUnionDuesCollected": false,
"isUnionInitiationCollected": false,
"jobTitle": "",
"payGroup": "",
"positionCode": "",
"shift": "",
"supervisorCompanyNumber": "",
"supervisorEmployeeId": "",
"tipped": "",
"unionAffiliationDate": "",
"unionCode": "",
"unionPosition": "",
"workersCompensation": ""
}
],
"disabilityDescription": "",
"employeeId": "",
"ethnicity": "",
"federalTax": [
{
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"taxCalculationCode": "",
"w4FormYear": 0
}
],
"firstName": "",
"fitwExemptReason": "",
"futaExemptReason": "",
"gender": "",
"homeAddress": [
{
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"mobilePhone": "",
"phone": "",
"postalCode": "",
"state": ""
}
],
"isEmployee943": false,
"isSmoker": false,
"lastName": "",
"localTax": [
{
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"residentPSD": "",
"taxCode": "",
"workPSD": ""
}
],
"mainDirectDeposit": [
{
"accountNumber": "",
"accountType": "",
"isSkipPreNote": false,
"preNoteDate": "",
"routingNumber": ""
}
],
"maritalStatus": "",
"medExemptReason": "",
"middleName": "",
"nonPrimaryStateTax": [
{
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"reciprocityCode": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
}
],
"preferredName": "",
"primaryPayRate": [
{
"baseRate": "",
"changeReason": "",
"defaultHours": "",
"effectiveDate": "",
"isAutoPay": false,
"payFrequency": "",
"payGrade": "",
"payType": "",
"ratePer": "",
"salary": ""
}
],
"primaryStateTax": [
{
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
}
],
"priorLastName": "",
"salutation": "",
"sitwExemptReason": "",
"ssExemptReason": "",
"ssn": "",
"status": [
{
"adjustedSeniorityDate": "",
"changeReason": "",
"effectiveDate": "",
"employeeStatus": "",
"hireDate": "",
"isEligibleForRehire": false
}
],
"suffix": "",
"suiExemptReason": "",
"suiState": "",
"taxDistributionCode1099R": "",
"taxForm": "",
"veteranDescription": "",
"webTime": {
"badgeNumber": "",
"chargeRate": "",
"isTimeLaborEnabled": false
},
"workAddress": [
{
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"mobilePhone": "",
"pager": "",
"phone": "",
"phoneExtension": "",
"postalCode": "",
"state": ""
}
],
"workEligibility": [
{
"alienOrAdmissionDocumentNumber": "",
"attestedDate": "",
"countryOfIssuance": "",
"foreignPassportNumber": "",
"i94AdmissionNumber": "",
"i9DateVerified": "",
"i9Notes": "",
"isI9Verified": false,
"isSsnVerified": false,
"ssnDateVerified": "",
"ssnNotes": "",
"visaType": "",
"workAuthorization": "",
"workUntil": ""
}
]
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"additionalDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"amount\": \"\",\n \"amountType\": \"\",\n \"isSkipPreNote\": false,\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"benefitSetup\": [\n {\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n }\n ],\n \"birthDate\": \"\",\n \"customBooleanFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": false\n }\n ],\n \"customDateFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customDropDownFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customNumberFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customTextFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"departmentPosition\": [\n {\n \"changeReason\": \"\",\n \"clockBadgeNumber\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"employeeType\": \"\",\n \"equalEmploymentOpportunityClass\": \"\",\n \"isMinimumWageExempt\": false,\n \"isOvertimeExempt\": false,\n \"isSupervisorReviewer\": false,\n \"isUnionDuesCollected\": false,\n \"isUnionInitiationCollected\": false,\n \"jobTitle\": \"\",\n \"payGroup\": \"\",\n \"positionCode\": \"\",\n \"shift\": \"\",\n \"supervisorCompanyNumber\": \"\",\n \"supervisorEmployeeId\": \"\",\n \"tipped\": \"\",\n \"unionAffiliationDate\": \"\",\n \"unionCode\": \"\",\n \"unionPosition\": \"\",\n \"workersCompensation\": \"\"\n }\n ],\n \"disabilityDescription\": \"\",\n \"employeeId\": \"\",\n \"ethnicity\": \"\",\n \"federalTax\": [\n {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"taxCalculationCode\": \"\",\n \"w4FormYear\": 0\n }\n ],\n \"firstName\": \"\",\n \"fitwExemptReason\": \"\",\n \"futaExemptReason\": \"\",\n \"gender\": \"\",\n \"homeAddress\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n }\n ],\n \"isEmployee943\": false,\n \"isSmoker\": false,\n \"lastName\": \"\",\n \"localTax\": [\n {\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n }\n ],\n \"mainDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"isSkipPreNote\": false,\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"maritalStatus\": \"\",\n \"medExemptReason\": \"\",\n \"middleName\": \"\",\n \"nonPrimaryStateTax\": [\n {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n }\n ],\n \"preferredName\": \"\",\n \"primaryPayRate\": [\n {\n \"baseRate\": \"\",\n \"changeReason\": \"\",\n \"defaultHours\": \"\",\n \"effectiveDate\": \"\",\n \"isAutoPay\": false,\n \"payFrequency\": \"\",\n \"payGrade\": \"\",\n \"payType\": \"\",\n \"ratePer\": \"\",\n \"salary\": \"\"\n }\n ],\n \"primaryStateTax\": [\n {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n }\n ],\n \"priorLastName\": \"\",\n \"salutation\": \"\",\n \"sitwExemptReason\": \"\",\n \"ssExemptReason\": \"\",\n \"ssn\": \"\",\n \"status\": [\n {\n \"adjustedSeniorityDate\": \"\",\n \"changeReason\": \"\",\n \"effectiveDate\": \"\",\n \"employeeStatus\": \"\",\n \"hireDate\": \"\",\n \"isEligibleForRehire\": false\n }\n ],\n \"suffix\": \"\",\n \"suiExemptReason\": \"\",\n \"suiState\": \"\",\n \"taxDistributionCode1099R\": \"\",\n \"taxForm\": \"\",\n \"veteranDescription\": \"\",\n \"webTime\": {\n \"badgeNumber\": \"\",\n \"chargeRate\": \"\",\n \"isTimeLaborEnabled\": false\n },\n \"workAddress\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"pager\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n }\n ],\n \"workEligibility\": [\n {\n \"alienOrAdmissionDocumentNumber\": \"\",\n \"attestedDate\": \"\",\n \"countryOfIssuance\": \"\",\n \"foreignPassportNumber\": \"\",\n \"i94AdmissionNumber\": \"\",\n \"i9DateVerified\": \"\",\n \"i9Notes\": \"\",\n \"isI9Verified\": false,\n \"isSsnVerified\": false,\n \"ssnDateVerified\": \"\",\n \"ssnNotes\": \"\",\n \"visaType\": \"\",\n \"workAuthorization\": \"\",\n \"workUntil\": \"\"\n }\n ]\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v2/weblinkstaging/companies/:companyId/employees/newemployees", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/weblinkstaging/companies/:companyId/employees/newemployees"
payload = {
"additionalDirectDeposit": [
{
"accountNumber": "",
"accountType": "",
"amount": "",
"amountType": "",
"isSkipPreNote": False,
"preNoteDate": "",
"routingNumber": ""
}
],
"benefitSetup": [
{
"benefitClass": "",
"benefitClassEffectiveDate": "",
"benefitSalary": "",
"benefitSalaryEffectiveDate": "",
"doNotApplyAdministrativePeriod": False,
"isMeasureAcaEligibility": False
}
],
"birthDate": "",
"customBooleanFields": [
{
"category": "",
"label": "",
"value": False
}
],
"customDateFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customDropDownFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customNumberFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customTextFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"departmentPosition": [
{
"changeReason": "",
"clockBadgeNumber": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"employeeType": "",
"equalEmploymentOpportunityClass": "",
"isMinimumWageExempt": False,
"isOvertimeExempt": False,
"isSupervisorReviewer": False,
"isUnionDuesCollected": False,
"isUnionInitiationCollected": False,
"jobTitle": "",
"payGroup": "",
"positionCode": "",
"shift": "",
"supervisorCompanyNumber": "",
"supervisorEmployeeId": "",
"tipped": "",
"unionAffiliationDate": "",
"unionCode": "",
"unionPosition": "",
"workersCompensation": ""
}
],
"disabilityDescription": "",
"employeeId": "",
"ethnicity": "",
"federalTax": [
{
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"filingStatus": "",
"higherRate": False,
"otherIncomeAmount": "",
"percentage": "",
"taxCalculationCode": "",
"w4FormYear": 0
}
],
"firstName": "",
"fitwExemptReason": "",
"futaExemptReason": "",
"gender": "",
"homeAddress": [
{
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"mobilePhone": "",
"phone": "",
"postalCode": "",
"state": ""
}
],
"isEmployee943": False,
"isSmoker": False,
"lastName": "",
"localTax": [
{
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"residentPSD": "",
"taxCode": "",
"workPSD": ""
}
],
"mainDirectDeposit": [
{
"accountNumber": "",
"accountType": "",
"isSkipPreNote": False,
"preNoteDate": "",
"routingNumber": ""
}
],
"maritalStatus": "",
"medExemptReason": "",
"middleName": "",
"nonPrimaryStateTax": [
{
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": False,
"otherIncomeAmount": "",
"percentage": "",
"reciprocityCode": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
}
],
"preferredName": "",
"primaryPayRate": [
{
"baseRate": "",
"changeReason": "",
"defaultHours": "",
"effectiveDate": "",
"isAutoPay": False,
"payFrequency": "",
"payGrade": "",
"payType": "",
"ratePer": "",
"salary": ""
}
],
"primaryStateTax": [
{
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": False,
"otherIncomeAmount": "",
"percentage": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
}
],
"priorLastName": "",
"salutation": "",
"sitwExemptReason": "",
"ssExemptReason": "",
"ssn": "",
"status": [
{
"adjustedSeniorityDate": "",
"changeReason": "",
"effectiveDate": "",
"employeeStatus": "",
"hireDate": "",
"isEligibleForRehire": False
}
],
"suffix": "",
"suiExemptReason": "",
"suiState": "",
"taxDistributionCode1099R": "",
"taxForm": "",
"veteranDescription": "",
"webTime": {
"badgeNumber": "",
"chargeRate": "",
"isTimeLaborEnabled": False
},
"workAddress": [
{
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"mobilePhone": "",
"pager": "",
"phone": "",
"phoneExtension": "",
"postalCode": "",
"state": ""
}
],
"workEligibility": [
{
"alienOrAdmissionDocumentNumber": "",
"attestedDate": "",
"countryOfIssuance": "",
"foreignPassportNumber": "",
"i94AdmissionNumber": "",
"i9DateVerified": "",
"i9Notes": "",
"isI9Verified": False,
"isSsnVerified": False,
"ssnDateVerified": "",
"ssnNotes": "",
"visaType": "",
"workAuthorization": "",
"workUntil": ""
}
]
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/weblinkstaging/companies/:companyId/employees/newemployees"
payload <- "{\n \"additionalDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"amount\": \"\",\n \"amountType\": \"\",\n \"isSkipPreNote\": false,\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"benefitSetup\": [\n {\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n }\n ],\n \"birthDate\": \"\",\n \"customBooleanFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": false\n }\n ],\n \"customDateFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customDropDownFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customNumberFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customTextFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"departmentPosition\": [\n {\n \"changeReason\": \"\",\n \"clockBadgeNumber\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"employeeType\": \"\",\n \"equalEmploymentOpportunityClass\": \"\",\n \"isMinimumWageExempt\": false,\n \"isOvertimeExempt\": false,\n \"isSupervisorReviewer\": false,\n \"isUnionDuesCollected\": false,\n \"isUnionInitiationCollected\": false,\n \"jobTitle\": \"\",\n \"payGroup\": \"\",\n \"positionCode\": \"\",\n \"shift\": \"\",\n \"supervisorCompanyNumber\": \"\",\n \"supervisorEmployeeId\": \"\",\n \"tipped\": \"\",\n \"unionAffiliationDate\": \"\",\n \"unionCode\": \"\",\n \"unionPosition\": \"\",\n \"workersCompensation\": \"\"\n }\n ],\n \"disabilityDescription\": \"\",\n \"employeeId\": \"\",\n \"ethnicity\": \"\",\n \"federalTax\": [\n {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"taxCalculationCode\": \"\",\n \"w4FormYear\": 0\n }\n ],\n \"firstName\": \"\",\n \"fitwExemptReason\": \"\",\n \"futaExemptReason\": \"\",\n \"gender\": \"\",\n \"homeAddress\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n }\n ],\n \"isEmployee943\": false,\n \"isSmoker\": false,\n \"lastName\": \"\",\n \"localTax\": [\n {\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n }\n ],\n \"mainDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"isSkipPreNote\": false,\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"maritalStatus\": \"\",\n \"medExemptReason\": \"\",\n \"middleName\": \"\",\n \"nonPrimaryStateTax\": [\n {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n }\n ],\n \"preferredName\": \"\",\n \"primaryPayRate\": [\n {\n \"baseRate\": \"\",\n \"changeReason\": \"\",\n \"defaultHours\": \"\",\n \"effectiveDate\": \"\",\n \"isAutoPay\": false,\n \"payFrequency\": \"\",\n \"payGrade\": \"\",\n \"payType\": \"\",\n \"ratePer\": \"\",\n \"salary\": \"\"\n }\n ],\n \"primaryStateTax\": [\n {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n }\n ],\n \"priorLastName\": \"\",\n \"salutation\": \"\",\n \"sitwExemptReason\": \"\",\n \"ssExemptReason\": \"\",\n \"ssn\": \"\",\n \"status\": [\n {\n \"adjustedSeniorityDate\": \"\",\n \"changeReason\": \"\",\n \"effectiveDate\": \"\",\n \"employeeStatus\": \"\",\n \"hireDate\": \"\",\n \"isEligibleForRehire\": false\n }\n ],\n \"suffix\": \"\",\n \"suiExemptReason\": \"\",\n \"suiState\": \"\",\n \"taxDistributionCode1099R\": \"\",\n \"taxForm\": \"\",\n \"veteranDescription\": \"\",\n \"webTime\": {\n \"badgeNumber\": \"\",\n \"chargeRate\": \"\",\n \"isTimeLaborEnabled\": false\n },\n \"workAddress\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"pager\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n }\n ],\n \"workEligibility\": [\n {\n \"alienOrAdmissionDocumentNumber\": \"\",\n \"attestedDate\": \"\",\n \"countryOfIssuance\": \"\",\n \"foreignPassportNumber\": \"\",\n \"i94AdmissionNumber\": \"\",\n \"i9DateVerified\": \"\",\n \"i9Notes\": \"\",\n \"isI9Verified\": false,\n \"isSsnVerified\": false,\n \"ssnDateVerified\": \"\",\n \"ssnNotes\": \"\",\n \"visaType\": \"\",\n \"workAuthorization\": \"\",\n \"workUntil\": \"\"\n }\n ]\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/weblinkstaging/companies/:companyId/employees/newemployees")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"additionalDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"amount\": \"\",\n \"amountType\": \"\",\n \"isSkipPreNote\": false,\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"benefitSetup\": [\n {\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n }\n ],\n \"birthDate\": \"\",\n \"customBooleanFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": false\n }\n ],\n \"customDateFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customDropDownFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customNumberFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customTextFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"departmentPosition\": [\n {\n \"changeReason\": \"\",\n \"clockBadgeNumber\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"employeeType\": \"\",\n \"equalEmploymentOpportunityClass\": \"\",\n \"isMinimumWageExempt\": false,\n \"isOvertimeExempt\": false,\n \"isSupervisorReviewer\": false,\n \"isUnionDuesCollected\": false,\n \"isUnionInitiationCollected\": false,\n \"jobTitle\": \"\",\n \"payGroup\": \"\",\n \"positionCode\": \"\",\n \"shift\": \"\",\n \"supervisorCompanyNumber\": \"\",\n \"supervisorEmployeeId\": \"\",\n \"tipped\": \"\",\n \"unionAffiliationDate\": \"\",\n \"unionCode\": \"\",\n \"unionPosition\": \"\",\n \"workersCompensation\": \"\"\n }\n ],\n \"disabilityDescription\": \"\",\n \"employeeId\": \"\",\n \"ethnicity\": \"\",\n \"federalTax\": [\n {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"taxCalculationCode\": \"\",\n \"w4FormYear\": 0\n }\n ],\n \"firstName\": \"\",\n \"fitwExemptReason\": \"\",\n \"futaExemptReason\": \"\",\n \"gender\": \"\",\n \"homeAddress\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n }\n ],\n \"isEmployee943\": false,\n \"isSmoker\": false,\n \"lastName\": \"\",\n \"localTax\": [\n {\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n }\n ],\n \"mainDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"isSkipPreNote\": false,\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"maritalStatus\": \"\",\n \"medExemptReason\": \"\",\n \"middleName\": \"\",\n \"nonPrimaryStateTax\": [\n {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n }\n ],\n \"preferredName\": \"\",\n \"primaryPayRate\": [\n {\n \"baseRate\": \"\",\n \"changeReason\": \"\",\n \"defaultHours\": \"\",\n \"effectiveDate\": \"\",\n \"isAutoPay\": false,\n \"payFrequency\": \"\",\n \"payGrade\": \"\",\n \"payType\": \"\",\n \"ratePer\": \"\",\n \"salary\": \"\"\n }\n ],\n \"primaryStateTax\": [\n {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n }\n ],\n \"priorLastName\": \"\",\n \"salutation\": \"\",\n \"sitwExemptReason\": \"\",\n \"ssExemptReason\": \"\",\n \"ssn\": \"\",\n \"status\": [\n {\n \"adjustedSeniorityDate\": \"\",\n \"changeReason\": \"\",\n \"effectiveDate\": \"\",\n \"employeeStatus\": \"\",\n \"hireDate\": \"\",\n \"isEligibleForRehire\": false\n }\n ],\n \"suffix\": \"\",\n \"suiExemptReason\": \"\",\n \"suiState\": \"\",\n \"taxDistributionCode1099R\": \"\",\n \"taxForm\": \"\",\n \"veteranDescription\": \"\",\n \"webTime\": {\n \"badgeNumber\": \"\",\n \"chargeRate\": \"\",\n \"isTimeLaborEnabled\": false\n },\n \"workAddress\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"pager\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n }\n ],\n \"workEligibility\": [\n {\n \"alienOrAdmissionDocumentNumber\": \"\",\n \"attestedDate\": \"\",\n \"countryOfIssuance\": \"\",\n \"foreignPassportNumber\": \"\",\n \"i94AdmissionNumber\": \"\",\n \"i9DateVerified\": \"\",\n \"i9Notes\": \"\",\n \"isI9Verified\": false,\n \"isSsnVerified\": false,\n \"ssnDateVerified\": \"\",\n \"ssnNotes\": \"\",\n \"visaType\": \"\",\n \"workAuthorization\": \"\",\n \"workUntil\": \"\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v2/weblinkstaging/companies/:companyId/employees/newemployees') do |req|
req.body = "{\n \"additionalDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"amount\": \"\",\n \"amountType\": \"\",\n \"isSkipPreNote\": false,\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"benefitSetup\": [\n {\n \"benefitClass\": \"\",\n \"benefitClassEffectiveDate\": \"\",\n \"benefitSalary\": \"\",\n \"benefitSalaryEffectiveDate\": \"\",\n \"doNotApplyAdministrativePeriod\": false,\n \"isMeasureAcaEligibility\": false\n }\n ],\n \"birthDate\": \"\",\n \"customBooleanFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": false\n }\n ],\n \"customDateFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customDropDownFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customNumberFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"customTextFields\": [\n {\n \"category\": \"\",\n \"label\": \"\",\n \"value\": \"\"\n }\n ],\n \"departmentPosition\": [\n {\n \"changeReason\": \"\",\n \"clockBadgeNumber\": \"\",\n \"costCenter1\": \"\",\n \"costCenter2\": \"\",\n \"costCenter3\": \"\",\n \"effectiveDate\": \"\",\n \"employeeType\": \"\",\n \"equalEmploymentOpportunityClass\": \"\",\n \"isMinimumWageExempt\": false,\n \"isOvertimeExempt\": false,\n \"isSupervisorReviewer\": false,\n \"isUnionDuesCollected\": false,\n \"isUnionInitiationCollected\": false,\n \"jobTitle\": \"\",\n \"payGroup\": \"\",\n \"positionCode\": \"\",\n \"shift\": \"\",\n \"supervisorCompanyNumber\": \"\",\n \"supervisorEmployeeId\": \"\",\n \"tipped\": \"\",\n \"unionAffiliationDate\": \"\",\n \"unionCode\": \"\",\n \"unionPosition\": \"\",\n \"workersCompensation\": \"\"\n }\n ],\n \"disabilityDescription\": \"\",\n \"employeeId\": \"\",\n \"ethnicity\": \"\",\n \"federalTax\": [\n {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"taxCalculationCode\": \"\",\n \"w4FormYear\": 0\n }\n ],\n \"firstName\": \"\",\n \"fitwExemptReason\": \"\",\n \"futaExemptReason\": \"\",\n \"gender\": \"\",\n \"homeAddress\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"phone\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n }\n ],\n \"isEmployee943\": false,\n \"isSmoker\": false,\n \"lastName\": \"\",\n \"localTax\": [\n {\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n }\n ],\n \"mainDirectDeposit\": [\n {\n \"accountNumber\": \"\",\n \"accountType\": \"\",\n \"isSkipPreNote\": false,\n \"preNoteDate\": \"\",\n \"routingNumber\": \"\"\n }\n ],\n \"maritalStatus\": \"\",\n \"medExemptReason\": \"\",\n \"middleName\": \"\",\n \"nonPrimaryStateTax\": [\n {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n }\n ],\n \"preferredName\": \"\",\n \"primaryPayRate\": [\n {\n \"baseRate\": \"\",\n \"changeReason\": \"\",\n \"defaultHours\": \"\",\n \"effectiveDate\": \"\",\n \"isAutoPay\": false,\n \"payFrequency\": \"\",\n \"payGrade\": \"\",\n \"payType\": \"\",\n \"ratePer\": \"\",\n \"salary\": \"\"\n }\n ],\n \"primaryStateTax\": [\n {\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n }\n ],\n \"priorLastName\": \"\",\n \"salutation\": \"\",\n \"sitwExemptReason\": \"\",\n \"ssExemptReason\": \"\",\n \"ssn\": \"\",\n \"status\": [\n {\n \"adjustedSeniorityDate\": \"\",\n \"changeReason\": \"\",\n \"effectiveDate\": \"\",\n \"employeeStatus\": \"\",\n \"hireDate\": \"\",\n \"isEligibleForRehire\": false\n }\n ],\n \"suffix\": \"\",\n \"suiExemptReason\": \"\",\n \"suiState\": \"\",\n \"taxDistributionCode1099R\": \"\",\n \"taxForm\": \"\",\n \"veteranDescription\": \"\",\n \"webTime\": {\n \"badgeNumber\": \"\",\n \"chargeRate\": \"\",\n \"isTimeLaborEnabled\": false\n },\n \"workAddress\": [\n {\n \"address1\": \"\",\n \"address2\": \"\",\n \"city\": \"\",\n \"country\": \"\",\n \"county\": \"\",\n \"emailAddress\": \"\",\n \"mobilePhone\": \"\",\n \"pager\": \"\",\n \"phone\": \"\",\n \"phoneExtension\": \"\",\n \"postalCode\": \"\",\n \"state\": \"\"\n }\n ],\n \"workEligibility\": [\n {\n \"alienOrAdmissionDocumentNumber\": \"\",\n \"attestedDate\": \"\",\n \"countryOfIssuance\": \"\",\n \"foreignPassportNumber\": \"\",\n \"i94AdmissionNumber\": \"\",\n \"i9DateVerified\": \"\",\n \"i9Notes\": \"\",\n \"isI9Verified\": false,\n \"isSsnVerified\": false,\n \"ssnDateVerified\": \"\",\n \"ssnNotes\": \"\",\n \"visaType\": \"\",\n \"workAuthorization\": \"\",\n \"workUntil\": \"\"\n }\n ]\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/weblinkstaging/companies/:companyId/employees/newemployees";
let payload = json!({
"additionalDirectDeposit": (
json!({
"accountNumber": "",
"accountType": "",
"amount": "",
"amountType": "",
"isSkipPreNote": false,
"preNoteDate": "",
"routingNumber": ""
})
),
"benefitSetup": (
json!({
"benefitClass": "",
"benefitClassEffectiveDate": "",
"benefitSalary": "",
"benefitSalaryEffectiveDate": "",
"doNotApplyAdministrativePeriod": false,
"isMeasureAcaEligibility": false
})
),
"birthDate": "",
"customBooleanFields": (
json!({
"category": "",
"label": "",
"value": false
})
),
"customDateFields": (
json!({
"category": "",
"label": "",
"value": ""
})
),
"customDropDownFields": (
json!({
"category": "",
"label": "",
"value": ""
})
),
"customNumberFields": (
json!({
"category": "",
"label": "",
"value": ""
})
),
"customTextFields": (
json!({
"category": "",
"label": "",
"value": ""
})
),
"departmentPosition": (
json!({
"changeReason": "",
"clockBadgeNumber": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"employeeType": "",
"equalEmploymentOpportunityClass": "",
"isMinimumWageExempt": false,
"isOvertimeExempt": false,
"isSupervisorReviewer": false,
"isUnionDuesCollected": false,
"isUnionInitiationCollected": false,
"jobTitle": "",
"payGroup": "",
"positionCode": "",
"shift": "",
"supervisorCompanyNumber": "",
"supervisorEmployeeId": "",
"tipped": "",
"unionAffiliationDate": "",
"unionCode": "",
"unionPosition": "",
"workersCompensation": ""
})
),
"disabilityDescription": "",
"employeeId": "",
"ethnicity": "",
"federalTax": (
json!({
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"taxCalculationCode": "",
"w4FormYear": 0
})
),
"firstName": "",
"fitwExemptReason": "",
"futaExemptReason": "",
"gender": "",
"homeAddress": (
json!({
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"mobilePhone": "",
"phone": "",
"postalCode": "",
"state": ""
})
),
"isEmployee943": false,
"isSmoker": false,
"lastName": "",
"localTax": (
json!({
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"residentPSD": "",
"taxCode": "",
"workPSD": ""
})
),
"mainDirectDeposit": (
json!({
"accountNumber": "",
"accountType": "",
"isSkipPreNote": false,
"preNoteDate": "",
"routingNumber": ""
})
),
"maritalStatus": "",
"medExemptReason": "",
"middleName": "",
"nonPrimaryStateTax": (
json!({
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"reciprocityCode": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
})
),
"preferredName": "",
"primaryPayRate": (
json!({
"baseRate": "",
"changeReason": "",
"defaultHours": "",
"effectiveDate": "",
"isAutoPay": false,
"payFrequency": "",
"payGrade": "",
"payType": "",
"ratePer": "",
"salary": ""
})
),
"primaryStateTax": (
json!({
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
})
),
"priorLastName": "",
"salutation": "",
"sitwExemptReason": "",
"ssExemptReason": "",
"ssn": "",
"status": (
json!({
"adjustedSeniorityDate": "",
"changeReason": "",
"effectiveDate": "",
"employeeStatus": "",
"hireDate": "",
"isEligibleForRehire": false
})
),
"suffix": "",
"suiExemptReason": "",
"suiState": "",
"taxDistributionCode1099R": "",
"taxForm": "",
"veteranDescription": "",
"webTime": json!({
"badgeNumber": "",
"chargeRate": "",
"isTimeLaborEnabled": false
}),
"workAddress": (
json!({
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"mobilePhone": "",
"pager": "",
"phone": "",
"phoneExtension": "",
"postalCode": "",
"state": ""
})
),
"workEligibility": (
json!({
"alienOrAdmissionDocumentNumber": "",
"attestedDate": "",
"countryOfIssuance": "",
"foreignPassportNumber": "",
"i94AdmissionNumber": "",
"i9DateVerified": "",
"i9Notes": "",
"isI9Verified": false,
"isSsnVerified": false,
"ssnDateVerified": "",
"ssnNotes": "",
"visaType": "",
"workAuthorization": "",
"workUntil": ""
})
)
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v2/weblinkstaging/companies/:companyId/employees/newemployees \
--header 'content-type: application/json' \
--data '{
"additionalDirectDeposit": [
{
"accountNumber": "",
"accountType": "",
"amount": "",
"amountType": "",
"isSkipPreNote": false,
"preNoteDate": "",
"routingNumber": ""
}
],
"benefitSetup": [
{
"benefitClass": "",
"benefitClassEffectiveDate": "",
"benefitSalary": "",
"benefitSalaryEffectiveDate": "",
"doNotApplyAdministrativePeriod": false,
"isMeasureAcaEligibility": false
}
],
"birthDate": "",
"customBooleanFields": [
{
"category": "",
"label": "",
"value": false
}
],
"customDateFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customDropDownFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customNumberFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customTextFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"departmentPosition": [
{
"changeReason": "",
"clockBadgeNumber": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"employeeType": "",
"equalEmploymentOpportunityClass": "",
"isMinimumWageExempt": false,
"isOvertimeExempt": false,
"isSupervisorReviewer": false,
"isUnionDuesCollected": false,
"isUnionInitiationCollected": false,
"jobTitle": "",
"payGroup": "",
"positionCode": "",
"shift": "",
"supervisorCompanyNumber": "",
"supervisorEmployeeId": "",
"tipped": "",
"unionAffiliationDate": "",
"unionCode": "",
"unionPosition": "",
"workersCompensation": ""
}
],
"disabilityDescription": "",
"employeeId": "",
"ethnicity": "",
"federalTax": [
{
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"taxCalculationCode": "",
"w4FormYear": 0
}
],
"firstName": "",
"fitwExemptReason": "",
"futaExemptReason": "",
"gender": "",
"homeAddress": [
{
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"mobilePhone": "",
"phone": "",
"postalCode": "",
"state": ""
}
],
"isEmployee943": false,
"isSmoker": false,
"lastName": "",
"localTax": [
{
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"residentPSD": "",
"taxCode": "",
"workPSD": ""
}
],
"mainDirectDeposit": [
{
"accountNumber": "",
"accountType": "",
"isSkipPreNote": false,
"preNoteDate": "",
"routingNumber": ""
}
],
"maritalStatus": "",
"medExemptReason": "",
"middleName": "",
"nonPrimaryStateTax": [
{
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"reciprocityCode": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
}
],
"preferredName": "",
"primaryPayRate": [
{
"baseRate": "",
"changeReason": "",
"defaultHours": "",
"effectiveDate": "",
"isAutoPay": false,
"payFrequency": "",
"payGrade": "",
"payType": "",
"ratePer": "",
"salary": ""
}
],
"primaryStateTax": [
{
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
}
],
"priorLastName": "",
"salutation": "",
"sitwExemptReason": "",
"ssExemptReason": "",
"ssn": "",
"status": [
{
"adjustedSeniorityDate": "",
"changeReason": "",
"effectiveDate": "",
"employeeStatus": "",
"hireDate": "",
"isEligibleForRehire": false
}
],
"suffix": "",
"suiExemptReason": "",
"suiState": "",
"taxDistributionCode1099R": "",
"taxForm": "",
"veteranDescription": "",
"webTime": {
"badgeNumber": "",
"chargeRate": "",
"isTimeLaborEnabled": false
},
"workAddress": [
{
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"mobilePhone": "",
"pager": "",
"phone": "",
"phoneExtension": "",
"postalCode": "",
"state": ""
}
],
"workEligibility": [
{
"alienOrAdmissionDocumentNumber": "",
"attestedDate": "",
"countryOfIssuance": "",
"foreignPassportNumber": "",
"i94AdmissionNumber": "",
"i9DateVerified": "",
"i9Notes": "",
"isI9Verified": false,
"isSsnVerified": false,
"ssnDateVerified": "",
"ssnNotes": "",
"visaType": "",
"workAuthorization": "",
"workUntil": ""
}
]
}'
echo '{
"additionalDirectDeposit": [
{
"accountNumber": "",
"accountType": "",
"amount": "",
"amountType": "",
"isSkipPreNote": false,
"preNoteDate": "",
"routingNumber": ""
}
],
"benefitSetup": [
{
"benefitClass": "",
"benefitClassEffectiveDate": "",
"benefitSalary": "",
"benefitSalaryEffectiveDate": "",
"doNotApplyAdministrativePeriod": false,
"isMeasureAcaEligibility": false
}
],
"birthDate": "",
"customBooleanFields": [
{
"category": "",
"label": "",
"value": false
}
],
"customDateFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customDropDownFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customNumberFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"customTextFields": [
{
"category": "",
"label": "",
"value": ""
}
],
"departmentPosition": [
{
"changeReason": "",
"clockBadgeNumber": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"employeeType": "",
"equalEmploymentOpportunityClass": "",
"isMinimumWageExempt": false,
"isOvertimeExempt": false,
"isSupervisorReviewer": false,
"isUnionDuesCollected": false,
"isUnionInitiationCollected": false,
"jobTitle": "",
"payGroup": "",
"positionCode": "",
"shift": "",
"supervisorCompanyNumber": "",
"supervisorEmployeeId": "",
"tipped": "",
"unionAffiliationDate": "",
"unionCode": "",
"unionPosition": "",
"workersCompensation": ""
}
],
"disabilityDescription": "",
"employeeId": "",
"ethnicity": "",
"federalTax": [
{
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"taxCalculationCode": "",
"w4FormYear": 0
}
],
"firstName": "",
"fitwExemptReason": "",
"futaExemptReason": "",
"gender": "",
"homeAddress": [
{
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"mobilePhone": "",
"phone": "",
"postalCode": "",
"state": ""
}
],
"isEmployee943": false,
"isSmoker": false,
"lastName": "",
"localTax": [
{
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"residentPSD": "",
"taxCode": "",
"workPSD": ""
}
],
"mainDirectDeposit": [
{
"accountNumber": "",
"accountType": "",
"isSkipPreNote": false,
"preNoteDate": "",
"routingNumber": ""
}
],
"maritalStatus": "",
"medExemptReason": "",
"middleName": "",
"nonPrimaryStateTax": [
{
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"reciprocityCode": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
}
],
"preferredName": "",
"primaryPayRate": [
{
"baseRate": "",
"changeReason": "",
"defaultHours": "",
"effectiveDate": "",
"isAutoPay": false,
"payFrequency": "",
"payGrade": "",
"payType": "",
"ratePer": "",
"salary": ""
}
],
"primaryStateTax": [
{
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
}
],
"priorLastName": "",
"salutation": "",
"sitwExemptReason": "",
"ssExemptReason": "",
"ssn": "",
"status": [
{
"adjustedSeniorityDate": "",
"changeReason": "",
"effectiveDate": "",
"employeeStatus": "",
"hireDate": "",
"isEligibleForRehire": false
}
],
"suffix": "",
"suiExemptReason": "",
"suiState": "",
"taxDistributionCode1099R": "",
"taxForm": "",
"veteranDescription": "",
"webTime": {
"badgeNumber": "",
"chargeRate": "",
"isTimeLaborEnabled": false
},
"workAddress": [
{
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"mobilePhone": "",
"pager": "",
"phone": "",
"phoneExtension": "",
"postalCode": "",
"state": ""
}
],
"workEligibility": [
{
"alienOrAdmissionDocumentNumber": "",
"attestedDate": "",
"countryOfIssuance": "",
"foreignPassportNumber": "",
"i94AdmissionNumber": "",
"i9DateVerified": "",
"i9Notes": "",
"isI9Verified": false,
"isSsnVerified": false,
"ssnDateVerified": "",
"ssnNotes": "",
"visaType": "",
"workAuthorization": "",
"workUntil": ""
}
]
}' | \
http POST {{baseUrl}}/v2/weblinkstaging/companies/:companyId/employees/newemployees \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "additionalDirectDeposit": [\n {\n "accountNumber": "",\n "accountType": "",\n "amount": "",\n "amountType": "",\n "isSkipPreNote": false,\n "preNoteDate": "",\n "routingNumber": ""\n }\n ],\n "benefitSetup": [\n {\n "benefitClass": "",\n "benefitClassEffectiveDate": "",\n "benefitSalary": "",\n "benefitSalaryEffectiveDate": "",\n "doNotApplyAdministrativePeriod": false,\n "isMeasureAcaEligibility": false\n }\n ],\n "birthDate": "",\n "customBooleanFields": [\n {\n "category": "",\n "label": "",\n "value": false\n }\n ],\n "customDateFields": [\n {\n "category": "",\n "label": "",\n "value": ""\n }\n ],\n "customDropDownFields": [\n {\n "category": "",\n "label": "",\n "value": ""\n }\n ],\n "customNumberFields": [\n {\n "category": "",\n "label": "",\n "value": ""\n }\n ],\n "customTextFields": [\n {\n "category": "",\n "label": "",\n "value": ""\n }\n ],\n "departmentPosition": [\n {\n "changeReason": "",\n "clockBadgeNumber": "",\n "costCenter1": "",\n "costCenter2": "",\n "costCenter3": "",\n "effectiveDate": "",\n "employeeType": "",\n "equalEmploymentOpportunityClass": "",\n "isMinimumWageExempt": false,\n "isOvertimeExempt": false,\n "isSupervisorReviewer": false,\n "isUnionDuesCollected": false,\n "isUnionInitiationCollected": false,\n "jobTitle": "",\n "payGroup": "",\n "positionCode": "",\n "shift": "",\n "supervisorCompanyNumber": "",\n "supervisorEmployeeId": "",\n "tipped": "",\n "unionAffiliationDate": "",\n "unionCode": "",\n "unionPosition": "",\n "workersCompensation": ""\n }\n ],\n "disabilityDescription": "",\n "employeeId": "",\n "ethnicity": "",\n "federalTax": [\n {\n "amount": "",\n "deductionsAmount": "",\n "dependentsAmount": "",\n "exemptions": "",\n "filingStatus": "",\n "higherRate": false,\n "otherIncomeAmount": "",\n "percentage": "",\n "taxCalculationCode": "",\n "w4FormYear": 0\n }\n ],\n "firstName": "",\n "fitwExemptReason": "",\n "futaExemptReason": "",\n "gender": "",\n "homeAddress": [\n {\n "address1": "",\n "address2": "",\n "city": "",\n "country": "",\n "county": "",\n "emailAddress": "",\n "mobilePhone": "",\n "phone": "",\n "postalCode": "",\n "state": ""\n }\n ],\n "isEmployee943": false,\n "isSmoker": false,\n "lastName": "",\n "localTax": [\n {\n "exemptions": "",\n "exemptions2": "",\n "filingStatus": "",\n "residentPSD": "",\n "taxCode": "",\n "workPSD": ""\n }\n ],\n "mainDirectDeposit": [\n {\n "accountNumber": "",\n "accountType": "",\n "isSkipPreNote": false,\n "preNoteDate": "",\n "routingNumber": ""\n }\n ],\n "maritalStatus": "",\n "medExemptReason": "",\n "middleName": "",\n "nonPrimaryStateTax": [\n {\n "amount": "",\n "deductionsAmount": "",\n "dependentsAmount": "",\n "exemptions": "",\n "exemptions2": "",\n "filingStatus": "",\n "higherRate": false,\n "otherIncomeAmount": "",\n "percentage": "",\n "reciprocityCode": "",\n "specialCheckCalc": "",\n "taxCalculationCode": "",\n "taxCode": "",\n "w4FormYear": 0\n }\n ],\n "preferredName": "",\n "primaryPayRate": [\n {\n "baseRate": "",\n "changeReason": "",\n "defaultHours": "",\n "effectiveDate": "",\n "isAutoPay": false,\n "payFrequency": "",\n "payGrade": "",\n "payType": "",\n "ratePer": "",\n "salary": ""\n }\n ],\n "primaryStateTax": [\n {\n "amount": "",\n "deductionsAmount": "",\n "dependentsAmount": "",\n "exemptions": "",\n "exemptions2": "",\n "filingStatus": "",\n "higherRate": false,\n "otherIncomeAmount": "",\n "percentage": "",\n "specialCheckCalc": "",\n "taxCalculationCode": "",\n "taxCode": "",\n "w4FormYear": 0\n }\n ],\n "priorLastName": "",\n "salutation": "",\n "sitwExemptReason": "",\n "ssExemptReason": "",\n "ssn": "",\n "status": [\n {\n "adjustedSeniorityDate": "",\n "changeReason": "",\n "effectiveDate": "",\n "employeeStatus": "",\n "hireDate": "",\n "isEligibleForRehire": false\n }\n ],\n "suffix": "",\n "suiExemptReason": "",\n "suiState": "",\n "taxDistributionCode1099R": "",\n "taxForm": "",\n "veteranDescription": "",\n "webTime": {\n "badgeNumber": "",\n "chargeRate": "",\n "isTimeLaborEnabled": false\n },\n "workAddress": [\n {\n "address1": "",\n "address2": "",\n "city": "",\n "country": "",\n "county": "",\n "emailAddress": "",\n "mobilePhone": "",\n "pager": "",\n "phone": "",\n "phoneExtension": "",\n "postalCode": "",\n "state": ""\n }\n ],\n "workEligibility": [\n {\n "alienOrAdmissionDocumentNumber": "",\n "attestedDate": "",\n "countryOfIssuance": "",\n "foreignPassportNumber": "",\n "i94AdmissionNumber": "",\n "i9DateVerified": "",\n "i9Notes": "",\n "isI9Verified": false,\n "isSsnVerified": false,\n "ssnDateVerified": "",\n "ssnNotes": "",\n "visaType": "",\n "workAuthorization": "",\n "workUntil": ""\n }\n ]\n}' \
--output-document \
- {{baseUrl}}/v2/weblinkstaging/companies/:companyId/employees/newemployees
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"additionalDirectDeposit": [
[
"accountNumber": "",
"accountType": "",
"amount": "",
"amountType": "",
"isSkipPreNote": false,
"preNoteDate": "",
"routingNumber": ""
]
],
"benefitSetup": [
[
"benefitClass": "",
"benefitClassEffectiveDate": "",
"benefitSalary": "",
"benefitSalaryEffectiveDate": "",
"doNotApplyAdministrativePeriod": false,
"isMeasureAcaEligibility": false
]
],
"birthDate": "",
"customBooleanFields": [
[
"category": "",
"label": "",
"value": false
]
],
"customDateFields": [
[
"category": "",
"label": "",
"value": ""
]
],
"customDropDownFields": [
[
"category": "",
"label": "",
"value": ""
]
],
"customNumberFields": [
[
"category": "",
"label": "",
"value": ""
]
],
"customTextFields": [
[
"category": "",
"label": "",
"value": ""
]
],
"departmentPosition": [
[
"changeReason": "",
"clockBadgeNumber": "",
"costCenter1": "",
"costCenter2": "",
"costCenter3": "",
"effectiveDate": "",
"employeeType": "",
"equalEmploymentOpportunityClass": "",
"isMinimumWageExempt": false,
"isOvertimeExempt": false,
"isSupervisorReviewer": false,
"isUnionDuesCollected": false,
"isUnionInitiationCollected": false,
"jobTitle": "",
"payGroup": "",
"positionCode": "",
"shift": "",
"supervisorCompanyNumber": "",
"supervisorEmployeeId": "",
"tipped": "",
"unionAffiliationDate": "",
"unionCode": "",
"unionPosition": "",
"workersCompensation": ""
]
],
"disabilityDescription": "",
"employeeId": "",
"ethnicity": "",
"federalTax": [
[
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"taxCalculationCode": "",
"w4FormYear": 0
]
],
"firstName": "",
"fitwExemptReason": "",
"futaExemptReason": "",
"gender": "",
"homeAddress": [
[
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"mobilePhone": "",
"phone": "",
"postalCode": "",
"state": ""
]
],
"isEmployee943": false,
"isSmoker": false,
"lastName": "",
"localTax": [
[
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"residentPSD": "",
"taxCode": "",
"workPSD": ""
]
],
"mainDirectDeposit": [
[
"accountNumber": "",
"accountType": "",
"isSkipPreNote": false,
"preNoteDate": "",
"routingNumber": ""
]
],
"maritalStatus": "",
"medExemptReason": "",
"middleName": "",
"nonPrimaryStateTax": [
[
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"reciprocityCode": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
]
],
"preferredName": "",
"primaryPayRate": [
[
"baseRate": "",
"changeReason": "",
"defaultHours": "",
"effectiveDate": "",
"isAutoPay": false,
"payFrequency": "",
"payGrade": "",
"payType": "",
"ratePer": "",
"salary": ""
]
],
"primaryStateTax": [
[
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
]
],
"priorLastName": "",
"salutation": "",
"sitwExemptReason": "",
"ssExemptReason": "",
"ssn": "",
"status": [
[
"adjustedSeniorityDate": "",
"changeReason": "",
"effectiveDate": "",
"employeeStatus": "",
"hireDate": "",
"isEligibleForRehire": false
]
],
"suffix": "",
"suiExemptReason": "",
"suiState": "",
"taxDistributionCode1099R": "",
"taxForm": "",
"veteranDescription": "",
"webTime": [
"badgeNumber": "",
"chargeRate": "",
"isTimeLaborEnabled": false
],
"workAddress": [
[
"address1": "",
"address2": "",
"city": "",
"country": "",
"county": "",
"emailAddress": "",
"mobilePhone": "",
"pager": "",
"phone": "",
"phoneExtension": "",
"postalCode": "",
"state": ""
]
],
"workEligibility": [
[
"alienOrAdmissionDocumentNumber": "",
"attestedDate": "",
"countryOfIssuance": "",
"foreignPassportNumber": "",
"i94AdmissionNumber": "",
"i9DateVerified": "",
"i9Notes": "",
"isI9Verified": false,
"isSsnVerified": false,
"ssnDateVerified": "",
"ssnNotes": "",
"visaType": "",
"workAuthorization": "",
"workUntil": ""
]
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/weblinkstaging/companies/:companyId/employees/newemployees")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
POST
Add new local tax
{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes
QUERY PARAMS
companyId
employeeId
BODY json
{
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"residentPSD": "",
"taxCode": "",
"workPSD": ""
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/post "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes" {:content-type :json
:form-params {:exemptions ""
:exemptions2 ""
:filingStatus ""
:residentPSD ""
:taxCode ""
:workPSD ""}})
require "http/client"
url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n}"
response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes"),
Content = new StringContent("{\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes"
payload := strings.NewReader("{\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
POST /baseUrl/v2/companies/:companyId/employees/:employeeId/localTaxes HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 120
{
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"residentPSD": "",
"taxCode": "",
"workPSD": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes")
.setHeader("content-type", "application/json")
.setBody("{\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes"))
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("{\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes")
.post(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes")
.header("content-type", "application/json")
.body("{\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n}")
.asString();
const data = JSON.stringify({
exemptions: '',
exemptions2: '',
filingStatus: '',
residentPSD: '',
taxCode: '',
workPSD: ''
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('POST', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes',
headers: {'content-type': 'application/json'},
data: {
exemptions: '',
exemptions2: '',
filingStatus: '',
residentPSD: '',
taxCode: '',
workPSD: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"exemptions":"","exemptions2":"","filingStatus":"","residentPSD":"","taxCode":"","workPSD":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes',
method: 'POST',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "exemptions": "",\n "exemptions2": "",\n "filingStatus": "",\n "residentPSD": "",\n "taxCode": "",\n "workPSD": ""\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes")
.post(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'POST',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/companies/:companyId/employees/:employeeId/localTaxes',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
exemptions: '',
exemptions2: '',
filingStatus: '',
residentPSD: '',
taxCode: '',
workPSD: ''
}));
req.end();
const request = require('request');
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes',
headers: {'content-type': 'application/json'},
body: {
exemptions: '',
exemptions2: '',
filingStatus: '',
residentPSD: '',
taxCode: '',
workPSD: ''
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('POST', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
exemptions: '',
exemptions2: '',
filingStatus: '',
residentPSD: '',
taxCode: '',
workPSD: ''
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'POST',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes',
headers: {'content-type': 'application/json'},
data: {
exemptions: '',
exemptions2: '',
filingStatus: '',
residentPSD: '',
taxCode: '',
workPSD: ''
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes';
const options = {
method: 'POST',
headers: {'content-type': 'application/json'},
body: '{"exemptions":"","exemptions2":"","filingStatus":"","residentPSD":"","taxCode":"","workPSD":""}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"exemptions": @"",
@"exemptions2": @"",
@"filingStatus": @"",
@"residentPSD": @"",
@"taxCode": @"",
@"workPSD": @"" };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n}" in
Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes",
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([
'exemptions' => '',
'exemptions2' => '',
'filingStatus' => '',
'residentPSD' => '',
'taxCode' => '',
'workPSD' => ''
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('POST', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes', [
'body' => '{
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"residentPSD": "",
"taxCode": "",
"workPSD": ""
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes');
$request->setMethod(HTTP_METH_POST);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'exemptions' => '',
'exemptions2' => '',
'filingStatus' => '',
'residentPSD' => '',
'taxCode' => '',
'workPSD' => ''
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'exemptions' => '',
'exemptions2' => '',
'filingStatus' => '',
'residentPSD' => '',
'taxCode' => '',
'workPSD' => ''
]));
$request->setRequestUrl('{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes');
$request->setRequestMethod('POST');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"residentPSD": "",
"taxCode": "",
"workPSD": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"residentPSD": "",
"taxCode": "",
"workPSD": ""
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n}"
headers = { 'content-type': "application/json" }
conn.request("POST", "/baseUrl/v2/companies/:companyId/employees/:employeeId/localTaxes", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes"
payload = {
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"residentPSD": "",
"taxCode": "",
"workPSD": ""
}
headers = {"content-type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes"
payload <- "{\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n}"
encode <- "json"
response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.post('/baseUrl/v2/companies/:companyId/employees/:employeeId/localTaxes') do |req|
req.body = "{\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"residentPSD\": \"\",\n \"taxCode\": \"\",\n \"workPSD\": \"\"\n}"
end
puts response.status
puts response.body
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes";
let payload = json!({
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"residentPSD": "",
"taxCode": "",
"workPSD": ""
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.post(url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request POST \
--url {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes \
--header 'content-type: application/json' \
--data '{
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"residentPSD": "",
"taxCode": "",
"workPSD": ""
}'
echo '{
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"residentPSD": "",
"taxCode": "",
"workPSD": ""
}' | \
http POST {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes \
content-type:application/json
wget --quiet \
--method POST \
--header 'content-type: application/json' \
--body-data '{\n "exemptions": "",\n "exemptions2": "",\n "filingStatus": "",\n "residentPSD": "",\n "taxCode": "",\n "workPSD": ""\n}' \
--output-document \
- {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"residentPSD": "",
"taxCode": "",
"workPSD": ""
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
DELETE
Delete local tax by tax code
{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode
QUERY PARAMS
companyId
employeeId
taxCode
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/delete "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode")
require "http/client"
url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode"
response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Delete,
RequestUri = new Uri("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode"
req, _ := http.NewRequest("DELETE", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
DELETE /baseUrl/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode"))
.method("DELETE", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode")
.delete(null)
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('DELETE', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode',
method: 'DELETE',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode")
.delete(null)
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'DELETE',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('DELETE', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'DELETE',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode';
const options = {method: 'DELETE'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode" in
Client.call `DELETE uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('DELETE', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode');
$request->setMethod(HTTP_METH_DELETE);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode' -Method DELETE
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode' -Method DELETE
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("DELETE", "/baseUrl/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode"
response = requests.delete(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode"
response <- VERB("DELETE", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.delete('/baseUrl/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode') do |req|
end
puts response.status
puts response.body
use std::str::FromStr;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode";
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request DELETE \
--url {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode
http DELETE {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode
wget --quiet \
--method DELETE \
--output-document \
- {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "DELETE"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Get all local taxes
{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes
QUERY PARAMS
companyId
employeeId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes")
require "http/client"
url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v2/companies/:companyId/employees/:employeeId/localTaxes HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/companies/:companyId/employees/:employeeId/localTaxes',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v2/companies/:companyId/employees/:employeeId/localTaxes")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v2/companies/:companyId/employees/:employeeId/localTaxes') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes
http GET {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Get local taxes by tax code
{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode
QUERY PARAMS
companyId
employeeId
taxCode
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode")
require "http/client"
url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode
http GET {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/localTaxes/:taxCode")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
Add-update non-primary state tax
{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/nonprimaryStateTax
QUERY PARAMS
companyId
employeeId
BODY json
{
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"reciprocityCode": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/nonprimaryStateTax");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/nonprimaryStateTax" {:content-type :json
:form-params {:amount ""
:deductionsAmount ""
:dependentsAmount ""
:exemptions ""
:exemptions2 ""
:filingStatus ""
:higherRate false
:otherIncomeAmount ""
:percentage ""
:reciprocityCode ""
:specialCheckCalc ""
:taxCalculationCode ""
:taxCode ""
:w4FormYear 0}})
require "http/client"
url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/nonprimaryStateTax"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/nonprimaryStateTax"),
Content = new StringContent("{\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/nonprimaryStateTax");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/nonprimaryStateTax"
payload := strings.NewReader("{\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/v2/companies/:companyId/employees/:employeeId/nonprimaryStateTax HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 318
{
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"reciprocityCode": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/nonprimaryStateTax")
.setHeader("content-type", "application/json")
.setBody("{\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/nonprimaryStateTax"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/nonprimaryStateTax")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/nonprimaryStateTax")
.header("content-type", "application/json")
.body("{\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n}")
.asString();
const data = JSON.stringify({
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
exemptions2: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
reciprocityCode: '',
specialCheckCalc: '',
taxCalculationCode: '',
taxCode: '',
w4FormYear: 0
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/nonprimaryStateTax');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/nonprimaryStateTax',
headers: {'content-type': 'application/json'},
data: {
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
exemptions2: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
reciprocityCode: '',
specialCheckCalc: '',
taxCalculationCode: '',
taxCode: '',
w4FormYear: 0
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/nonprimaryStateTax';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"amount":"","deductionsAmount":"","dependentsAmount":"","exemptions":"","exemptions2":"","filingStatus":"","higherRate":false,"otherIncomeAmount":"","percentage":"","reciprocityCode":"","specialCheckCalc":"","taxCalculationCode":"","taxCode":"","w4FormYear":0}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/nonprimaryStateTax',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "amount": "",\n "deductionsAmount": "",\n "dependentsAmount": "",\n "exemptions": "",\n "exemptions2": "",\n "filingStatus": "",\n "higherRate": false,\n "otherIncomeAmount": "",\n "percentage": "",\n "reciprocityCode": "",\n "specialCheckCalc": "",\n "taxCalculationCode": "",\n "taxCode": "",\n "w4FormYear": 0\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/nonprimaryStateTax")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/companies/:companyId/employees/:employeeId/nonprimaryStateTax',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
exemptions2: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
reciprocityCode: '',
specialCheckCalc: '',
taxCalculationCode: '',
taxCode: '',
w4FormYear: 0
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/nonprimaryStateTax',
headers: {'content-type': 'application/json'},
body: {
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
exemptions2: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
reciprocityCode: '',
specialCheckCalc: '',
taxCalculationCode: '',
taxCode: '',
w4FormYear: 0
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/nonprimaryStateTax');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
exemptions2: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
reciprocityCode: '',
specialCheckCalc: '',
taxCalculationCode: '',
taxCode: '',
w4FormYear: 0
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/nonprimaryStateTax',
headers: {'content-type': 'application/json'},
data: {
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
exemptions2: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
reciprocityCode: '',
specialCheckCalc: '',
taxCalculationCode: '',
taxCode: '',
w4FormYear: 0
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/nonprimaryStateTax';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"amount":"","deductionsAmount":"","dependentsAmount":"","exemptions":"","exemptions2":"","filingStatus":"","higherRate":false,"otherIncomeAmount":"","percentage":"","reciprocityCode":"","specialCheckCalc":"","taxCalculationCode":"","taxCode":"","w4FormYear":0}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"amount": @"",
@"deductionsAmount": @"",
@"dependentsAmount": @"",
@"exemptions": @"",
@"exemptions2": @"",
@"filingStatus": @"",
@"higherRate": @NO,
@"otherIncomeAmount": @"",
@"percentage": @"",
@"reciprocityCode": @"",
@"specialCheckCalc": @"",
@"taxCalculationCode": @"",
@"taxCode": @"",
@"w4FormYear": @0 };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/nonprimaryStateTax"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/nonprimaryStateTax" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/nonprimaryStateTax",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'amount' => '',
'deductionsAmount' => '',
'dependentsAmount' => '',
'exemptions' => '',
'exemptions2' => '',
'filingStatus' => '',
'higherRate' => null,
'otherIncomeAmount' => '',
'percentage' => '',
'reciprocityCode' => '',
'specialCheckCalc' => '',
'taxCalculationCode' => '',
'taxCode' => '',
'w4FormYear' => 0
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/nonprimaryStateTax', [
'body' => '{
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"reciprocityCode": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/nonprimaryStateTax');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'amount' => '',
'deductionsAmount' => '',
'dependentsAmount' => '',
'exemptions' => '',
'exemptions2' => '',
'filingStatus' => '',
'higherRate' => null,
'otherIncomeAmount' => '',
'percentage' => '',
'reciprocityCode' => '',
'specialCheckCalc' => '',
'taxCalculationCode' => '',
'taxCode' => '',
'w4FormYear' => 0
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'amount' => '',
'deductionsAmount' => '',
'dependentsAmount' => '',
'exemptions' => '',
'exemptions2' => '',
'filingStatus' => '',
'higherRate' => null,
'otherIncomeAmount' => '',
'percentage' => '',
'reciprocityCode' => '',
'specialCheckCalc' => '',
'taxCalculationCode' => '',
'taxCode' => '',
'w4FormYear' => 0
]));
$request->setRequestUrl('{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/nonprimaryStateTax');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/nonprimaryStateTax' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"reciprocityCode": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/nonprimaryStateTax' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"reciprocityCode": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v2/companies/:companyId/employees/:employeeId/nonprimaryStateTax", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/nonprimaryStateTax"
payload = {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": False,
"otherIncomeAmount": "",
"percentage": "",
"reciprocityCode": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/nonprimaryStateTax"
payload <- "{\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/nonprimaryStateTax")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/v2/companies/:companyId/employees/:employeeId/nonprimaryStateTax') do |req|
req.body = "{\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"reciprocityCode\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/nonprimaryStateTax";
let payload = json!({
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"reciprocityCode": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/nonprimaryStateTax \
--header 'content-type: application/json' \
--data '{
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"reciprocityCode": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
}'
echo '{
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"reciprocityCode": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
}' | \
http PUT {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/nonprimaryStateTax \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "amount": "",\n "deductionsAmount": "",\n "dependentsAmount": "",\n "exemptions": "",\n "exemptions2": "",\n "filingStatus": "",\n "higherRate": false,\n "otherIncomeAmount": "",\n "percentage": "",\n "reciprocityCode": "",\n "specialCheckCalc": "",\n "taxCalculationCode": "",\n "taxCode": "",\n "w4FormYear": 0\n}' \
--output-document \
- {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/nonprimaryStateTax
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"reciprocityCode": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/nonprimaryStateTax")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Get employee pay statement details data for the specified year and check date.
{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year/:checkDate
QUERY PARAMS
companyId
employeeId
year
checkDate
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year/:checkDate");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year/:checkDate")
require "http/client"
url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year/:checkDate"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year/:checkDate"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year/:checkDate");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year/:checkDate"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year/:checkDate HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year/:checkDate")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year/:checkDate"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year/:checkDate")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year/:checkDate")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year/:checkDate');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year/:checkDate'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year/:checkDate';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year/:checkDate',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year/:checkDate")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year/:checkDate',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year/:checkDate'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year/:checkDate');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year/:checkDate'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year/:checkDate';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year/:checkDate"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year/:checkDate" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year/:checkDate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year/:checkDate');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year/:checkDate');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year/:checkDate');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year/:checkDate' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year/:checkDate' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year/:checkDate")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year/:checkDate"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year/:checkDate"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year/:checkDate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year/:checkDate') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year/:checkDate";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year/:checkDate
http GET {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year/:checkDate
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year/:checkDate
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year/:checkDate")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Get employee pay statement details data for the specified year.
{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year
QUERY PARAMS
companyId
employeeId
year
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year")
require "http/client"
url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year
http GET {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/details/:year")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Get employee pay statement summary data for the specified year and check date.
{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year/:checkDate
QUERY PARAMS
companyId
employeeId
year
checkDate
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year/:checkDate");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year/:checkDate")
require "http/client"
url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year/:checkDate"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year/:checkDate"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year/:checkDate");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year/:checkDate"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year/:checkDate HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year/:checkDate")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year/:checkDate"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year/:checkDate")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year/:checkDate")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year/:checkDate');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year/:checkDate'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year/:checkDate';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year/:checkDate',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year/:checkDate")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year/:checkDate',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year/:checkDate'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year/:checkDate');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year/:checkDate'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year/:checkDate';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year/:checkDate"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year/:checkDate" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year/:checkDate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year/:checkDate');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year/:checkDate');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year/:checkDate');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year/:checkDate' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year/:checkDate' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year/:checkDate")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year/:checkDate"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year/:checkDate"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year/:checkDate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year/:checkDate') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year/:checkDate";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year/:checkDate
http GET {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year/:checkDate
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year/:checkDate
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year/:checkDate")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Get employee pay statement summary data for the specified year.
{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year
QUERY PARAMS
companyId
employeeId
year
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year")
require "http/client"
url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year
http GET {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/paystatement/summary/:year")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
Add-update primary state tax
{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/primaryStateTax
QUERY PARAMS
companyId
employeeId
BODY json
{
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/primaryStateTax");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/primaryStateTax" {:content-type :json
:form-params {:amount ""
:deductionsAmount ""
:dependentsAmount ""
:exemptions ""
:exemptions2 ""
:filingStatus ""
:higherRate false
:otherIncomeAmount ""
:percentage ""
:specialCheckCalc ""
:taxCalculationCode ""
:taxCode ""
:w4FormYear 0}})
require "http/client"
url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/primaryStateTax"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/primaryStateTax"),
Content = new StringContent("{\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/primaryStateTax");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/primaryStateTax"
payload := strings.NewReader("{\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/v2/companies/:companyId/employees/:employeeId/primaryStateTax HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 293
{
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/primaryStateTax")
.setHeader("content-type", "application/json")
.setBody("{\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/primaryStateTax"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/primaryStateTax")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/primaryStateTax")
.header("content-type", "application/json")
.body("{\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n}")
.asString();
const data = JSON.stringify({
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
exemptions2: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
specialCheckCalc: '',
taxCalculationCode: '',
taxCode: '',
w4FormYear: 0
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/primaryStateTax');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/primaryStateTax',
headers: {'content-type': 'application/json'},
data: {
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
exemptions2: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
specialCheckCalc: '',
taxCalculationCode: '',
taxCode: '',
w4FormYear: 0
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/primaryStateTax';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"amount":"","deductionsAmount":"","dependentsAmount":"","exemptions":"","exemptions2":"","filingStatus":"","higherRate":false,"otherIncomeAmount":"","percentage":"","specialCheckCalc":"","taxCalculationCode":"","taxCode":"","w4FormYear":0}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/primaryStateTax',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "amount": "",\n "deductionsAmount": "",\n "dependentsAmount": "",\n "exemptions": "",\n "exemptions2": "",\n "filingStatus": "",\n "higherRate": false,\n "otherIncomeAmount": "",\n "percentage": "",\n "specialCheckCalc": "",\n "taxCalculationCode": "",\n "taxCode": "",\n "w4FormYear": 0\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/primaryStateTax")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/companies/:companyId/employees/:employeeId/primaryStateTax',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
exemptions2: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
specialCheckCalc: '',
taxCalculationCode: '',
taxCode: '',
w4FormYear: 0
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/primaryStateTax',
headers: {'content-type': 'application/json'},
body: {
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
exemptions2: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
specialCheckCalc: '',
taxCalculationCode: '',
taxCode: '',
w4FormYear: 0
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/primaryStateTax');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
exemptions2: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
specialCheckCalc: '',
taxCalculationCode: '',
taxCode: '',
w4FormYear: 0
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/primaryStateTax',
headers: {'content-type': 'application/json'},
data: {
amount: '',
deductionsAmount: '',
dependentsAmount: '',
exemptions: '',
exemptions2: '',
filingStatus: '',
higherRate: false,
otherIncomeAmount: '',
percentage: '',
specialCheckCalc: '',
taxCalculationCode: '',
taxCode: '',
w4FormYear: 0
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/primaryStateTax';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"amount":"","deductionsAmount":"","dependentsAmount":"","exemptions":"","exemptions2":"","filingStatus":"","higherRate":false,"otherIncomeAmount":"","percentage":"","specialCheckCalc":"","taxCalculationCode":"","taxCode":"","w4FormYear":0}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"amount": @"",
@"deductionsAmount": @"",
@"dependentsAmount": @"",
@"exemptions": @"",
@"exemptions2": @"",
@"filingStatus": @"",
@"higherRate": @NO,
@"otherIncomeAmount": @"",
@"percentage": @"",
@"specialCheckCalc": @"",
@"taxCalculationCode": @"",
@"taxCode": @"",
@"w4FormYear": @0 };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/primaryStateTax"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/primaryStateTax" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/primaryStateTax",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'amount' => '',
'deductionsAmount' => '',
'dependentsAmount' => '',
'exemptions' => '',
'exemptions2' => '',
'filingStatus' => '',
'higherRate' => null,
'otherIncomeAmount' => '',
'percentage' => '',
'specialCheckCalc' => '',
'taxCalculationCode' => '',
'taxCode' => '',
'w4FormYear' => 0
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/primaryStateTax', [
'body' => '{
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/primaryStateTax');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'amount' => '',
'deductionsAmount' => '',
'dependentsAmount' => '',
'exemptions' => '',
'exemptions2' => '',
'filingStatus' => '',
'higherRate' => null,
'otherIncomeAmount' => '',
'percentage' => '',
'specialCheckCalc' => '',
'taxCalculationCode' => '',
'taxCode' => '',
'w4FormYear' => 0
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'amount' => '',
'deductionsAmount' => '',
'dependentsAmount' => '',
'exemptions' => '',
'exemptions2' => '',
'filingStatus' => '',
'higherRate' => null,
'otherIncomeAmount' => '',
'percentage' => '',
'specialCheckCalc' => '',
'taxCalculationCode' => '',
'taxCode' => '',
'w4FormYear' => 0
]));
$request->setRequestUrl('{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/primaryStateTax');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/primaryStateTax' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/primaryStateTax' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v2/companies/:companyId/employees/:employeeId/primaryStateTax", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/primaryStateTax"
payload = {
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": False,
"otherIncomeAmount": "",
"percentage": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/primaryStateTax"
payload <- "{\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/primaryStateTax")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/v2/companies/:companyId/employees/:employeeId/primaryStateTax') do |req|
req.body = "{\n \"amount\": \"\",\n \"deductionsAmount\": \"\",\n \"dependentsAmount\": \"\",\n \"exemptions\": \"\",\n \"exemptions2\": \"\",\n \"filingStatus\": \"\",\n \"higherRate\": false,\n \"otherIncomeAmount\": \"\",\n \"percentage\": \"\",\n \"specialCheckCalc\": \"\",\n \"taxCalculationCode\": \"\",\n \"taxCode\": \"\",\n \"w4FormYear\": 0\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/primaryStateTax";
let payload = json!({
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/primaryStateTax \
--header 'content-type: application/json' \
--data '{
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
}'
echo '{
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
}' | \
http PUT {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/primaryStateTax \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "amount": "",\n "deductionsAmount": "",\n "dependentsAmount": "",\n "exemptions": "",\n "exemptions2": "",\n "filingStatus": "",\n "higherRate": false,\n "otherIncomeAmount": "",\n "percentage": "",\n "specialCheckCalc": "",\n "taxCalculationCode": "",\n "taxCode": "",\n "w4FormYear": 0\n}' \
--output-document \
- {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/primaryStateTax
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"amount": "",
"deductionsAmount": "",
"dependentsAmount": "",
"exemptions": "",
"exemptions2": "",
"filingStatus": "",
"higherRate": false,
"otherIncomeAmount": "",
"percentage": "",
"specialCheckCalc": "",
"taxCalculationCode": "",
"taxCode": "",
"w4FormYear": 0
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/primaryStateTax")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
PUT
Add-update sensitive data
{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata
QUERY PARAMS
companyId
employeeId
BODY json
{
"disability": {
"disability": "",
"disabilityClassifications": [
{
"classification": ""
}
],
"hasDisability": ""
},
"ethnicity": {
"ethnicRacialIdentities": [
{
"description": ""
}
],
"ethnicity": ""
},
"gender": {
"displayPronouns": false,
"genderIdentityDescription": "",
"identifyAsLegalGender": "",
"legalGender": "",
"pronouns": "",
"sexualOrientation": ""
},
"veteran": {
"isVeteran": "",
"veteran": ""
}
}
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"disability\": {\n \"disability\": \"\",\n \"disabilityClassifications\": [\n {\n \"classification\": \"\"\n }\n ],\n \"hasDisability\": \"\"\n },\n \"ethnicity\": {\n \"ethnicRacialIdentities\": [\n {\n \"description\": \"\"\n }\n ],\n \"ethnicity\": \"\"\n },\n \"gender\": {\n \"displayPronouns\": false,\n \"genderIdentityDescription\": \"\",\n \"identifyAsLegalGender\": \"\",\n \"legalGender\": \"\",\n \"pronouns\": \"\",\n \"sexualOrientation\": \"\"\n },\n \"veteran\": {\n \"isVeteran\": \"\",\n \"veteran\": \"\"\n }\n}");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/put "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata" {:content-type :json
:form-params {:disability {:disability ""
:disabilityClassifications [{:classification ""}]
:hasDisability ""}
:ethnicity {:ethnicRacialIdentities [{:description ""}]
:ethnicity ""}
:gender {:displayPronouns false
:genderIdentityDescription ""
:identifyAsLegalGender ""
:legalGender ""
:pronouns ""
:sexualOrientation ""}
:veteran {:isVeteran ""
:veteran ""}}})
require "http/client"
url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata"
headers = HTTP::Headers{
"content-type" => "application/json"
}
reqBody = "{\n \"disability\": {\n \"disability\": \"\",\n \"disabilityClassifications\": [\n {\n \"classification\": \"\"\n }\n ],\n \"hasDisability\": \"\"\n },\n \"ethnicity\": {\n \"ethnicRacialIdentities\": [\n {\n \"description\": \"\"\n }\n ],\n \"ethnicity\": \"\"\n },\n \"gender\": {\n \"displayPronouns\": false,\n \"genderIdentityDescription\": \"\",\n \"identifyAsLegalGender\": \"\",\n \"legalGender\": \"\",\n \"pronouns\": \"\",\n \"sexualOrientation\": \"\"\n },\n \"veteran\": {\n \"isVeteran\": \"\",\n \"veteran\": \"\"\n }\n}"
response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Put,
RequestUri = new Uri("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata"),
Content = new StringContent("{\n \"disability\": {\n \"disability\": \"\",\n \"disabilityClassifications\": [\n {\n \"classification\": \"\"\n }\n ],\n \"hasDisability\": \"\"\n },\n \"ethnicity\": {\n \"ethnicRacialIdentities\": [\n {\n \"description\": \"\"\n }\n ],\n \"ethnicity\": \"\"\n },\n \"gender\": {\n \"displayPronouns\": false,\n \"genderIdentityDescription\": \"\",\n \"identifyAsLegalGender\": \"\",\n \"legalGender\": \"\",\n \"pronouns\": \"\",\n \"sexualOrientation\": \"\"\n },\n \"veteran\": {\n \"isVeteran\": \"\",\n \"veteran\": \"\"\n }\n}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n \"disability\": {\n \"disability\": \"\",\n \"disabilityClassifications\": [\n {\n \"classification\": \"\"\n }\n ],\n \"hasDisability\": \"\"\n },\n \"ethnicity\": {\n \"ethnicRacialIdentities\": [\n {\n \"description\": \"\"\n }\n ],\n \"ethnicity\": \"\"\n },\n \"gender\": {\n \"displayPronouns\": false,\n \"genderIdentityDescription\": \"\",\n \"identifyAsLegalGender\": \"\",\n \"legalGender\": \"\",\n \"pronouns\": \"\",\n \"sexualOrientation\": \"\"\n },\n \"veteran\": {\n \"isVeteran\": \"\",\n \"veteran\": \"\"\n }\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata"
payload := strings.NewReader("{\n \"disability\": {\n \"disability\": \"\",\n \"disabilityClassifications\": [\n {\n \"classification\": \"\"\n }\n ],\n \"hasDisability\": \"\"\n },\n \"ethnicity\": {\n \"ethnicRacialIdentities\": [\n {\n \"description\": \"\"\n }\n ],\n \"ethnicity\": \"\"\n },\n \"gender\": {\n \"displayPronouns\": false,\n \"genderIdentityDescription\": \"\",\n \"identifyAsLegalGender\": \"\",\n \"legalGender\": \"\",\n \"pronouns\": \"\",\n \"sexualOrientation\": \"\"\n },\n \"veteran\": {\n \"isVeteran\": \"\",\n \"veteran\": \"\"\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
PUT /baseUrl/v2/companies/:companyId/employees/:employeeId/sensitivedata HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 530
{
"disability": {
"disability": "",
"disabilityClassifications": [
{
"classification": ""
}
],
"hasDisability": ""
},
"ethnicity": {
"ethnicRacialIdentities": [
{
"description": ""
}
],
"ethnicity": ""
},
"gender": {
"displayPronouns": false,
"genderIdentityDescription": "",
"identifyAsLegalGender": "",
"legalGender": "",
"pronouns": "",
"sexualOrientation": ""
},
"veteran": {
"isVeteran": "",
"veteran": ""
}
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata")
.setHeader("content-type", "application/json")
.setBody("{\n \"disability\": {\n \"disability\": \"\",\n \"disabilityClassifications\": [\n {\n \"classification\": \"\"\n }\n ],\n \"hasDisability\": \"\"\n },\n \"ethnicity\": {\n \"ethnicRacialIdentities\": [\n {\n \"description\": \"\"\n }\n ],\n \"ethnicity\": \"\"\n },\n \"gender\": {\n \"displayPronouns\": false,\n \"genderIdentityDescription\": \"\",\n \"identifyAsLegalGender\": \"\",\n \"legalGender\": \"\",\n \"pronouns\": \"\",\n \"sexualOrientation\": \"\"\n },\n \"veteran\": {\n \"isVeteran\": \"\",\n \"veteran\": \"\"\n }\n}")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata"))
.header("content-type", "application/json")
.method("PUT", HttpRequest.BodyPublishers.ofString("{\n \"disability\": {\n \"disability\": \"\",\n \"disabilityClassifications\": [\n {\n \"classification\": \"\"\n }\n ],\n \"hasDisability\": \"\"\n },\n \"ethnicity\": {\n \"ethnicRacialIdentities\": [\n {\n \"description\": \"\"\n }\n ],\n \"ethnicity\": \"\"\n },\n \"gender\": {\n \"displayPronouns\": false,\n \"genderIdentityDescription\": \"\",\n \"identifyAsLegalGender\": \"\",\n \"legalGender\": \"\",\n \"pronouns\": \"\",\n \"sexualOrientation\": \"\"\n },\n \"veteran\": {\n \"isVeteran\": \"\",\n \"veteran\": \"\"\n }\n}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"disability\": {\n \"disability\": \"\",\n \"disabilityClassifications\": [\n {\n \"classification\": \"\"\n }\n ],\n \"hasDisability\": \"\"\n },\n \"ethnicity\": {\n \"ethnicRacialIdentities\": [\n {\n \"description\": \"\"\n }\n ],\n \"ethnicity\": \"\"\n },\n \"gender\": {\n \"displayPronouns\": false,\n \"genderIdentityDescription\": \"\",\n \"identifyAsLegalGender\": \"\",\n \"legalGender\": \"\",\n \"pronouns\": \"\",\n \"sexualOrientation\": \"\"\n },\n \"veteran\": {\n \"isVeteran\": \"\",\n \"veteran\": \"\"\n }\n}");
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata")
.put(body)
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata")
.header("content-type", "application/json")
.body("{\n \"disability\": {\n \"disability\": \"\",\n \"disabilityClassifications\": [\n {\n \"classification\": \"\"\n }\n ],\n \"hasDisability\": \"\"\n },\n \"ethnicity\": {\n \"ethnicRacialIdentities\": [\n {\n \"description\": \"\"\n }\n ],\n \"ethnicity\": \"\"\n },\n \"gender\": {\n \"displayPronouns\": false,\n \"genderIdentityDescription\": \"\",\n \"identifyAsLegalGender\": \"\",\n \"legalGender\": \"\",\n \"pronouns\": \"\",\n \"sexualOrientation\": \"\"\n },\n \"veteran\": {\n \"isVeteran\": \"\",\n \"veteran\": \"\"\n }\n}")
.asString();
const data = JSON.stringify({
disability: {
disability: '',
disabilityClassifications: [
{
classification: ''
}
],
hasDisability: ''
},
ethnicity: {
ethnicRacialIdentities: [
{
description: ''
}
],
ethnicity: ''
},
gender: {
displayPronouns: false,
genderIdentityDescription: '',
identifyAsLegalGender: '',
legalGender: '',
pronouns: '',
sexualOrientation: ''
},
veteran: {
isVeteran: '',
veteran: ''
}
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('PUT', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata');
xhr.setRequestHeader('content-type', 'application/json');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata',
headers: {'content-type': 'application/json'},
data: {
disability: {
disability: '',
disabilityClassifications: [{classification: ''}],
hasDisability: ''
},
ethnicity: {ethnicRacialIdentities: [{description: ''}], ethnicity: ''},
gender: {
displayPronouns: false,
genderIdentityDescription: '',
identifyAsLegalGender: '',
legalGender: '',
pronouns: '',
sexualOrientation: ''
},
veteran: {isVeteran: '', veteran: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"disability":{"disability":"","disabilityClassifications":[{"classification":""}],"hasDisability":""},"ethnicity":{"ethnicRacialIdentities":[{"description":""}],"ethnicity":""},"gender":{"displayPronouns":false,"genderIdentityDescription":"","identifyAsLegalGender":"","legalGender":"","pronouns":"","sexualOrientation":""},"veteran":{"isVeteran":"","veteran":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata',
method: 'PUT',
headers: {
'content-type': 'application/json'
},
processData: false,
data: '{\n "disability": {\n "disability": "",\n "disabilityClassifications": [\n {\n "classification": ""\n }\n ],\n "hasDisability": ""\n },\n "ethnicity": {\n "ethnicRacialIdentities": [\n {\n "description": ""\n }\n ],\n "ethnicity": ""\n },\n "gender": {\n "displayPronouns": false,\n "genderIdentityDescription": "",\n "identifyAsLegalGender": "",\n "legalGender": "",\n "pronouns": "",\n "sexualOrientation": ""\n },\n "veteran": {\n "isVeteran": "",\n "veteran": ""\n }\n}'
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n \"disability\": {\n \"disability\": \"\",\n \"disabilityClassifications\": [\n {\n \"classification\": \"\"\n }\n ],\n \"hasDisability\": \"\"\n },\n \"ethnicity\": {\n \"ethnicRacialIdentities\": [\n {\n \"description\": \"\"\n }\n ],\n \"ethnicity\": \"\"\n },\n \"gender\": {\n \"displayPronouns\": false,\n \"genderIdentityDescription\": \"\",\n \"identifyAsLegalGender\": \"\",\n \"legalGender\": \"\",\n \"pronouns\": \"\",\n \"sexualOrientation\": \"\"\n },\n \"veteran\": {\n \"isVeteran\": \"\",\n \"veteran\": \"\"\n }\n}")
val request = Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata")
.put(body)
.addHeader("content-type", "application/json")
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'PUT',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/companies/:companyId/employees/:employeeId/sensitivedata',
headers: {
'content-type': 'application/json'
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
disability: {
disability: '',
disabilityClassifications: [{classification: ''}],
hasDisability: ''
},
ethnicity: {ethnicRacialIdentities: [{description: ''}], ethnicity: ''},
gender: {
displayPronouns: false,
genderIdentityDescription: '',
identifyAsLegalGender: '',
legalGender: '',
pronouns: '',
sexualOrientation: ''
},
veteran: {isVeteran: '', veteran: ''}
}));
req.end();
const request = require('request');
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata',
headers: {'content-type': 'application/json'},
body: {
disability: {
disability: '',
disabilityClassifications: [{classification: ''}],
hasDisability: ''
},
ethnicity: {ethnicRacialIdentities: [{description: ''}], ethnicity: ''},
gender: {
displayPronouns: false,
genderIdentityDescription: '',
identifyAsLegalGender: '',
legalGender: '',
pronouns: '',
sexualOrientation: ''
},
veteran: {isVeteran: '', veteran: ''}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('PUT', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata');
req.headers({
'content-type': 'application/json'
});
req.type('json');
req.send({
disability: {
disability: '',
disabilityClassifications: [
{
classification: ''
}
],
hasDisability: ''
},
ethnicity: {
ethnicRacialIdentities: [
{
description: ''
}
],
ethnicity: ''
},
gender: {
displayPronouns: false,
genderIdentityDescription: '',
identifyAsLegalGender: '',
legalGender: '',
pronouns: '',
sexualOrientation: ''
},
veteran: {
isVeteran: '',
veteran: ''
}
});
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'PUT',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata',
headers: {'content-type': 'application/json'},
data: {
disability: {
disability: '',
disabilityClassifications: [{classification: ''}],
hasDisability: ''
},
ethnicity: {ethnicRacialIdentities: [{description: ''}], ethnicity: ''},
gender: {
displayPronouns: false,
genderIdentityDescription: '',
identifyAsLegalGender: '',
legalGender: '',
pronouns: '',
sexualOrientation: ''
},
veteran: {isVeteran: '', veteran: ''}
}
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata';
const options = {
method: 'PUT',
headers: {'content-type': 'application/json'},
body: '{"disability":{"disability":"","disabilityClassifications":[{"classification":""}],"hasDisability":""},"ethnicity":{"ethnicRacialIdentities":[{"description":""}],"ethnicity":""},"gender":{"displayPronouns":false,"genderIdentityDescription":"","identifyAsLegalGender":"","legalGender":"","pronouns":"","sexualOrientation":""},"veteran":{"isVeteran":"","veteran":""}}'
};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"disability": @{ @"disability": @"", @"disabilityClassifications": @[ @{ @"classification": @"" } ], @"hasDisability": @"" },
@"ethnicity": @{ @"ethnicRacialIdentities": @[ @{ @"description": @"" } ], @"ethnicity": @"" },
@"gender": @{ @"displayPronouns": @NO, @"genderIdentityDescription": @"", @"identifyAsLegalGender": @"", @"legalGender": @"", @"pronouns": @"", @"sexualOrientation": @"" },
@"veteran": @{ @"isVeteran": @"", @"veteran": @"" } };
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n \"disability\": {\n \"disability\": \"\",\n \"disabilityClassifications\": [\n {\n \"classification\": \"\"\n }\n ],\n \"hasDisability\": \"\"\n },\n \"ethnicity\": {\n \"ethnicRacialIdentities\": [\n {\n \"description\": \"\"\n }\n ],\n \"ethnicity\": \"\"\n },\n \"gender\": {\n \"displayPronouns\": false,\n \"genderIdentityDescription\": \"\",\n \"identifyAsLegalGender\": \"\",\n \"legalGender\": \"\",\n \"pronouns\": \"\",\n \"sexualOrientation\": \"\"\n },\n \"veteran\": {\n \"isVeteran\": \"\",\n \"veteran\": \"\"\n }\n}" in
Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'disability' => [
'disability' => '',
'disabilityClassifications' => [
[
'classification' => ''
]
],
'hasDisability' => ''
],
'ethnicity' => [
'ethnicRacialIdentities' => [
[
'description' => ''
]
],
'ethnicity' => ''
],
'gender' => [
'displayPronouns' => null,
'genderIdentityDescription' => '',
'identifyAsLegalGender' => '',
'legalGender' => '',
'pronouns' => '',
'sexualOrientation' => ''
],
'veteran' => [
'isVeteran' => '',
'veteran' => ''
]
]),
CURLOPT_HTTPHEADER => [
"content-type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('PUT', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata', [
'body' => '{
"disability": {
"disability": "",
"disabilityClassifications": [
{
"classification": ""
}
],
"hasDisability": ""
},
"ethnicity": {
"ethnicRacialIdentities": [
{
"description": ""
}
],
"ethnicity": ""
},
"gender": {
"displayPronouns": false,
"genderIdentityDescription": "",
"identifyAsLegalGender": "",
"legalGender": "",
"pronouns": "",
"sexualOrientation": ""
},
"veteran": {
"isVeteran": "",
"veteran": ""
}
}',
'headers' => [
'content-type' => 'application/json',
],
]);
echo $response->getBody();
setUrl('{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata');
$request->setMethod(HTTP_METH_PUT);
$request->setHeaders([
'content-type' => 'application/json'
]);
$request->setContentType('application/json');
$request->setBody(json_encode([
'disability' => [
'disability' => '',
'disabilityClassifications' => [
[
'classification' => ''
]
],
'hasDisability' => ''
],
'ethnicity' => [
'ethnicRacialIdentities' => [
[
'description' => ''
]
],
'ethnicity' => ''
],
'gender' => [
'displayPronouns' => null,
'genderIdentityDescription' => '',
'identifyAsLegalGender' => '',
'legalGender' => '',
'pronouns' => '',
'sexualOrientation' => ''
],
'veteran' => [
'isVeteran' => '',
'veteran' => ''
]
]));
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
append(json_encode([
'disability' => [
'disability' => '',
'disabilityClassifications' => [
[
'classification' => ''
]
],
'hasDisability' => ''
],
'ethnicity' => [
'ethnicRacialIdentities' => [
[
'description' => ''
]
],
'ethnicity' => ''
],
'gender' => [
'displayPronouns' => null,
'genderIdentityDescription' => '',
'identifyAsLegalGender' => '',
'legalGender' => '',
'pronouns' => '',
'sexualOrientation' => ''
],
'veteran' => [
'isVeteran' => '',
'veteran' => ''
]
]));
$request->setRequestUrl('{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata');
$request->setRequestMethod('PUT');
$request->setBody($body);
$request->setHeaders([
'content-type' => 'application/json'
]);
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"disability": {
"disability": "",
"disabilityClassifications": [
{
"classification": ""
}
],
"hasDisability": ""
},
"ethnicity": {
"ethnicRacialIdentities": [
{
"description": ""
}
],
"ethnicity": ""
},
"gender": {
"displayPronouns": false,
"genderIdentityDescription": "",
"identifyAsLegalGender": "",
"legalGender": "",
"pronouns": "",
"sexualOrientation": ""
},
"veteran": {
"isVeteran": "",
"veteran": ""
}
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
"disability": {
"disability": "",
"disabilityClassifications": [
{
"classification": ""
}
],
"hasDisability": ""
},
"ethnicity": {
"ethnicRacialIdentities": [
{
"description": ""
}
],
"ethnicity": ""
},
"gender": {
"displayPronouns": false,
"genderIdentityDescription": "",
"identifyAsLegalGender": "",
"legalGender": "",
"pronouns": "",
"sexualOrientation": ""
},
"veteran": {
"isVeteran": "",
"veteran": ""
}
}'
import http.client
conn = http.client.HTTPSConnection("example.com")
payload = "{\n \"disability\": {\n \"disability\": \"\",\n \"disabilityClassifications\": [\n {\n \"classification\": \"\"\n }\n ],\n \"hasDisability\": \"\"\n },\n \"ethnicity\": {\n \"ethnicRacialIdentities\": [\n {\n \"description\": \"\"\n }\n ],\n \"ethnicity\": \"\"\n },\n \"gender\": {\n \"displayPronouns\": false,\n \"genderIdentityDescription\": \"\",\n \"identifyAsLegalGender\": \"\",\n \"legalGender\": \"\",\n \"pronouns\": \"\",\n \"sexualOrientation\": \"\"\n },\n \"veteran\": {\n \"isVeteran\": \"\",\n \"veteran\": \"\"\n }\n}"
headers = { 'content-type': "application/json" }
conn.request("PUT", "/baseUrl/v2/companies/:companyId/employees/:employeeId/sensitivedata", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata"
payload = {
"disability": {
"disability": "",
"disabilityClassifications": [{ "classification": "" }],
"hasDisability": ""
},
"ethnicity": {
"ethnicRacialIdentities": [{ "description": "" }],
"ethnicity": ""
},
"gender": {
"displayPronouns": False,
"genderIdentityDescription": "",
"identifyAsLegalGender": "",
"legalGender": "",
"pronouns": "",
"sexualOrientation": ""
},
"veteran": {
"isVeteran": "",
"veteran": ""
}
}
headers = {"content-type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata"
payload <- "{\n \"disability\": {\n \"disability\": \"\",\n \"disabilityClassifications\": [\n {\n \"classification\": \"\"\n }\n ],\n \"hasDisability\": \"\"\n },\n \"ethnicity\": {\n \"ethnicRacialIdentities\": [\n {\n \"description\": \"\"\n }\n ],\n \"ethnicity\": \"\"\n },\n \"gender\": {\n \"displayPronouns\": false,\n \"genderIdentityDescription\": \"\",\n \"identifyAsLegalGender\": \"\",\n \"legalGender\": \"\",\n \"pronouns\": \"\",\n \"sexualOrientation\": \"\"\n },\n \"veteran\": {\n \"isVeteran\": \"\",\n \"veteran\": \"\"\n }\n}"
encode <- "json"
response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n \"disability\": {\n \"disability\": \"\",\n \"disabilityClassifications\": [\n {\n \"classification\": \"\"\n }\n ],\n \"hasDisability\": \"\"\n },\n \"ethnicity\": {\n \"ethnicRacialIdentities\": [\n {\n \"description\": \"\"\n }\n ],\n \"ethnicity\": \"\"\n },\n \"gender\": {\n \"displayPronouns\": false,\n \"genderIdentityDescription\": \"\",\n \"identifyAsLegalGender\": \"\",\n \"legalGender\": \"\",\n \"pronouns\": \"\",\n \"sexualOrientation\": \"\"\n },\n \"veteran\": {\n \"isVeteran\": \"\",\n \"veteran\": \"\"\n }\n}"
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
headers: {'Content-Type' => 'application/json'}
)
response = conn.put('/baseUrl/v2/companies/:companyId/employees/:employeeId/sensitivedata') do |req|
req.body = "{\n \"disability\": {\n \"disability\": \"\",\n \"disabilityClassifications\": [\n {\n \"classification\": \"\"\n }\n ],\n \"hasDisability\": \"\"\n },\n \"ethnicity\": {\n \"ethnicRacialIdentities\": [\n {\n \"description\": \"\"\n }\n ],\n \"ethnicity\": \"\"\n },\n \"gender\": {\n \"displayPronouns\": false,\n \"genderIdentityDescription\": \"\",\n \"identifyAsLegalGender\": \"\",\n \"legalGender\": \"\",\n \"pronouns\": \"\",\n \"sexualOrientation\": \"\"\n },\n \"veteran\": {\n \"isVeteran\": \"\",\n \"veteran\": \"\"\n }\n}"
end
puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata";
let payload = json!({
"disability": json!({
"disability": "",
"disabilityClassifications": (json!({"classification": ""})),
"hasDisability": ""
}),
"ethnicity": json!({
"ethnicRacialIdentities": (json!({"description": ""})),
"ethnicity": ""
}),
"gender": json!({
"displayPronouns": false,
"genderIdentityDescription": "",
"identifyAsLegalGender": "",
"legalGender": "",
"pronouns": "",
"sexualOrientation": ""
}),
"veteran": json!({
"isVeteran": "",
"veteran": ""
})
});
let mut headers = reqwest::header::HeaderMap::new();
headers.insert("content-type", "application/json".parse().unwrap());
let client = reqwest::Client::new();
let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
.headers(headers)
.json(&payload)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request PUT \
--url {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata \
--header 'content-type: application/json' \
--data '{
"disability": {
"disability": "",
"disabilityClassifications": [
{
"classification": ""
}
],
"hasDisability": ""
},
"ethnicity": {
"ethnicRacialIdentities": [
{
"description": ""
}
],
"ethnicity": ""
},
"gender": {
"displayPronouns": false,
"genderIdentityDescription": "",
"identifyAsLegalGender": "",
"legalGender": "",
"pronouns": "",
"sexualOrientation": ""
},
"veteran": {
"isVeteran": "",
"veteran": ""
}
}'
echo '{
"disability": {
"disability": "",
"disabilityClassifications": [
{
"classification": ""
}
],
"hasDisability": ""
},
"ethnicity": {
"ethnicRacialIdentities": [
{
"description": ""
}
],
"ethnicity": ""
},
"gender": {
"displayPronouns": false,
"genderIdentityDescription": "",
"identifyAsLegalGender": "",
"legalGender": "",
"pronouns": "",
"sexualOrientation": ""
},
"veteran": {
"isVeteran": "",
"veteran": ""
}
}' | \
http PUT {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata \
content-type:application/json
wget --quiet \
--method PUT \
--header 'content-type: application/json' \
--body-data '{\n "disability": {\n "disability": "",\n "disabilityClassifications": [\n {\n "classification": ""\n }\n ],\n "hasDisability": ""\n },\n "ethnicity": {\n "ethnicRacialIdentities": [\n {\n "description": ""\n }\n ],\n "ethnicity": ""\n },\n "gender": {\n "displayPronouns": false,\n "genderIdentityDescription": "",\n "identifyAsLegalGender": "",\n "legalGender": "",\n "pronouns": "",\n "sexualOrientation": ""\n },\n "veteran": {\n "isVeteran": "",\n "veteran": ""\n }\n}' \
--output-document \
- {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata
import Foundation
let headers = ["content-type": "application/json"]
let parameters = [
"disability": [
"disability": "",
"disabilityClassifications": [["classification": ""]],
"hasDisability": ""
],
"ethnicity": [
"ethnicRacialIdentities": [["description": ""]],
"ethnicity": ""
],
"gender": [
"displayPronouns": false,
"genderIdentityDescription": "",
"identifyAsLegalGender": "",
"legalGender": "",
"pronouns": "",
"sexualOrientation": ""
],
"veteran": [
"isVeteran": "",
"veteran": ""
]
] as [String : Any]
let postData = JSONSerialization.data(withJSONObject: parameters, options: [])
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()
GET
Get sensitive data
{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata
QUERY PARAMS
companyId
employeeId
Examples
REQUEST
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata");
CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])
(client/get "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata")
require "http/client"
url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata"
response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata"),
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
GET /baseUrl/v2/companies/:companyId/employees/:employeeId/sensitivedata HTTP/1.1
Host: example.com
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata")
.execute()
.toCompletableFuture()
.thenAccept(System.out::println)
.join();
client.close();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata"))
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata")
.get()
.build();
Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata")
.asString();
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener('readystatechange', function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open('GET', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata');
xhr.send(data);
import axios from 'axios';
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const url = '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
const settings = {
async: true,
crossDomain: true,
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata',
method: 'GET',
headers: {}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
val client = OkHttpClient()
val request = Request.Builder()
.url("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata")
.get()
.build()
val response = client.newCall(request).execute()
const http = require('https');
const options = {
method: 'GET',
hostname: 'example.com',
port: null,
path: '/baseUrl/v2/companies/:companyId/employees/:employeeId/sensitivedata',
headers: {}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on('data', function (chunk) {
chunks.push(chunk);
});
res.on('end', function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
const request = require('request');
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata'
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
const unirest = require('unirest');
const req = unirest('GET', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata');
req.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.body);
});
const axios = require('axios').default;
const options = {
method: 'GET',
url: '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata'
};
try {
const { data } = await axios.request(options);
console.log(data);
} catch (error) {
console.error(error);
}
const fetch = require('node-fetch');
const url = '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata';
const options = {method: 'GET'};
try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
#import
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata"]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
if (error) {
NSLog(@"%@", error);
} else {
NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
NSLog(@"%@", httpResponse);
}
}];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt
let uri = Uri.of_string "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata" in
Client.call `GET uri
>>= fun (res, body_stream) ->
(* Do stuff with the result *)
"{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
request('GET', '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata');
echo $response->getBody();
setUrl('{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata');
$request->setMethod(HTTP_METH_GET);
try {
$response = $request->send();
echo $response->getBody();
} catch (HttpException $ex) {
echo $ex;
}
setRequestUrl('{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata' -Method GET
$response = Invoke-RestMethod -Uri '{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata' -Method GET
import http.client
conn = http.client.HTTPSConnection("example.com")
conn.request("GET", "/baseUrl/v2/companies/:companyId/employees/:employeeId/sensitivedata")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import requests
url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata"
response = requests.get(url)
print(response.json())
library(httr)
url <- "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata"
response <- VERB("GET", url, content_type("application/octet-stream"))
content(response, "text")
require 'uri'
require 'net/http'
url = URI("{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body
require 'faraday'
conn = Faraday.new(
url: 'https://example.com',
)
response = conn.get('/baseUrl/v2/companies/:companyId/employees/:employeeId/sensitivedata') do |req|
end
puts response.status
puts response.body
use reqwest;
#[tokio::main]
pub async fn main() {
let url = "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata";
let client = reqwest::Client::new();
let response = client.get(url)
.send()
.await;
let results = response.unwrap()
.json::()
.await
.unwrap();
dbg!(results);
}
curl --request GET \
--url {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata
http GET {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata
wget --quiet \
--method GET \
--output-document \
- {{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata
import Foundation
let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/v2/companies/:companyId/employees/:employeeId/sensitivedata")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "GET"
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error as Any)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse)
}
})
dataTask.resume()