Get rep assignment
curl --request GET \
--url https://api.contractorscloud.com/api/v1/lead-connections/{leadConnectionId}/rep-assignments/{repAssignmentId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.contractorscloud.com/api/v1/lead-connections/{leadConnectionId}/rep-assignments/{repAssignmentId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.contractorscloud.com/api/v1/lead-connections/{leadConnectionId}/rep-assignments/{repAssignmentId}', 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.contractorscloud.com/api/v1/lead-connections/{leadConnectionId}/rep-assignments/{repAssignmentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.contractorscloud.com/api/v1/lead-connections/{leadConnectionId}/rep-assignments/{repAssignmentId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.contractorscloud.com/api/v1/lead-connections/{leadConnectionId}/rep-assignments/{repAssignmentId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.contractorscloud.com/api/v1/lead-connections/{leadConnectionId}/rep-assignments/{repAssignmentId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "6f3a9c1e-4b7d-4e2a-8f5c-1d9b3a6e7c20",
"tenant_id": 12,
"lead_connection_id": "3f9a2b6c-1d4e-4a8b-9c2f-7e5d6a1b8c30",
"rep_id": 1159,
"last_lead_assigned_at": "2025-02-09 16:40:12",
"created_at": "2025-01-06 10:00:00",
"updated_at": "2025-02-09 16:40:12"
}{
"message": "Unauthenticated."
}{
"message": "The requested resource could not be found."
}Rep Assignments
Get rep assignment
Returns a single rep assignment by id.
GET
/
lead-connections
/
{leadConnectionId}
/
rep-assignments
/
{repAssignmentId}
Get rep assignment
curl --request GET \
--url https://api.contractorscloud.com/api/v1/lead-connections/{leadConnectionId}/rep-assignments/{repAssignmentId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.contractorscloud.com/api/v1/lead-connections/{leadConnectionId}/rep-assignments/{repAssignmentId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.contractorscloud.com/api/v1/lead-connections/{leadConnectionId}/rep-assignments/{repAssignmentId}', 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.contractorscloud.com/api/v1/lead-connections/{leadConnectionId}/rep-assignments/{repAssignmentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.contractorscloud.com/api/v1/lead-connections/{leadConnectionId}/rep-assignments/{repAssignmentId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.contractorscloud.com/api/v1/lead-connections/{leadConnectionId}/rep-assignments/{repAssignmentId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.contractorscloud.com/api/v1/lead-connections/{leadConnectionId}/rep-assignments/{repAssignmentId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "6f3a9c1e-4b7d-4e2a-8f5c-1d9b3a6e7c20",
"tenant_id": 12,
"lead_connection_id": "3f9a2b6c-1d4e-4a8b-9c2f-7e5d6a1b8c30",
"rep_id": 1159,
"last_lead_assigned_at": "2025-02-09 16:40:12",
"created_at": "2025-01-06 10:00:00",
"updated_at": "2025-02-09 16:40:12"
}{
"message": "Unauthenticated."
}{
"message": "The requested resource could not be found."
}Authorizations
Path Parameters
Response
The requested rep assignment.
Timestamp when this rep was last assigned a lead, formatted as YYYY-MM-DD HH:MM:SS. Null if this rep hasn't been assigned a lead yet, which puts them first in line for the next one. The rotation always assigns to whichever assigned rep has waited longest.
Example:
"2025-02-09 16:40:12"