curl --request PATCH \
--url https://api.heffl.com/api/v1/clients/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"salutation": "<string>",
"phone": "<string>",
"email": "[email protected]",
"jobTitle": "<string>",
"website": "<unknown>",
"taxNumber": "<string>",
"billingAddress": {
"city": "<string>",
"address": "<string>",
"landmark": "<string>",
"state": "<string>",
"country": "<string>",
"postalCode": "<string>"
}
}
'import requests
url = "https://api.heffl.com/api/v1/clients/{id}"
payload = {
"name": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"salutation": "<string>",
"phone": "<string>",
"email": "[email protected]",
"jobTitle": "<string>",
"website": "<unknown>",
"taxNumber": "<string>",
"billingAddress": {
"city": "<string>",
"address": "<string>",
"landmark": "<string>",
"state": "<string>",
"country": "<string>",
"postalCode": "<string>"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
firstName: '<string>',
lastName: '<string>',
salutation: '<string>',
phone: '<string>',
email: '[email protected]',
jobTitle: '<string>',
website: '<unknown>',
taxNumber: '<string>',
billingAddress: {
city: '<string>',
address: '<string>',
landmark: '<string>',
state: '<string>',
country: '<string>',
postalCode: '<string>'
}
})
};
fetch('https://api.heffl.com/api/v1/clients/{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.heffl.com/api/v1/clients/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'firstName' => '<string>',
'lastName' => '<string>',
'salutation' => '<string>',
'phone' => '<string>',
'email' => '[email protected]',
'jobTitle' => '<string>',
'website' => '<unknown>',
'taxNumber' => '<string>',
'billingAddress' => [
'city' => '<string>',
'address' => '<string>',
'landmark' => '<string>',
'state' => '<string>',
'country' => '<string>',
'postalCode' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.heffl.com/api/v1/clients/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"salutation\": \"<string>\",\n \"phone\": \"<string>\",\n \"email\": \"[email protected]\",\n \"jobTitle\": \"<string>\",\n \"website\": \"<unknown>\",\n \"taxNumber\": \"<string>\",\n \"billingAddress\": {\n \"city\": \"<string>\",\n \"address\": \"<string>\",\n \"landmark\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"postalCode\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.heffl.com/api/v1/clients/{id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"salutation\": \"<string>\",\n \"phone\": \"<string>\",\n \"email\": \"[email protected]\",\n \"jobTitle\": \"<string>\",\n \"website\": \"<unknown>\",\n \"taxNumber\": \"<string>\",\n \"billingAddress\": {\n \"city\": \"<string>\",\n \"address\": \"<string>\",\n \"landmark\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"postalCode\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.heffl.com/api/v1/clients/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"salutation\": \"<string>\",\n \"phone\": \"<string>\",\n \"email\": \"[email protected]\",\n \"jobTitle\": \"<string>\",\n \"website\": \"<unknown>\",\n \"taxNumber\": \"<string>\",\n \"billingAddress\": {\n \"city\": \"<string>\",\n \"address\": \"<string>\",\n \"landmark\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"postalCode\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"number": "<string>",
"name": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"phone": "<string>",
"website": "<string>",
"stageId": "<string>",
"customFields": {}
}Update a client
Updates an existing client/company in your CRM. Only provided fields will be updated.
curl --request PATCH \
--url https://api.heffl.com/api/v1/clients/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"salutation": "<string>",
"phone": "<string>",
"email": "[email protected]",
"jobTitle": "<string>",
"website": "<unknown>",
"taxNumber": "<string>",
"billingAddress": {
"city": "<string>",
"address": "<string>",
"landmark": "<string>",
"state": "<string>",
"country": "<string>",
"postalCode": "<string>"
}
}
'import requests
url = "https://api.heffl.com/api/v1/clients/{id}"
payload = {
"name": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"salutation": "<string>",
"phone": "<string>",
"email": "[email protected]",
"jobTitle": "<string>",
"website": "<unknown>",
"taxNumber": "<string>",
"billingAddress": {
"city": "<string>",
"address": "<string>",
"landmark": "<string>",
"state": "<string>",
"country": "<string>",
"postalCode": "<string>"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
firstName: '<string>',
lastName: '<string>',
salutation: '<string>',
phone: '<string>',
email: '[email protected]',
jobTitle: '<string>',
website: '<unknown>',
taxNumber: '<string>',
billingAddress: {
city: '<string>',
address: '<string>',
landmark: '<string>',
state: '<string>',
country: '<string>',
postalCode: '<string>'
}
})
};
fetch('https://api.heffl.com/api/v1/clients/{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.heffl.com/api/v1/clients/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'firstName' => '<string>',
'lastName' => '<string>',
'salutation' => '<string>',
'phone' => '<string>',
'email' => '[email protected]',
'jobTitle' => '<string>',
'website' => '<unknown>',
'taxNumber' => '<string>',
'billingAddress' => [
'city' => '<string>',
'address' => '<string>',
'landmark' => '<string>',
'state' => '<string>',
'country' => '<string>',
'postalCode' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.heffl.com/api/v1/clients/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"salutation\": \"<string>\",\n \"phone\": \"<string>\",\n \"email\": \"[email protected]\",\n \"jobTitle\": \"<string>\",\n \"website\": \"<unknown>\",\n \"taxNumber\": \"<string>\",\n \"billingAddress\": {\n \"city\": \"<string>\",\n \"address\": \"<string>\",\n \"landmark\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"postalCode\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.heffl.com/api/v1/clients/{id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"salutation\": \"<string>\",\n \"phone\": \"<string>\",\n \"email\": \"[email protected]\",\n \"jobTitle\": \"<string>\",\n \"website\": \"<unknown>\",\n \"taxNumber\": \"<string>\",\n \"billingAddress\": {\n \"city\": \"<string>\",\n \"address\": \"<string>\",\n \"landmark\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"postalCode\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.heffl.com/api/v1/clients/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"salutation\": \"<string>\",\n \"phone\": \"<string>\",\n \"email\": \"[email protected]\",\n \"jobTitle\": \"<string>\",\n \"website\": \"<unknown>\",\n \"taxNumber\": \"<string>\",\n \"billingAddress\": {\n \"city\": \"<string>\",\n \"address\": \"<string>\",\n \"landmark\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"postalCode\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"number": "<string>",
"name": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"phone": "<string>",
"website": "<string>",
"stageId": "<string>",
"customFields": {}
}Authorizations
API key for authentication. Get yours at app.heffl.com/settings/developers
Path Parameters
Client public ID
Body
Client type: company for companies, contact for contacts
company, contact Company name (required for companies, optional for contacts)
First name (required for contacts, optional for companies)
Last name (optional for contacts)
Title (Mr., Mrs., Dr., etc.)
Phone number with country code
Email address
Job title or position
Company website URL
Tax ID or VAT number
Billing address details
Show child attributes
Show child attributes
Optional primary contact for company records
Show child attributes
Show child attributes
Response
OK
Client public ID
Auto-generated client number
Client name
Client type
company, contact When the client was created
First name (for contacts)
Last name (for contacts)
Email address
Phone number
Website URL
Client stage public ID
Custom field values
Show child attributes
Show child attributes