Create a Job and Compensation
Employees can be paid in a multitude of ways. Some employees are paid on an hourly basis, some are salaried, and some are paid in a combination of ways. What an employee gets paid is determined by their jobs and compensations in Gusto.
A job is an employee's title and pay rate. Each job_id
is unique to a singular employee, but each employee can have multiple jobs (or job_id
s). Two employees cannot share the same job_id
even if they share the same title.
Before creating a job, you must have an employee. You can create an employee using the POST employees
endpoint. For more information, read the Onboard a W2 Employee guide.
1. Create a Job
You can create a job using the POST employees/{employee_uuid}/jobs
endpoint.
hire_date
The
hire_date
is theeffective_date
of the job, or the day they start the role.
curl --request POST \
--url https://api.gusto-demo.com/v1/employees/{employee_uuid}/jobs \
--header 'accept: application/json' \
--header 'authorization: Bearer <<COMPANY_API_TOKEN>>' \
--header 'content-type: application/json' \
--data '
{
"title": "Regional Manager",
"location_id": 1363316536327002,
"hire_date": "2022-06-21"
}
'
const fetch = require('node-fetch');
const url = 'https://api.gusto-demo.com/v1/employees/{employee_uuid}/jobs';
const options = {
method: 'POST',
headers: {
accept: 'application/json',
'content-type': 'application/json',
authorization: 'Bearer <<COMPANY_API_TOKEN>>'
},
body: JSON.stringify({
title: 'Regional Manager',
location_id: 1363316536327002,
hire_date: '2022-06-21'
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('error:' + err));
This API call will create a job with an hourly compensation of 0. In the response, you will see a compensations
array object similar to:
"compensations": [
{
"id": 7757869446670624,
"job_id": 7757869442860017,
"uuid": "78197f1c-f340-4da8-bd6a-3a1a08292f5a",
"version": "b6d6378ce263632a10a2bef78e7502bb",
"payment_unit": "Hour",
"flsa_status": "Nonexempt",
"adjust_for_minimum_wage": false,
"job_uuid": "5eee9213-c138-481f-9ba7-a2d5f35e0864",
"effective_date": "2022-06-21",
"rate": "0.00"
}
]
2. Update Compensation
Creating a job automatically creates a non-exempt, hourly compensation of $0/hr. Compensation for a job should be updated in subsequent API call using the PUT compensations/{compensation_uuid}
endpoint.
Compensations contain information on how much is paid out for a job. The job object can have multiple compensations to account for changes over time, such as merit increases, but only one compensation is active at a time. The rate
field in the job object reflects the current compensation.
flsa_status
The Fair Labor Standards Act (FLSA) establishes minimum wage, overtime pay, recordkeeping, and youth employment standards affecting employees in the private sector and in federal, state, and local governments. To learn more refer to our support center.
Allowed values:
Exempt
Salaried Nonexempt
,Nonexempt
,Owner
.
curl --request PUT \
--url https://api.gusto-demo.com/v1/compensations/{compensation_uuid} \
--header 'accept: application/json' \
--header 'authorization: Bearer <<COMPANY_API_TOKEN>>' \
--header 'content-type: application/json' \
--data '
{
"version": "b6d6378ce263632a10a2bef78e7502bb",
"rate": "60000.00",
"payment_unit": "Year",
"flsa_status": "Exempt"
}
'
const fetch = require('node-fetch');
const url = 'https://api.gusto-demo.com/v1/compensations/{compensation_uuid}';
const options = {
method: 'PUT',
headers: {
accept: 'application/json',
'content-type': 'application/json',
authorization: 'Bearer <<COMPANY_API_TOKEN>>'
},
body: JSON.stringify({
version: 'b6d6378ce263632a10a2bef78e7502bb',
rate: '60000.00',
payment_unit: 'Year',
flsa_status: 'Exempt'
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('error:' + err));
Updated 9 months ago