curl --request PATCH \
--url https://api.heffl.com/api/v2/companies/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "<string>",
"email": "[email protected]",
"phone": "<string>",
"taxNumber": "<string>",
"website": "<string>",
"description": "<string>",
"linkedin": "<string>",
"currency": "<string>",
"openingBalance": 1,
"showJobAmountToWorker": true,
"isClientPortalEnabled": true,
"internalNotes": "<string>",
"stageId": "<string>",
"ownerUserId": "<string>",
"vendorId": "<string>",
"sourceId": "<string>",
"billingAddress": {
"city": "<string>",
"address": "<string>",
"landmark": "<string>",
"state": "<string>",
"country": "<string>",
"postalCode": "<string>"
},
"primaryContact": {}
}
'import requests
url = "https://api.heffl.com/api/v2/companies/{id}"
payload = {
"name": "<string>",
"email": "[email protected]",
"phone": "<string>",
"taxNumber": "<string>",
"website": "<string>",
"description": "<string>",
"linkedin": "<string>",
"currency": "<string>",
"openingBalance": 1,
"showJobAmountToWorker": True,
"isClientPortalEnabled": True,
"internalNotes": "<string>",
"stageId": "<string>",
"ownerUserId": "<string>",
"vendorId": "<string>",
"sourceId": "<string>",
"billingAddress": {
"city": "<string>",
"address": "<string>",
"landmark": "<string>",
"state": "<string>",
"country": "<string>",
"postalCode": "<string>"
},
"primaryContact": {}
}
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>',
email: '[email protected]',
phone: '<string>',
taxNumber: '<string>',
website: '<string>',
description: '<string>',
linkedin: '<string>',
currency: '<string>',
openingBalance: 1,
showJobAmountToWorker: true,
isClientPortalEnabled: true,
internalNotes: '<string>',
stageId: '<string>',
ownerUserId: '<string>',
vendorId: '<string>',
sourceId: '<string>',
billingAddress: {
city: '<string>',
address: '<string>',
landmark: '<string>',
state: '<string>',
country: '<string>',
postalCode: '<string>'
},
primaryContact: {}
})
};
fetch('https://api.heffl.com/api/v2/companies/{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/v2/companies/{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>',
'email' => '[email protected]',
'phone' => '<string>',
'taxNumber' => '<string>',
'website' => '<string>',
'description' => '<string>',
'linkedin' => '<string>',
'currency' => '<string>',
'openingBalance' => 1,
'showJobAmountToWorker' => true,
'isClientPortalEnabled' => true,
'internalNotes' => '<string>',
'stageId' => '<string>',
'ownerUserId' => '<string>',
'vendorId' => '<string>',
'sourceId' => '<string>',
'billingAddress' => [
'city' => '<string>',
'address' => '<string>',
'landmark' => '<string>',
'state' => '<string>',
'country' => '<string>',
'postalCode' => '<string>'
],
'primaryContact' => [
]
]),
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/v2/companies/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"email\": \"[email protected]\",\n \"phone\": \"<string>\",\n \"taxNumber\": \"<string>\",\n \"website\": \"<string>\",\n \"description\": \"<string>\",\n \"linkedin\": \"<string>\",\n \"currency\": \"<string>\",\n \"openingBalance\": 1,\n \"showJobAmountToWorker\": true,\n \"isClientPortalEnabled\": true,\n \"internalNotes\": \"<string>\",\n \"stageId\": \"<string>\",\n \"ownerUserId\": \"<string>\",\n \"vendorId\": \"<string>\",\n \"sourceId\": \"<string>\",\n \"billingAddress\": {\n \"city\": \"<string>\",\n \"address\": \"<string>\",\n \"landmark\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"primaryContact\": {}\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/v2/companies/{id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"email\": \"[email protected]\",\n \"phone\": \"<string>\",\n \"taxNumber\": \"<string>\",\n \"website\": \"<string>\",\n \"description\": \"<string>\",\n \"linkedin\": \"<string>\",\n \"currency\": \"<string>\",\n \"openingBalance\": 1,\n \"showJobAmountToWorker\": true,\n \"isClientPortalEnabled\": true,\n \"internalNotes\": \"<string>\",\n \"stageId\": \"<string>\",\n \"ownerUserId\": \"<string>\",\n \"vendorId\": \"<string>\",\n \"sourceId\": \"<string>\",\n \"billingAddress\": {\n \"city\": \"<string>\",\n \"address\": \"<string>\",\n \"landmark\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"primaryContact\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.heffl.com/api/v2/companies/{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 \"email\": \"[email protected]\",\n \"phone\": \"<string>\",\n \"taxNumber\": \"<string>\",\n \"website\": \"<string>\",\n \"description\": \"<string>\",\n \"linkedin\": \"<string>\",\n \"currency\": \"<string>\",\n \"openingBalance\": 1,\n \"showJobAmountToWorker\": true,\n \"isClientPortalEnabled\": true,\n \"internalNotes\": \"<string>\",\n \"stageId\": \"<string>\",\n \"ownerUserId\": \"<string>\",\n \"vendorId\": \"<string>\",\n \"sourceId\": \"<string>\",\n \"billingAddress\": {\n \"city\": \"<string>\",\n \"address\": \"<string>\",\n \"landmark\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"primaryContact\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"number": "<string>",
"openingBalance": 123,
"showJobAmountToWorker": true,
"isClientPortalEnabled": true,
"email": "<string>",
"phone": "<string>",
"taxNumber": "<string>",
"website": "<string>",
"description": "<string>",
"stageId": "<string>",
"stageName": "<string>",
"ownerUserId": "<string>",
"crmSourceId": "<string>",
"sourceName": "<string>",
"currency": "<string>",
"internalNotes": "<string>",
"linkedin": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}Update a company
Updates an existing company. Only provided fields will be updated. Custom field values use cf_* keys — see the Custom fields guide.
curl --request PATCH \
--url https://api.heffl.com/api/v2/companies/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "<string>",
"email": "[email protected]",
"phone": "<string>",
"taxNumber": "<string>",
"website": "<string>",
"description": "<string>",
"linkedin": "<string>",
"currency": "<string>",
"openingBalance": 1,
"showJobAmountToWorker": true,
"isClientPortalEnabled": true,
"internalNotes": "<string>",
"stageId": "<string>",
"ownerUserId": "<string>",
"vendorId": "<string>",
"sourceId": "<string>",
"billingAddress": {
"city": "<string>",
"address": "<string>",
"landmark": "<string>",
"state": "<string>",
"country": "<string>",
"postalCode": "<string>"
},
"primaryContact": {}
}
'import requests
url = "https://api.heffl.com/api/v2/companies/{id}"
payload = {
"name": "<string>",
"email": "[email protected]",
"phone": "<string>",
"taxNumber": "<string>",
"website": "<string>",
"description": "<string>",
"linkedin": "<string>",
"currency": "<string>",
"openingBalance": 1,
"showJobAmountToWorker": True,
"isClientPortalEnabled": True,
"internalNotes": "<string>",
"stageId": "<string>",
"ownerUserId": "<string>",
"vendorId": "<string>",
"sourceId": "<string>",
"billingAddress": {
"city": "<string>",
"address": "<string>",
"landmark": "<string>",
"state": "<string>",
"country": "<string>",
"postalCode": "<string>"
},
"primaryContact": {}
}
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>',
email: '[email protected]',
phone: '<string>',
taxNumber: '<string>',
website: '<string>',
description: '<string>',
linkedin: '<string>',
currency: '<string>',
openingBalance: 1,
showJobAmountToWorker: true,
isClientPortalEnabled: true,
internalNotes: '<string>',
stageId: '<string>',
ownerUserId: '<string>',
vendorId: '<string>',
sourceId: '<string>',
billingAddress: {
city: '<string>',
address: '<string>',
landmark: '<string>',
state: '<string>',
country: '<string>',
postalCode: '<string>'
},
primaryContact: {}
})
};
fetch('https://api.heffl.com/api/v2/companies/{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/v2/companies/{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>',
'email' => '[email protected]',
'phone' => '<string>',
'taxNumber' => '<string>',
'website' => '<string>',
'description' => '<string>',
'linkedin' => '<string>',
'currency' => '<string>',
'openingBalance' => 1,
'showJobAmountToWorker' => true,
'isClientPortalEnabled' => true,
'internalNotes' => '<string>',
'stageId' => '<string>',
'ownerUserId' => '<string>',
'vendorId' => '<string>',
'sourceId' => '<string>',
'billingAddress' => [
'city' => '<string>',
'address' => '<string>',
'landmark' => '<string>',
'state' => '<string>',
'country' => '<string>',
'postalCode' => '<string>'
],
'primaryContact' => [
]
]),
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/v2/companies/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"email\": \"[email protected]\",\n \"phone\": \"<string>\",\n \"taxNumber\": \"<string>\",\n \"website\": \"<string>\",\n \"description\": \"<string>\",\n \"linkedin\": \"<string>\",\n \"currency\": \"<string>\",\n \"openingBalance\": 1,\n \"showJobAmountToWorker\": true,\n \"isClientPortalEnabled\": true,\n \"internalNotes\": \"<string>\",\n \"stageId\": \"<string>\",\n \"ownerUserId\": \"<string>\",\n \"vendorId\": \"<string>\",\n \"sourceId\": \"<string>\",\n \"billingAddress\": {\n \"city\": \"<string>\",\n \"address\": \"<string>\",\n \"landmark\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"primaryContact\": {}\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/v2/companies/{id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"email\": \"[email protected]\",\n \"phone\": \"<string>\",\n \"taxNumber\": \"<string>\",\n \"website\": \"<string>\",\n \"description\": \"<string>\",\n \"linkedin\": \"<string>\",\n \"currency\": \"<string>\",\n \"openingBalance\": 1,\n \"showJobAmountToWorker\": true,\n \"isClientPortalEnabled\": true,\n \"internalNotes\": \"<string>\",\n \"stageId\": \"<string>\",\n \"ownerUserId\": \"<string>\",\n \"vendorId\": \"<string>\",\n \"sourceId\": \"<string>\",\n \"billingAddress\": {\n \"city\": \"<string>\",\n \"address\": \"<string>\",\n \"landmark\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"primaryContact\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.heffl.com/api/v2/companies/{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 \"email\": \"[email protected]\",\n \"phone\": \"<string>\",\n \"taxNumber\": \"<string>\",\n \"website\": \"<string>\",\n \"description\": \"<string>\",\n \"linkedin\": \"<string>\",\n \"currency\": \"<string>\",\n \"openingBalance\": 1,\n \"showJobAmountToWorker\": true,\n \"isClientPortalEnabled\": true,\n \"internalNotes\": \"<string>\",\n \"stageId\": \"<string>\",\n \"ownerUserId\": \"<string>\",\n \"vendorId\": \"<string>\",\n \"sourceId\": \"<string>\",\n \"billingAddress\": {\n \"city\": \"<string>\",\n \"address\": \"<string>\",\n \"landmark\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"postalCode\": \"<string>\"\n },\n \"primaryContact\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"number": "<string>",
"openingBalance": 123,
"showJobAmountToWorker": true,
"isClientPortalEnabled": true,
"email": "<string>",
"phone": "<string>",
"taxNumber": "<string>",
"website": "<string>",
"description": "<string>",
"stageId": "<string>",
"stageName": "<string>",
"ownerUserId": "<string>",
"crmSourceId": "<string>",
"sourceName": "<string>",
"currency": "<string>",
"internalNotes": "<string>",
"linkedin": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}Authorizations
API key for authentication. Get yours at app.heffl.com/settings/developers
Path Parameters
Company ID
Body
Company name
Email address
Phone number with country code
Tax number
Website URL
Description
LinkedIn URL
3-letter ISO currency code
Opening balance
x >= 0Whether job amounts are visible to field workers
Whether the client portal is enabled
Internal notes
Client stage ID
Owner user ID
Vendor ID
CRM source ID
Show child attributes
Show child attributes
Optional primary contact fields to create or update
Custom field values using cf_* keys (for example cf_industry). Only documented fields and cf_* keys are accepted.
Response
OK
Company ID
Company name
Auto-generated company number
Opening balance
Whether job amounts are visible to field workers
Whether the client portal is enabled
Record type (always company for this endpoint)
contact, company Email address
Phone number
Tax number
Website URL
Description
Client stage ID
Client stage label
Owner user ID
CRM source ID
CRM source name
Currency code
Internal notes
LinkedIn URL
When the company was created
When the company was last updated
Custom field values as top-level cf_* keys (for example cf_industry). There is no customFields wrapper.