Compensation Benchmarks API Code Samples

Selection of code samples that demonstrate the use of the Compensation Benchmarks API. Copy and edit these code samples to suit your needs.

When using the code samples, remember to replace:

  • {vanity_name} with your tenant name
  • {api_key} with your API key

These code samples may not include all available parameters and request body fields for each endpoint. For the endpoint's full request schema, see Compensation Benchmarks API Reference.

Compensation benchmark values

The compensation benchmark values are composed from multiple dimensions and the individual members within these dimensions. To retrieve a compensation benchmark value for a job in a specific industry, location, career level, and company size, you must specify a member for each dimension.

Note: The job dimension member is a required field.

If a member value is missing for any of the other dimensions, the API will retrieve the benchmark value for the dimension as a whole. For example, if the career level dimension member was not included in the request, it will look at the benchmark value across all career levels for that particular job.

To get the dimension member IDs to use in your compensation benchmark value request, see Browse dimensions.

This sample request finds the compensation benchmark value for the following dimension members.

  • job=J.005197 is for Application developer

  • industry=I.000027 is for High Technology

  • location=L.000414 is for Seattle-Tacoma-Bellevue, WA

  • careerLevel=CL.P03 is for Senior 1

  • companySize=CS.002 is for 1000+

Copy

cURL sample request: Retrieve compensation benchmark values

curl -X GET --url 'https://{vanity_name}.api.visier.io/v1/compensation-benchmarks/base-salary?job=J.005197&industry=I.000027&location=L.000414&careerLevel=CL.P03&companySize=CS.002' \
-H 'apikey: {api_key}'

The response includes compensation benchmark values for the specified dimension members.

Browse dimensions

Use these sample requests to browse the members of each dimension. The supported dimensions are:

  • jobs

  • locations

  • industries

  • career-levels

  • company-sizes

GET v1/compensation-benchmarks/{dimension}

Note: Not all dimension members have benchmark values. To determine if a dimension member has a benchmark value refer to the hasBenchmarkValue indicated in the response field.

  • The members without a benchmark value will include hasBenchmarkValue set to false

  • The members with a benchmark value will include hasBenchmarkValue set to true

All jobs

In this sample request, we retrieve a list of all members in the jobs dimension.

Copy

cURL sample request: List all jobs

curl -X GET --url 'https://{vanity_name}.api.visier.io/v1/compensation-benchmarks/jobs' \
-H 'apikey: {api_key}'

Jobs are returned as a list of entries. Basic identification information is included with each entry.

All locations

Note: Supported locations include:

  • The United States of America

Child locations are listed by metropolitan statistical area (MSA).

In this sample request, we retrieve a list of all members in the location dimension.

Copy

cURL sample request: List all locations

curl -X GET --url 'https://{vanity_name}.api.visier.io/v1/compensation-benchmarks/locations' \
-H 'apikey: {api_key}'

Locations are returned as a list of entries.

All industries

In this sample request, we retrieve a list of all members in the industries dimension.

Copy

cURL sample request: List all industries

curl -X GET --url 'https://{vanity_name}.api.visier.io/v1/compensation-benchmarks/industries' \
-H 'apikey: {api_key}'

Industries are returned as a list of entries.

Career levels

In this sample request, we retrieve a list of all members in the career levels dimension.

Copy

cURL sample request: List all career levels

curl -X GET --url 'https://{vanity_name}.api.visier.io/v1/compensation-benchmarks/career-levels' \
-H 'apikey: {api_key}'

Career levels are returned as a list of entries.

Company sizes

In this sample request, we retrieve a list of all members in the company sizes dimension.

Copy

cURL sample request: List all company sizes

curl -X GET --url 'https://{vanity_name}.api.visier.io/v1/compensation-benchmarks/company-sizes' \
-H 'apikey: {api_key}'

Company sizes are returned as a list of entries.

Browse by dimension hierarchy

Certain dimensions have members organized into hierarchies. This allows you to navigate the dimension hierarchy to explore the member subsets. The hierarchical dimensions are:

  • jobs

  • locations

  • industries

In this sample request, we retrieve the top-level members of the jobs hierarchy.

Copy

cURL sample request: Get the top-level members in the jobs dimension hierarchy

curl -X GET --url 'https://{vanity_name}.api.visier.io/v1/compensation-benchmarks/jobs?parent=root' \
-H 'apikey: {api_key}'

Top-level job members are returned as a list of entries.

The child jobs of a job member can be retrieved by ID.

This sample request retrieves the child jobs of the job member with the ID JF.200009, which corresponds to Information Technology.

Copy

cURL sample request: Get child jobs by ID

curl -X GET --url 'https://{vanity_name}.api.visier.io/v1/compensation-benchmarks/jobs?parent=JF.200009' \
-H 'apikey: {api_key}'

Child jobs are returned as a list of entries.

This request can be repeated until you reach the end of a hierarchical branch. This is marked by a member with hasChildren equal to false.

Search or filter for dimension members

Use these sample requests to search or filter for dimension members.

Job search

This sample request retrieves a list of jobs that match with the search term software.

Copy
cURL sample request: Get jobs by search term
curl -X GET --url 'https://{vanity_name}.api.visier.io/v1/compensation-benchmarks/jobs?term=software' \
-H 'apikey: {api_key}'

Jobs that match the search term are returned as a list of entries.

Location by postal code

Note: Supported locations include:

  • The United States of America

Child locations are listed by metropolitan statistical area (MSA).

This sample request retrieves a list of locations that match with the country code US and postal code 98068.

Copy

cURL sample request: Get locations by country code and postal code

curl -X GET --url 'https://{vanity_name}.api.visier.io/v1/compensation-benchmarks/locations?countryCode=US&postalCode=98068' \
-H 'apikey: {api_key}'

Locations that match the country code and postal code are returned as a list of entries.

Industry by NAICS code

This sample request retrieves the industry members that match the North American Industry Classification System (NAICS) code 54.

Copy

cURL sample request: Get industry members by NAICS code

curl -X GET --url 'https://{vanity_name}.api.visier.io/v1/compensation-benchmarks/industries?naicsCode=54' \
-H 'apikey: {api_key}'

The industry that matches the NAICS code is returned.

Career levels by job ID

In this sample request, we retrieve the career levels applicable to the job Application Developer using the ID J.005197.

Copy

cURL sample request: Get career levels by job ID

curl -X GET --url 'https://{vanity_name}.api.visier.io/v1/compensation-benchmarks/career-levels?job=J.005197' \
-H 'apikey: {api_key}'

Career levels applicable to the job ID are returned as a list of entries.

Company size by headcount

In this sample request, we retrieve the company size applicable to the headcount of 1200.

Copy

cURL sample request: Get company size by headcount

curl -X GET --url 'https://{vanity_name}.api.visier.io/v1/compensation-benchmarks/company-sizes?headcount=1200' \
-H 'apikey: {api_key}'

The company size that matches the headcount is returned.