Get Contractor Employees
curl --request GET \
--url https://api.shovels.ai/v2/contractors/{id}/employees \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.shovels.ai/v2/contractors/{id}/employees"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)HttpResponse<String> response = Unirest.get("https://api.shovels.ai/v2/contractors/{id}/employees")
.header("X-API-Key", "<api-key>")
.asString();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.shovels.ai/v2/contractors/{id}/employees"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.shovels.ai/v2/contractors/{id}/employees")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.shovels.ai/v2/contractors/{id}/employees",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"items": [
{
"id": "aa145cd32c95f69b95e9233f6a957a32",
"contractor_id": "8wKHB2ZNf",
"name": "John Smith",
"street_no": "123",
"street": "Oak Avenue",
"city": "San Francisco",
"zip_code": "94105",
"zip_code_ext": "1234",
"state": "CA",
"phone": "(415) 555-0123",
"email": "john.smith@personal.com",
"business_email": "j.smith@company.com",
"linkedin_url": "https://linkedin.com/in/johnsmith",
"homeowner": "Y",
"gender": "M",
"age_range": "35-44",
"is_married": true,
"has_children": true,
"income_range": "$120,000 to $149,999",
"net_worth": "$150,000 to $249,999",
"job_title": "Senior Solar Installation Technician",
"seniority_level": "Senior",
"department": "Installation"
},
{
"id": "73744cd32c95f69b95e9233f6a957d90",
"contractor_id": "8wKHB2ZNf",
"name": "Sarah Johnson",
"street_no": "456",
"street": "Pine Street",
"city": "Oakland",
"zip_code": "94611",
"zip_code_ext": "5678",
"state": "CA",
"phone": "(510) 555-0456",
"email": "sarah.j@personal.com",
"business_email": "s.johnson@company.com",
"linkedin_url": "https://linkedin.com/in/sarahjohnson",
"homeowner": "N",
"gender": "F",
"age_range": "25-34",
"is_married": false,
"has_children": false,
"income_range": "$75,000 to $100,000",
"net_worth": "$150,000 to $249,999",
"job_title": "Project Manager",
"seniority_level": "Mid",
"department": "Operations"
}
],
"size": 2,
"next_cursor": "eyJjb250cmFjdG9yX2l"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Contractors
Get Contractor Employees
Returns a paginated list of employees for a specific contractor.
GET
/
contractors
/
{id}
/
employees
Get Contractor Employees
curl --request GET \
--url https://api.shovels.ai/v2/contractors/{id}/employees \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.shovels.ai/v2/contractors/{id}/employees"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)HttpResponse<String> response = Unirest.get("https://api.shovels.ai/v2/contractors/{id}/employees")
.header("X-API-Key", "<api-key>")
.asString();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.shovels.ai/v2/contractors/{id}/employees"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.shovels.ai/v2/contractors/{id}/employees")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.shovels.ai/v2/contractors/{id}/employees",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"items": [
{
"id": "aa145cd32c95f69b95e9233f6a957a32",
"contractor_id": "8wKHB2ZNf",
"name": "John Smith",
"street_no": "123",
"street": "Oak Avenue",
"city": "San Francisco",
"zip_code": "94105",
"zip_code_ext": "1234",
"state": "CA",
"phone": "(415) 555-0123",
"email": "john.smith@personal.com",
"business_email": "j.smith@company.com",
"linkedin_url": "https://linkedin.com/in/johnsmith",
"homeowner": "Y",
"gender": "M",
"age_range": "35-44",
"is_married": true,
"has_children": true,
"income_range": "$120,000 to $149,999",
"net_worth": "$150,000 to $249,999",
"job_title": "Senior Solar Installation Technician",
"seniority_level": "Senior",
"department": "Installation"
},
{
"id": "73744cd32c95f69b95e9233f6a957d90",
"contractor_id": "8wKHB2ZNf",
"name": "Sarah Johnson",
"street_no": "456",
"street": "Pine Street",
"city": "Oakland",
"zip_code": "94611",
"zip_code_ext": "5678",
"state": "CA",
"phone": "(510) 555-0456",
"email": "sarah.j@personal.com",
"business_email": "s.johnson@company.com",
"linkedin_url": "https://linkedin.com/in/sarahjohnson",
"homeowner": "N",
"gender": "F",
"age_range": "25-34",
"is_married": false,
"has_children": false,
"income_range": "$75,000 to $100,000",
"net_worth": "$150,000 to $249,999",
"job_title": "Project Manager",
"seniority_level": "Mid",
"department": "Operations"
}
],
"size": 2,
"next_cursor": "eyJjb250cmFjdG9yX2l"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Path Parameters
Filter by the specified contractor ID.
Query Parameters
Cursor for pagination
Required range:
1 <= x <= 100Response
A list of employees associated with the contractor.
Schema for paginated employees list response.
The list of items returned in the response following given criteria.
Show child attributes
Show child attributes
The number of items returned in the response.
The cursor for retrieving the next page of results.
Total result count (capped at 10,000). Present on first-page responses when include_count=true. null if the count query timed out.
Show child attributes
Show child attributes
Was this page helpful?
⌘I
