curl --request POST \
--url https://api.statisfy.com/v1/integrations/crm/records/{entity_type}/{record_id}/push \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.statisfy.com/v1/integrations/crm/records/{entity_type}/{record_id}/push"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.statisfy.com/v1/integrations/crm/records/{entity_type}/{record_id}/push', 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.statisfy.com/v1/integrations/crm/records/{entity_type}/{record_id}/push",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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.statisfy.com/v1/integrations/crm/records/{entity_type}/{record_id}/push"
req, _ := http.NewRequest("POST", 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.post("https://api.statisfy.com/v1/integrations/crm/records/{entity_type}/{record_id}/push")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/integrations/crm/records/{entity_type}/{record_id}/push")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"entity_type": "account",
"errors": [
"<string>"
],
"issue": {
"crm": "<string>",
"destinations": [
{
"attempts": 123,
"crm": "<string>",
"crm_response": "<string>",
"errors": [
{
"code": "<string>",
"fields": [
"<string>"
],
"message": "<string>"
}
],
"last_attempt_at": "2023-11-07T05:31:56Z",
"max_attempts": 123,
"rejected_fields": [
"<string>"
],
"state": "ERRORED",
"status_code": 123
}
],
"entity_type": "account",
"error": "<string>",
"last_attempt_at": "2023-11-07T05:31:56Z",
"record_id": "<string>",
"state": "ERRORED"
},
"reason": "<string>",
"record_id": "<string>",
"status": "SYNCED"
}Push a record to the CRM now (retry a sync issue)
Writes one account, opportunity or contact to the workspace’s CRM now, as Retry on a record’s sync issue does in the app, and answers what the CRM said, with the record’s sync issue after it. An account goes to every CRM its write-back is on for. The admin’s CRM write-back switch is honoured, and checked first, as in the app: with it off, nothing is pushed and the answer is OFF, whether or not the record exists. With it on, a record that does not exist is a 404. An opportunity id that is not a number is always a 422.
curl --request POST \
--url https://api.statisfy.com/v1/integrations/crm/records/{entity_type}/{record_id}/push \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.statisfy.com/v1/integrations/crm/records/{entity_type}/{record_id}/push"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.statisfy.com/v1/integrations/crm/records/{entity_type}/{record_id}/push', 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.statisfy.com/v1/integrations/crm/records/{entity_type}/{record_id}/push",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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.statisfy.com/v1/integrations/crm/records/{entity_type}/{record_id}/push"
req, _ := http.NewRequest("POST", 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.post("https://api.statisfy.com/v1/integrations/crm/records/{entity_type}/{record_id}/push")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.statisfy.com/v1/integrations/crm/records/{entity_type}/{record_id}/push")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"entity_type": "account",
"errors": [
"<string>"
],
"issue": {
"crm": "<string>",
"destinations": [
{
"attempts": 123,
"crm": "<string>",
"crm_response": "<string>",
"errors": [
{
"code": "<string>",
"fields": [
"<string>"
],
"message": "<string>"
}
],
"last_attempt_at": "2023-11-07T05:31:56Z",
"max_attempts": 123,
"rejected_fields": [
"<string>"
],
"state": "ERRORED",
"status_code": 123
}
],
"entity_type": "account",
"error": "<string>",
"last_attempt_at": "2023-11-07T05:31:56Z",
"record_id": "<string>",
"state": "ERRORED"
},
"reason": "<string>",
"record_id": "<string>",
"status": "SYNCED"
}Authorizations
An API key, sent as Authorization: Bearer stfy_live_…. See Authentication for how to get one and which scopes it needs.
Path Parameters
Response
Successful Response
SYNCED: the CRM took it; FAILED: the CRM refused it (see errors and issue); SKIPPED: there was nothing to push, or the record is not one the sync pushes (reason); OFF: CRM write-back for this entity type is off (reason; PATCH /v1/settings/crm-sync turns it on)
SYNCED, FAILED, SKIPPED, OFF Was this page helpful?