Fetch a single contact by ID
curl --request GET \
--url https://api.salescaptain.com/v1/fetch-contact/{contact_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.salescaptain.com/v1/fetch-contact/{contact_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.salescaptain.com/v1/fetch-contact/{contact_id}', 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.salescaptain.com/v1/fetch-contact/{contact_id}",
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.salescaptain.com/v1/fetch-contact/{contact_id}"
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.salescaptain.com/v1/fetch-contact/{contact_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.salescaptain.com/v1/fetch-contact/{contact_id}")
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{
"message": "Contact fetched successfully!",
"contacts": {
"data": {
"contact_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"name": "John Doe",
"phone": "+14155551234",
"email": "john.doe@example.com",
"created_at": "2024-01-15T10:30:00.000Z",
"updated_at": "2024-02-20T14:45:00.000Z",
"tags": [
"VIP",
"New Lead",
"Follow Up"
],
"custom_fields": [
{
"cf_name": "Industry",
"cf_value": "Technology"
},
{
"cf_name": "Budget",
"cf_value": "50000"
},
{
"cf_name": "Source",
"cf_value": "Website"
}
]
}
}
}{
"status": "failure",
"error": "Required parameters missing: contact_id"
}{
"error": "Unauthorized access",
"code": "UNAUTHORIZED",
"timestamp": "2023-12-01T10:30:00Z",
"path": "/v1/fetch-companies"
}{
"error": "Forbidden access",
"code": "FORBIDDEN",
"timestamp": "2023-12-01T10:30:00Z",
"path": "/v1/fetch-companies"
}{
"status": "failure",
"error": "Problem encountered while fetching contact!"
}{
"error": "Too many requests, please try again later",
"code": "RATE_LIMIT_EXCEEDED",
"timestamp": "2023-12-01T10:30:00Z",
"path": "/v1/fetch-companies"
}{
"error": "Problem encountered while fetching companies!",
"code": "INTERNAL_ERROR",
"timestamp": "2023-12-01T10:30:00Z",
"path": "/v1/fetch-companies"
}Contacts
Get a contact by ID
Retrieves detailed information about a specific contact by its unique identifier.
GET
/
v1
/
fetch-contact
/
{contact_id}
Fetch a single contact by ID
curl --request GET \
--url https://api.salescaptain.com/v1/fetch-contact/{contact_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.salescaptain.com/v1/fetch-contact/{contact_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.salescaptain.com/v1/fetch-contact/{contact_id}', 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.salescaptain.com/v1/fetch-contact/{contact_id}",
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.salescaptain.com/v1/fetch-contact/{contact_id}"
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.salescaptain.com/v1/fetch-contact/{contact_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.salescaptain.com/v1/fetch-contact/{contact_id}")
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{
"message": "Contact fetched successfully!",
"contacts": {
"data": {
"contact_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"name": "John Doe",
"phone": "+14155551234",
"email": "john.doe@example.com",
"created_at": "2024-01-15T10:30:00.000Z",
"updated_at": "2024-02-20T14:45:00.000Z",
"tags": [
"VIP",
"New Lead",
"Follow Up"
],
"custom_fields": [
{
"cf_name": "Industry",
"cf_value": "Technology"
},
{
"cf_name": "Budget",
"cf_value": "50000"
},
{
"cf_name": "Source",
"cf_value": "Website"
}
]
}
}
}{
"status": "failure",
"error": "Required parameters missing: contact_id"
}{
"error": "Unauthorized access",
"code": "UNAUTHORIZED",
"timestamp": "2023-12-01T10:30:00Z",
"path": "/v1/fetch-companies"
}{
"error": "Forbidden access",
"code": "FORBIDDEN",
"timestamp": "2023-12-01T10:30:00Z",
"path": "/v1/fetch-companies"
}{
"status": "failure",
"error": "Problem encountered while fetching contact!"
}{
"error": "Too many requests, please try again later",
"code": "RATE_LIMIT_EXCEEDED",
"timestamp": "2023-12-01T10:30:00Z",
"path": "/v1/fetch-companies"
}{
"error": "Problem encountered while fetching companies!",
"code": "INTERNAL_ERROR",
"timestamp": "2023-12-01T10:30:00Z",
"path": "/v1/fetch-companies"
}Authorizations
Authentication token required for accessing protected endpoints. The token should be obtained from the main SalesCaptain authentication service.
Path Parameters
Unique identifier for the contact
Example:
"f47ac10b-58cc-4372-a567-0e02b2c3d479"
⌘I

