Employees
Update Employee Information
Update a specific employee record in Zeal.
PATCH
/
employees
Update Employee Information
curl --request PATCH \
--url https://api.zeal.com/employees \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"employeeID": "1234567890",
"companyID": "0987654321",
"onboarded": true,
"employment_status": "live",
"term_date": null,
"first_name": "erlich",
"last_name": "bachman",
"email": "erlich@zeal.com",
"dob": "1999-12-04",
"start_date": "2019-06-04",
"title": "Brand Ambassador",
"working_state": "CA",
"workLocationID": "6247402f38756100224f0a52",
"address": "320 Pancake Hollow Road",
"address_line2": null,
"city": "Highland",
"state": "NY",
"zip": "12528",
"phone_number": "+18214370987",
"default_pay_schedule": "weekly",
"default_wage": 20,
"default_ot_wage": 30,
"default_dt_wage": 40,
"ssn": "123456789",
"is_943": true,
"is_scheduleH": false,
"is_salary": true,
"salary": 100000,
"external_id": "123456789"
}
'import requests
url = "https://api.zeal.com/employees"
payload = {
"employeeID": "1234567890",
"companyID": "0987654321",
"onboarded": True,
"employment_status": "live",
"term_date": None,
"first_name": "erlich",
"last_name": "bachman",
"email": "erlich@zeal.com",
"dob": "1999-12-04",
"start_date": "2019-06-04",
"title": "Brand Ambassador",
"working_state": "CA",
"workLocationID": "6247402f38756100224f0a52",
"address": "320 Pancake Hollow Road",
"address_line2": None,
"city": "Highland",
"state": "NY",
"zip": "12528",
"phone_number": "+18214370987",
"default_pay_schedule": "weekly",
"default_wage": 20,
"default_ot_wage": 30,
"default_dt_wage": 40,
"ssn": "123456789",
"is_943": True,
"is_scheduleH": False,
"is_salary": True,
"salary": 100000,
"external_id": "123456789"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
employeeID: '1234567890',
companyID: '0987654321',
onboarded: true,
employment_status: 'live',
term_date: null,
first_name: 'erlich',
last_name: 'bachman',
email: 'erlich@zeal.com',
dob: '1999-12-04',
start_date: '2019-06-04',
title: 'Brand Ambassador',
working_state: 'CA',
workLocationID: '6247402f38756100224f0a52',
address: '320 Pancake Hollow Road',
address_line2: null,
city: 'Highland',
state: 'NY',
zip: '12528',
phone_number: '+18214370987',
default_pay_schedule: 'weekly',
default_wage: 20,
default_ot_wage: 30,
default_dt_wage: 40,
ssn: '123456789',
is_943: true,
is_scheduleH: false,
is_salary: true,
salary: 100000,
external_id: '123456789'
})
};
fetch('https://api.zeal.com/employees', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.zeal.com/employees",
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([
'employeeID' => '1234567890',
'companyID' => '0987654321',
'onboarded' => true,
'employment_status' => 'live',
'term_date' => null,
'first_name' => 'erlich',
'last_name' => 'bachman',
'email' => 'erlich@zeal.com',
'dob' => '1999-12-04',
'start_date' => '2019-06-04',
'title' => 'Brand Ambassador',
'working_state' => 'CA',
'workLocationID' => '6247402f38756100224f0a52',
'address' => '320 Pancake Hollow Road',
'address_line2' => null,
'city' => 'Highland',
'state' => 'NY',
'zip' => '12528',
'phone_number' => '+18214370987',
'default_pay_schedule' => 'weekly',
'default_wage' => 20,
'default_ot_wage' => 30,
'default_dt_wage' => 40,
'ssn' => '123456789',
'is_943' => true,
'is_scheduleH' => false,
'is_salary' => true,
'salary' => 100000,
'external_id' => '123456789'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.zeal.com/employees"
payload := strings.NewReader("{\n \"employeeID\": \"1234567890\",\n \"companyID\": \"0987654321\",\n \"onboarded\": true,\n \"employment_status\": \"live\",\n \"term_date\": null,\n \"first_name\": \"erlich\",\n \"last_name\": \"bachman\",\n \"email\": \"erlich@zeal.com\",\n \"dob\": \"1999-12-04\",\n \"start_date\": \"2019-06-04\",\n \"title\": \"Brand Ambassador\",\n \"working_state\": \"CA\",\n \"workLocationID\": \"6247402f38756100224f0a52\",\n \"address\": \"320 Pancake Hollow Road\",\n \"address_line2\": null,\n \"city\": \"Highland\",\n \"state\": \"NY\",\n \"zip\": \"12528\",\n \"phone_number\": \"+18214370987\",\n \"default_pay_schedule\": \"weekly\",\n \"default_wage\": 20,\n \"default_ot_wage\": 30,\n \"default_dt_wage\": 40,\n \"ssn\": \"123456789\",\n \"is_943\": true,\n \"is_scheduleH\": false,\n \"is_salary\": true,\n \"salary\": 100000,\n \"external_id\": \"123456789\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.zeal.com/employees")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"employeeID\": \"1234567890\",\n \"companyID\": \"0987654321\",\n \"onboarded\": true,\n \"employment_status\": \"live\",\n \"term_date\": null,\n \"first_name\": \"erlich\",\n \"last_name\": \"bachman\",\n \"email\": \"erlich@zeal.com\",\n \"dob\": \"1999-12-04\",\n \"start_date\": \"2019-06-04\",\n \"title\": \"Brand Ambassador\",\n \"working_state\": \"CA\",\n \"workLocationID\": \"6247402f38756100224f0a52\",\n \"address\": \"320 Pancake Hollow Road\",\n \"address_line2\": null,\n \"city\": \"Highland\",\n \"state\": \"NY\",\n \"zip\": \"12528\",\n \"phone_number\": \"+18214370987\",\n \"default_pay_schedule\": \"weekly\",\n \"default_wage\": 20,\n \"default_ot_wage\": 30,\n \"default_dt_wage\": 40,\n \"ssn\": \"123456789\",\n \"is_943\": true,\n \"is_scheduleH\": false,\n \"is_salary\": true,\n \"salary\": 100000,\n \"external_id\": \"123456789\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zeal.com/employees")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"employeeID\": \"1234567890\",\n \"companyID\": \"0987654321\",\n \"onboarded\": true,\n \"employment_status\": \"live\",\n \"term_date\": null,\n \"first_name\": \"erlich\",\n \"last_name\": \"bachman\",\n \"email\": \"erlich@zeal.com\",\n \"dob\": \"1999-12-04\",\n \"start_date\": \"2019-06-04\",\n \"title\": \"Brand Ambassador\",\n \"working_state\": \"CA\",\n \"workLocationID\": \"6247402f38756100224f0a52\",\n \"address\": \"320 Pancake Hollow Road\",\n \"address_line2\": null,\n \"city\": \"Highland\",\n \"state\": \"NY\",\n \"zip\": \"12528\",\n \"phone_number\": \"+18214370987\",\n \"default_pay_schedule\": \"weekly\",\n \"default_wage\": 20,\n \"default_ot_wage\": 30,\n \"default_dt_wage\": 40,\n \"ssn\": \"123456789\",\n \"is_943\": true,\n \"is_scheduleH\": false,\n \"is_salary\": true,\n \"salary\": 100000,\n \"external_id\": \"123456789\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"employeeID": "6196c0afa360c70024268b26",
"companyID": "123441526234234ertys",
"onboarded": false,
"employment_status": "live",
"term_date": null,
"first_name": "Elrich",
"last_name": "Bachmann",
"email": "elrichbachmann@zeal.com",
"dob": "1999-12-04",
"start_date": "2019-06-04",
"title": "Brand Ambassador",
"working_state": "CA",
"workLocationID": "531fece70b6d0b5d29c9f352",
"address": "320 Pancake Hollow Road",
"city": "Highland",
"state": "NY",
"zip": "12528",
"phone_number": "8716738956",
"default_pay_schedule": "daily",
"default_wage": 20,
"default_ot_wage": 32,
"default_dt_wage": 42,
"ssn": "087473892",
"is_943": false,
"is_scheduleH": false,
"is_salary": true,
"salary": 100000,
"paycard_requested": false,
"paycard_enabled": false,
"kyc_status": null,
"ssn_verification_status": null,
"soc_code": "41-3011"
}
}{
"success": false,
"errors": [
{
"message": "Working State does not represent a state in the US",
"code": 13
}
]
}⌘I
Update Employee Information
curl --request PATCH \
--url https://api.zeal.com/employees \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"employeeID": "1234567890",
"companyID": "0987654321",
"onboarded": true,
"employment_status": "live",
"term_date": null,
"first_name": "erlich",
"last_name": "bachman",
"email": "erlich@zeal.com",
"dob": "1999-12-04",
"start_date": "2019-06-04",
"title": "Brand Ambassador",
"working_state": "CA",
"workLocationID": "6247402f38756100224f0a52",
"address": "320 Pancake Hollow Road",
"address_line2": null,
"city": "Highland",
"state": "NY",
"zip": "12528",
"phone_number": "+18214370987",
"default_pay_schedule": "weekly",
"default_wage": 20,
"default_ot_wage": 30,
"default_dt_wage": 40,
"ssn": "123456789",
"is_943": true,
"is_scheduleH": false,
"is_salary": true,
"salary": 100000,
"external_id": "123456789"
}
'import requests
url = "https://api.zeal.com/employees"
payload = {
"employeeID": "1234567890",
"companyID": "0987654321",
"onboarded": True,
"employment_status": "live",
"term_date": None,
"first_name": "erlich",
"last_name": "bachman",
"email": "erlich@zeal.com",
"dob": "1999-12-04",
"start_date": "2019-06-04",
"title": "Brand Ambassador",
"working_state": "CA",
"workLocationID": "6247402f38756100224f0a52",
"address": "320 Pancake Hollow Road",
"address_line2": None,
"city": "Highland",
"state": "NY",
"zip": "12528",
"phone_number": "+18214370987",
"default_pay_schedule": "weekly",
"default_wage": 20,
"default_ot_wage": 30,
"default_dt_wage": 40,
"ssn": "123456789",
"is_943": True,
"is_scheduleH": False,
"is_salary": True,
"salary": 100000,
"external_id": "123456789"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
employeeID: '1234567890',
companyID: '0987654321',
onboarded: true,
employment_status: 'live',
term_date: null,
first_name: 'erlich',
last_name: 'bachman',
email: 'erlich@zeal.com',
dob: '1999-12-04',
start_date: '2019-06-04',
title: 'Brand Ambassador',
working_state: 'CA',
workLocationID: '6247402f38756100224f0a52',
address: '320 Pancake Hollow Road',
address_line2: null,
city: 'Highland',
state: 'NY',
zip: '12528',
phone_number: '+18214370987',
default_pay_schedule: 'weekly',
default_wage: 20,
default_ot_wage: 30,
default_dt_wage: 40,
ssn: '123456789',
is_943: true,
is_scheduleH: false,
is_salary: true,
salary: 100000,
external_id: '123456789'
})
};
fetch('https://api.zeal.com/employees', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.zeal.com/employees",
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([
'employeeID' => '1234567890',
'companyID' => '0987654321',
'onboarded' => true,
'employment_status' => 'live',
'term_date' => null,
'first_name' => 'erlich',
'last_name' => 'bachman',
'email' => 'erlich@zeal.com',
'dob' => '1999-12-04',
'start_date' => '2019-06-04',
'title' => 'Brand Ambassador',
'working_state' => 'CA',
'workLocationID' => '6247402f38756100224f0a52',
'address' => '320 Pancake Hollow Road',
'address_line2' => null,
'city' => 'Highland',
'state' => 'NY',
'zip' => '12528',
'phone_number' => '+18214370987',
'default_pay_schedule' => 'weekly',
'default_wage' => 20,
'default_ot_wage' => 30,
'default_dt_wage' => 40,
'ssn' => '123456789',
'is_943' => true,
'is_scheduleH' => false,
'is_salary' => true,
'salary' => 100000,
'external_id' => '123456789'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.zeal.com/employees"
payload := strings.NewReader("{\n \"employeeID\": \"1234567890\",\n \"companyID\": \"0987654321\",\n \"onboarded\": true,\n \"employment_status\": \"live\",\n \"term_date\": null,\n \"first_name\": \"erlich\",\n \"last_name\": \"bachman\",\n \"email\": \"erlich@zeal.com\",\n \"dob\": \"1999-12-04\",\n \"start_date\": \"2019-06-04\",\n \"title\": \"Brand Ambassador\",\n \"working_state\": \"CA\",\n \"workLocationID\": \"6247402f38756100224f0a52\",\n \"address\": \"320 Pancake Hollow Road\",\n \"address_line2\": null,\n \"city\": \"Highland\",\n \"state\": \"NY\",\n \"zip\": \"12528\",\n \"phone_number\": \"+18214370987\",\n \"default_pay_schedule\": \"weekly\",\n \"default_wage\": 20,\n \"default_ot_wage\": 30,\n \"default_dt_wage\": 40,\n \"ssn\": \"123456789\",\n \"is_943\": true,\n \"is_scheduleH\": false,\n \"is_salary\": true,\n \"salary\": 100000,\n \"external_id\": \"123456789\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.zeal.com/employees")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"employeeID\": \"1234567890\",\n \"companyID\": \"0987654321\",\n \"onboarded\": true,\n \"employment_status\": \"live\",\n \"term_date\": null,\n \"first_name\": \"erlich\",\n \"last_name\": \"bachman\",\n \"email\": \"erlich@zeal.com\",\n \"dob\": \"1999-12-04\",\n \"start_date\": \"2019-06-04\",\n \"title\": \"Brand Ambassador\",\n \"working_state\": \"CA\",\n \"workLocationID\": \"6247402f38756100224f0a52\",\n \"address\": \"320 Pancake Hollow Road\",\n \"address_line2\": null,\n \"city\": \"Highland\",\n \"state\": \"NY\",\n \"zip\": \"12528\",\n \"phone_number\": \"+18214370987\",\n \"default_pay_schedule\": \"weekly\",\n \"default_wage\": 20,\n \"default_ot_wage\": 30,\n \"default_dt_wage\": 40,\n \"ssn\": \"123456789\",\n \"is_943\": true,\n \"is_scheduleH\": false,\n \"is_salary\": true,\n \"salary\": 100000,\n \"external_id\": \"123456789\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zeal.com/employees")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"employeeID\": \"1234567890\",\n \"companyID\": \"0987654321\",\n \"onboarded\": true,\n \"employment_status\": \"live\",\n \"term_date\": null,\n \"first_name\": \"erlich\",\n \"last_name\": \"bachman\",\n \"email\": \"erlich@zeal.com\",\n \"dob\": \"1999-12-04\",\n \"start_date\": \"2019-06-04\",\n \"title\": \"Brand Ambassador\",\n \"working_state\": \"CA\",\n \"workLocationID\": \"6247402f38756100224f0a52\",\n \"address\": \"320 Pancake Hollow Road\",\n \"address_line2\": null,\n \"city\": \"Highland\",\n \"state\": \"NY\",\n \"zip\": \"12528\",\n \"phone_number\": \"+18214370987\",\n \"default_pay_schedule\": \"weekly\",\n \"default_wage\": 20,\n \"default_ot_wage\": 30,\n \"default_dt_wage\": 40,\n \"ssn\": \"123456789\",\n \"is_943\": true,\n \"is_scheduleH\": false,\n \"is_salary\": true,\n \"salary\": 100000,\n \"external_id\": \"123456789\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"employeeID": "6196c0afa360c70024268b26",
"companyID": "123441526234234ertys",
"onboarded": false,
"employment_status": "live",
"term_date": null,
"first_name": "Elrich",
"last_name": "Bachmann",
"email": "elrichbachmann@zeal.com",
"dob": "1999-12-04",
"start_date": "2019-06-04",
"title": "Brand Ambassador",
"working_state": "CA",
"workLocationID": "531fece70b6d0b5d29c9f352",
"address": "320 Pancake Hollow Road",
"city": "Highland",
"state": "NY",
"zip": "12528",
"phone_number": "8716738956",
"default_pay_schedule": "daily",
"default_wage": 20,
"default_ot_wage": 32,
"default_dt_wage": 42,
"ssn": "087473892",
"is_943": false,
"is_scheduleH": false,
"is_salary": true,
"salary": 100000,
"paycard_requested": false,
"paycard_enabled": false,
"kyc_status": null,
"ssn_verification_status": null,
"soc_code": "41-3011"
}
}{
"success": false,
"errors": [
{
"message": "Working State does not represent a state in the US",
"code": 13
}
]
}