Contacts
Get specific contact
Get a specific contact by contact id.
GET
/
v1
/
contacts
/
{contactId}
Get specific contact
curl --request GET \
--url https://api.infinity.swiss/v1/contacts/{contactId} \
--header 'x-api-token: <api-key>'import requests
url = "https://api.infinity.swiss/v1/contacts/{contactId}"
headers = {"x-api-token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-token': '<api-key>'}};
fetch('https://api.infinity.swiss/v1/contacts/{contactId}', 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.infinity.swiss/v1/contacts/{contactId}",
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-token: <api-key>"
],
]);
$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.infinity.swiss/v1/contacts/{contactId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-token", "<api-key>")
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.infinity.swiss/v1/contacts/{contactId}")
.header("x-api-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.infinity.swiss/v1/contacts/{contactId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"contact": {
"id": "68234731e6074232892d18c4",
"companyName": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"streetName": "<string>",
"buildingNumber": "<string>",
"townName": "<string>",
"postCode": "3700",
"position": "<string>",
"email": "jsmith@example.com",
"mobile": "<string>",
"phone": "<string>",
"website": "<string>",
"formOfAddress": "<string>",
"note": "<string>",
"vatNumber": "<string>",
"country": "<string>",
"secondaryAddressLine": "<string>",
"customerIdentification": "<string>"
}
}{
"code": "general/unauthorised"
}{
"code": "contact/not-found"
}Authorizations
API token for authentication. Obtain from your Infinity account settings.
Path Parameters
The id of the specific contact
Response
The contact is returned.
Represents a contact, such as a supplier, client, partner, lead, etc.
Show child attributes
Show child attributes
Example:
{
"id": "6474bb0cccc5b63aae56fa15",
"companyName": "Complex GmbH",
"firstName": "Claudia",
"lastName": "Röthlisberger",
"streetName": "Frutigenstrasse",
"buildingNumber": "24",
"townName": "Spiez",
"postCode": "3700",
"country": "Schweiz",
"position": "Leiterin Bereich Metallurgie",
"email": "test@test.com",
"mobile": "079 111 22 33",
"phone": "052 111 22 33",
"website": "complex.swiss",
"category": "clients",
"formOfAddress": "",
"note": "Kontakt durch Startup-Nights.",
"vatNumber": "CHE 123.456.789 MWST",
"customerIdentification": "C-12345"
}
⌘I
Get specific contact
curl --request GET \
--url https://api.infinity.swiss/v1/contacts/{contactId} \
--header 'x-api-token: <api-key>'import requests
url = "https://api.infinity.swiss/v1/contacts/{contactId}"
headers = {"x-api-token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-token': '<api-key>'}};
fetch('https://api.infinity.swiss/v1/contacts/{contactId}', 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.infinity.swiss/v1/contacts/{contactId}",
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-token: <api-key>"
],
]);
$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.infinity.swiss/v1/contacts/{contactId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-token", "<api-key>")
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.infinity.swiss/v1/contacts/{contactId}")
.header("x-api-token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.infinity.swiss/v1/contacts/{contactId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"contact": {
"id": "68234731e6074232892d18c4",
"companyName": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"streetName": "<string>",
"buildingNumber": "<string>",
"townName": "<string>",
"postCode": "3700",
"position": "<string>",
"email": "jsmith@example.com",
"mobile": "<string>",
"phone": "<string>",
"website": "<string>",
"formOfAddress": "<string>",
"note": "<string>",
"vatNumber": "<string>",
"country": "<string>",
"secondaryAddressLine": "<string>",
"customerIdentification": "<string>"
}
}{
"code": "general/unauthorised"
}{
"code": "contact/not-found"
}