Get account
curl --request GET \
--url https://api.contractorscloud.com/api/v1/accounts/{accountId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.contractorscloud.com/api/v1/accounts/{accountId}"
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/accounts/{accountId}', 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/accounts/{accountId}",
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/accounts/{accountId}"
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/accounts/{accountId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.contractorscloud.com/api/v1/accounts/{accountId}")
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": 5190,
"tenant_id": 12,
"rep_id": 1159,
"created_by": 1159,
"type": 0,
"name": null,
"address_street": "482 Birchwood Ave",
"address_city": "Madison",
"address_state": "WI",
"address_zip": "53703",
"address_latitude": "43.073100",
"address_longitude": "-89.401200",
"shipping_address_street": null,
"shipping_address_city": null,
"shipping_address_state": null,
"shipping_address_zip": null,
"notes": "Prefers email communication.",
"is_taxable": true,
"is_portal_enabled": true,
"merge_status": 0,
"primary_prefix": 3,
"primary_first_name": "Jane",
"primary_last_name": "Smith",
"primary_title_id": null,
"primary_nick_name": null,
"primary_phone_home": null,
"primary_phone_work": null,
"primary_phone_work_ext": null,
"primary_phone_cell": "(555) 201-4477",
"primary_phone_fax": null,
"primary_email": "jane.smith@example.com",
"secondary_prefix": 0,
"secondary_first_name": null,
"secondary_last_name": null,
"secondary_title_id": null,
"secondary_nick_name": null,
"secondary_phone_home": null,
"secondary_phone_work": null,
"secondary_phone_work_ext": null,
"secondary_phone_cell": null,
"secondary_phone_fax": null,
"secondary_email": null,
"tertiary_prefix": 0,
"tertiary_first_name": null,
"tertiary_last_name": null,
"tertiary_title_id": null,
"tertiary_nick_name": null,
"tertiary_phone_home": null,
"tertiary_phone_work": null,
"tertiary_phone_work_ext": null,
"tertiary_phone_cell": null,
"tertiary_phone_fax": null,
"tertiary_email": null,
"created_at": "2024-09-14 11:20:00",
"updated_at": "2025-02-03 16:45:00"
}{
"message": "Unauthenticated."
}{
"message": "The requested resource could not be found."
}Accounts
Get account
Returns a single account by id. Depending on your permission level, an account outside your visible scope returns a 404 the same as a nonexistent one.
GET
/
accounts
/
{accountId}
Get account
curl --request GET \
--url https://api.contractorscloud.com/api/v1/accounts/{accountId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.contractorscloud.com/api/v1/accounts/{accountId}"
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/accounts/{accountId}', 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/accounts/{accountId}",
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/accounts/{accountId}"
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/accounts/{accountId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.contractorscloud.com/api/v1/accounts/{accountId}")
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": 5190,
"tenant_id": 12,
"rep_id": 1159,
"created_by": 1159,
"type": 0,
"name": null,
"address_street": "482 Birchwood Ave",
"address_city": "Madison",
"address_state": "WI",
"address_zip": "53703",
"address_latitude": "43.073100",
"address_longitude": "-89.401200",
"shipping_address_street": null,
"shipping_address_city": null,
"shipping_address_state": null,
"shipping_address_zip": null,
"notes": "Prefers email communication.",
"is_taxable": true,
"is_portal_enabled": true,
"merge_status": 0,
"primary_prefix": 3,
"primary_first_name": "Jane",
"primary_last_name": "Smith",
"primary_title_id": null,
"primary_nick_name": null,
"primary_phone_home": null,
"primary_phone_work": null,
"primary_phone_work_ext": null,
"primary_phone_cell": "(555) 201-4477",
"primary_phone_fax": null,
"primary_email": "jane.smith@example.com",
"secondary_prefix": 0,
"secondary_first_name": null,
"secondary_last_name": null,
"secondary_title_id": null,
"secondary_nick_name": null,
"secondary_phone_home": null,
"secondary_phone_work": null,
"secondary_phone_work_ext": null,
"secondary_phone_cell": null,
"secondary_phone_fax": null,
"secondary_email": null,
"tertiary_prefix": 0,
"tertiary_first_name": null,
"tertiary_last_name": null,
"tertiary_title_id": null,
"tertiary_nick_name": null,
"tertiary_phone_home": null,
"tertiary_phone_work": null,
"tertiary_phone_work_ext": null,
"tertiary_phone_cell": null,
"tertiary_phone_fax": null,
"tertiary_email": null,
"created_at": "2024-09-14 11:20:00",
"updated_at": "2025-02-03 16:45:00"
}{
"message": "Unauthenticated."
}{
"message": "The requested resource could not be found."
}Authorizations
Query Parameters
Response
The requested account.