Get Contacts
curl --request GET \
--url https://api.sonderplan.com/v2/contact \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sonderplan.com/v2/contact"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sonderplan.com/v2/contact', 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.sonderplan.com/v2/contact",
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.sonderplan.com/v2/contact"
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.sonderplan.com/v2/contact")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sonderplan.com/v2/contact")
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{
"data": [
{
"id": 89420384,
"uuid": "p89420384",
"name": "Sam Smith",
"type": "person",
"linked_organization_id": 137834,
"linked_resource_id": 237449,
"client": true,
"user": true,
"resource": true,
"email_1": "[email protected]",
"email_2": "[email protected]",
"email_3": "",
"phone_1": "+1-541-754-3010",
"phone_2": "",
"phone_3": "",
"address_line_1": "Unit 1/43",
"address_line_2": "123 Example Street",
"address_line_3": "",
"address_city": "Surry Hills",
"address_state": "NSW",
"address_postcode": "2010",
"address_country": "Australia",
"website": "www.example.com",
"icon": {},
"custom_fields": [
{
"id": 7823,
"name": "Type",
"value": "Video Editing",
"value_id": 8973,
"update_key": "2_1_7823"
}
],
"created_id": 3,
"created": 1388552400,
"created_name": "John Smith",
"updated_id": 3,
"updated": 1388552400,
"updated_name": "John Smith"
}
],
"meta": {
"pagination": {
"total": 1,
"count": 1,
"per_page": 1,
"current_page": 1
}
}
}Contact
Get Contacts
You can create contacts for anyone you need to keep in touch with, such as your clients, suppliers, staff, or even resources.
Contacts help you store and organize important details like phone numbers, email addresses, and other contact information, making it easy to manage communication across your projects.
READ access to the CONTACT module is required to access this endpointUnlike virtually every other model, contact
Contacts may be either people or organizations and these are stored in separate tables in the database, each with its own auto-incrementing identifier.
The contacts model creates a union between these two tables to allow simplified operations under a single namespace.
id cannot be assumed to be unique. Use uuid instead.Contacts may be either people or organizations and these are stored in separate tables in the database, each with its own auto-incrementing identifier.
The contacts model creates a union between these two tables to allow simplified operations under a single namespace.
GET
/
v2
/
contact
Get Contacts
curl --request GET \
--url https://api.sonderplan.com/v2/contact \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sonderplan.com/v2/contact"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sonderplan.com/v2/contact', 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.sonderplan.com/v2/contact",
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.sonderplan.com/v2/contact"
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.sonderplan.com/v2/contact")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sonderplan.com/v2/contact")
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{
"data": [
{
"id": 89420384,
"uuid": "p89420384",
"name": "Sam Smith",
"type": "person",
"linked_organization_id": 137834,
"linked_resource_id": 237449,
"client": true,
"user": true,
"resource": true,
"email_1": "[email protected]",
"email_2": "[email protected]",
"email_3": "",
"phone_1": "+1-541-754-3010",
"phone_2": "",
"phone_3": "",
"address_line_1": "Unit 1/43",
"address_line_2": "123 Example Street",
"address_line_3": "",
"address_city": "Surry Hills",
"address_state": "NSW",
"address_postcode": "2010",
"address_country": "Australia",
"website": "www.example.com",
"icon": {},
"custom_fields": [
{
"id": 7823,
"name": "Type",
"value": "Video Editing",
"value_id": 8973,
"update_key": "2_1_7823"
}
],
"created_id": 3,
"created": 1388552400,
"created_name": "John Smith",
"updated_id": 3,
"updated": 1388552400,
"updated_name": "John Smith"
}
],
"meta": {
"pagination": {
"total": 1,
"count": 1,
"per_page": 1,
"current_page": 1
}
}
}