Trigger
curl --request POST \
--url https://api.integrations.commenda.io/v4/core/companies/{companyId}/syncs \
--header 'Content-Type: application/json' \
--header 'api_key: <api-key>' \
--data '
{
"dataModelsToSync": [
{
"enabled": true,
"scopeAccess": {
"READ": true,
"CREATE": true,
"UPDATE": true,
"DELETE": true
},
"interval": 123,
"syncFrom": {},
"isOverridden": true,
"isChild": true
}
],
"fullSync": false,
"isManualSync": true,
"notifyAllSyncedRecords": false
}
'import requests
url = "https://api.integrations.commenda.io/v4/core/companies/{companyId}/syncs"
payload = {
"dataModelsToSync": [
{
"enabled": True,
"scopeAccess": {
"READ": True,
"CREATE": True,
"UPDATE": True,
"DELETE": True
},
"interval": 123,
"syncFrom": {},
"isOverridden": True,
"isChild": True
}
],
"fullSync": False,
"isManualSync": True,
"notifyAllSyncedRecords": False
}
headers = {
"api_key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {api_key: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
dataModelsToSync: [
{
enabled: true,
scopeAccess: {READ: true, CREATE: true, UPDATE: true, DELETE: true},
interval: 123,
syncFrom: {},
isOverridden: true,
isChild: true
}
],
fullSync: false,
isManualSync: true,
notifyAllSyncedRecords: false
})
};
fetch('https://api.integrations.commenda.io/v4/core/companies/{companyId}/syncs', 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.integrations.commenda.io/v4/core/companies/{companyId}/syncs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'dataModelsToSync' => [
[
'enabled' => true,
'scopeAccess' => [
'READ' => true,
'CREATE' => true,
'UPDATE' => true,
'DELETE' => true
],
'interval' => 123,
'syncFrom' => [
],
'isOverridden' => true,
'isChild' => true
]
],
'fullSync' => false,
'isManualSync' => true,
'notifyAllSyncedRecords' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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.integrations.commenda.io/v4/core/companies/{companyId}/syncs"
payload := strings.NewReader("{\n \"dataModelsToSync\": [\n {\n \"enabled\": true,\n \"scopeAccess\": {\n \"READ\": true,\n \"CREATE\": true,\n \"UPDATE\": true,\n \"DELETE\": true\n },\n \"interval\": 123,\n \"syncFrom\": {},\n \"isOverridden\": true,\n \"isChild\": true\n }\n ],\n \"fullSync\": false,\n \"isManualSync\": true,\n \"notifyAllSyncedRecords\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("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.post("https://api.integrations.commenda.io/v4/core/companies/{companyId}/syncs")
.header("api_key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"dataModelsToSync\": [\n {\n \"enabled\": true,\n \"scopeAccess\": {\n \"READ\": true,\n \"CREATE\": true,\n \"UPDATE\": true,\n \"DELETE\": true\n },\n \"interval\": 123,\n \"syncFrom\": {},\n \"isOverridden\": true,\n \"isChild\": true\n }\n ],\n \"fullSync\": false,\n \"isManualSync\": true,\n \"notifyAllSyncedRecords\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.integrations.commenda.io/v4/core/companies/{companyId}/syncs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api_key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dataModelsToSync\": [\n {\n \"enabled\": true,\n \"scopeAccess\": {\n \"READ\": true,\n \"CREATE\": true,\n \"UPDATE\": true,\n \"DELETE\": true\n },\n \"interval\": 123,\n \"syncFrom\": {},\n \"isOverridden\": true,\n \"isChild\": true\n }\n ],\n \"fullSync\": false,\n \"isManualSync\": true,\n \"notifyAllSyncedRecords\": false\n}"
response = http.request(request)
puts response.read_body{
"data": {
"sync": {
"id": "<string>",
"dataModelsSyncing": []
}
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Syncs
Trigger
Starts a sync for the company’s active connection.
POST
/
v4
/
core
/
companies
/
{companyId}
/
syncs
Trigger
curl --request POST \
--url https://api.integrations.commenda.io/v4/core/companies/{companyId}/syncs \
--header 'Content-Type: application/json' \
--header 'api_key: <api-key>' \
--data '
{
"dataModelsToSync": [
{
"enabled": true,
"scopeAccess": {
"READ": true,
"CREATE": true,
"UPDATE": true,
"DELETE": true
},
"interval": 123,
"syncFrom": {},
"isOverridden": true,
"isChild": true
}
],
"fullSync": false,
"isManualSync": true,
"notifyAllSyncedRecords": false
}
'import requests
url = "https://api.integrations.commenda.io/v4/core/companies/{companyId}/syncs"
payload = {
"dataModelsToSync": [
{
"enabled": True,
"scopeAccess": {
"READ": True,
"CREATE": True,
"UPDATE": True,
"DELETE": True
},
"interval": 123,
"syncFrom": {},
"isOverridden": True,
"isChild": True
}
],
"fullSync": False,
"isManualSync": True,
"notifyAllSyncedRecords": False
}
headers = {
"api_key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {api_key: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
dataModelsToSync: [
{
enabled: true,
scopeAccess: {READ: true, CREATE: true, UPDATE: true, DELETE: true},
interval: 123,
syncFrom: {},
isOverridden: true,
isChild: true
}
],
fullSync: false,
isManualSync: true,
notifyAllSyncedRecords: false
})
};
fetch('https://api.integrations.commenda.io/v4/core/companies/{companyId}/syncs', 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.integrations.commenda.io/v4/core/companies/{companyId}/syncs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'dataModelsToSync' => [
[
'enabled' => true,
'scopeAccess' => [
'READ' => true,
'CREATE' => true,
'UPDATE' => true,
'DELETE' => true
],
'interval' => 123,
'syncFrom' => [
],
'isOverridden' => true,
'isChild' => true
]
],
'fullSync' => false,
'isManualSync' => true,
'notifyAllSyncedRecords' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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.integrations.commenda.io/v4/core/companies/{companyId}/syncs"
payload := strings.NewReader("{\n \"dataModelsToSync\": [\n {\n \"enabled\": true,\n \"scopeAccess\": {\n \"READ\": true,\n \"CREATE\": true,\n \"UPDATE\": true,\n \"DELETE\": true\n },\n \"interval\": 123,\n \"syncFrom\": {},\n \"isOverridden\": true,\n \"isChild\": true\n }\n ],\n \"fullSync\": false,\n \"isManualSync\": true,\n \"notifyAllSyncedRecords\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("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.post("https://api.integrations.commenda.io/v4/core/companies/{companyId}/syncs")
.header("api_key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"dataModelsToSync\": [\n {\n \"enabled\": true,\n \"scopeAccess\": {\n \"READ\": true,\n \"CREATE\": true,\n \"UPDATE\": true,\n \"DELETE\": true\n },\n \"interval\": 123,\n \"syncFrom\": {},\n \"isOverridden\": true,\n \"isChild\": true\n }\n ],\n \"fullSync\": false,\n \"isManualSync\": true,\n \"notifyAllSyncedRecords\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.integrations.commenda.io/v4/core/companies/{companyId}/syncs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api_key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"dataModelsToSync\": [\n {\n \"enabled\": true,\n \"scopeAccess\": {\n \"READ\": true,\n \"CREATE\": true,\n \"UPDATE\": true,\n \"DELETE\": true\n },\n \"interval\": 123,\n \"syncFrom\": {},\n \"isOverridden\": true,\n \"isChild\": true\n }\n ],\n \"fullSync\": false,\n \"isManualSync\": true,\n \"notifyAllSyncedRecords\": false\n}"
response = http.request(request)
puts response.read_body{
"data": {
"sync": {
"id": "<string>",
"dataModelsSyncing": []
}
},
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Authorizations
Your Commenda Integrations API key, sent in the api_key header.
Path Parameters
Body
application/json
⌘I