Manage jobs and compensation

Define how employees are paid

Employees can be paid in different ways: salaried, hourly, or a combination.

In Gusto, compensation is managed through jobs, which define an employee’s title and pay rate. Each job_id is unique to an employee (two employees with the same title will still have unique job_ids), and employees can have multiple jobs.

1. Create a job and compensation

Prerequisites

An employee record must already exist before creating a job. To make one, use the POST /v1/companies/{company_id}/employees endpoint. For detailed onboarding steps, refer to the Onboard a W2 Employee guide.

Steps

You can create a job using the POST /v1/employees/{employee_id}/jobs endpoint.

πŸ“˜

hire_date

The hire_date is the day the employee begins in this role.

Sample request

curl --request POST \
     --url https://api.gusto-demo.com/v1/employees/{employee_uuid}/jobs \
     --header 'accept: application/json' \
     --header 'authorization: Bearer <<access_token>>' \
     --header 'content-type: application/json' \
     --data '
{
     "title": "Regional Manager",
     "hire_date": "2023-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));

Sample response

This call creates a job with an initial non-exempt hourly compensation rate of $0/hrβ€”this rate will be in a compensations array object, as shown below,

You’ll update the compensation’s rate in the next step, using the uuid of the new compensation in the compensations array.

  "compensations": [
        {
            "uuid": "96e56730-a304-4dcc-a819-1716cd10589d",
            "employee_uuid": "259738db-2895-4e5b-ac9d-1ee296f54824",
            "version": "ca8a89029973e3a42df81d26092ad16d",
            "payment_unit": "Hour",
            "flsa_status": "Nonexempt",
            "adjust_for_minimum_wage": false,
            "minimum_wages": [],
            "job_uuid": "e51df53e-70d1-4877-872e-4b39eb181899",
            "effective_date": "2023-08-21",
            "rate": "0.00"
        }
  ],

2. Update the compensation

After creating a job, update the compensation using the PUT /v1/compensations/{compensation_uuid} endpoint.

πŸ“˜

flsa_status

The Wages and Fair Labor Standards Act (FLSA) establishes minimum wage, overtime pay, recordkeeping, and youth employment standards affecting employees in the private sector and federal, state, and local governments.

Employers on your platform should consider these requirements. For more informations, refer to the US Department of Labor guidance for the FLSA.

Sample request

curl --request PUT \
     --url https://api.gusto-demo.com/v1/compensations/{compensation_uuid} \
     --header 'accept: application/json' \
     --header 'authorization: Bearer <<access_token>>' \
     --header 'content-type: application/json' \
     --data '
{
  "version": "ca8a89029973e3a42df81d26092ad16d",
  "adjust_for_minimum_wage": false,
  "rate": "20.00",
  "payment_unit": "Hour",
  "flsa_status": "Nonexempt"
  }

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));

Sample response

{
  "uuid": "e9afc002-755d-476a-a956-9f4a377c5569",
  "employee_uuid": "03cfd396-fc71-4a45-8aa7-3ed138379be4",
  "version": "38903f1f825684c16fe594e579f3fca9",
  "payment_unit": "Hour",
  "flsa_status": "Nonexempt",
  "adjust_for_minimum_wage": false,
  "minimum_wages": [],
  "job_uuid": "3897ec3d-0ec5-4f4d-80e1-faad12c2ae42",
  "effective_date": "2020-12-21",
  "rate": "20.00"
}

Update the rate for a job

Compensations define a job's rate and pay structure. While a job can have multiple compensations over time, only one compensation is ever active and the active compensation is based on the most recent effective_date.

You can create additional compensations using the POST /v1/jobs/{job_id}/compensations endpoint. The effective_date is a day that the employee hasn’t been paid for yet, up to a year in the future.

curl --request POST \
     --url https://api.gusto-demo.com/v1/jobs/job_id/compensations \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data 
{
  "id": 1363316536327004,
  "uuid": "96e56730-a304-4dcc-a819-1716cd10589d",
  "version": "98jr3289h3298hr9329gf9egskt3kagri32qqgiqe3872",
  "job_id": 1123581321345589,
  "job_uuid": "d8f8fbe7-496d-4b69-86f0-1e2d1b73a086",
  "rate": "25.00",
  "payment_unit": "Hour",
  "flsa_status": "Nonexempt",
  "effective_date": "2023-10-17",
  "adjust_for_minimum_wage": false,
  "minimum_wages": []
}
'
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));

Delete a compensation

You can delete a compensation for a job that hasn't been processed on payroll using the DELETE /v1/compensations/{compensation_id} endpoint.

curl --request DELETE \
     --url https://api.gusto-demo.com/v1/compensations/compensation_id
     --header 'authorization: Bearer <<access_token>>'