curl --request PUT \
--url https://api.chift.eu/syncs/{syncid}/capabilities \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cron": "0 * * * *",
"offered": {
"spend_to_accounting.Payments": false
},
"default_modes": {}
}
'import requests
url = "https://api.chift.eu/syncs/{syncid}/capabilities"
payload = {
"cron": "0 * * * *",
"offered": { "spend_to_accounting.Payments": False },
"default_modes": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
cron: '0 * * * *',
offered: {'spend_to_accounting.Payments': false},
default_modes: {}
})
};
fetch('https://api.chift.eu/syncs/{syncid}/capabilities', 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.chift.eu/syncs/{syncid}/capabilities",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'cron' => '0 * * * *',
'offered' => [
'spend_to_accounting.Payments' => false
],
'default_modes' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.chift.eu/syncs/{syncid}/capabilities"
payload := strings.NewReader("{\n \"cron\": \"0 * * * *\",\n \"offered\": {\n \"spend_to_accounting.Payments\": false\n },\n \"default_modes\": {}\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.put("https://api.chift.eu/syncs/{syncid}/capabilities")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"cron\": \"0 * * * *\",\n \"offered\": {\n \"spend_to_accounting.Payments\": false\n },\n \"default_modes\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chift.eu/syncs/{syncid}/capabilities")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cron\": \"0 * * * *\",\n \"offered\": {\n \"spend_to_accounting.Payments\": false\n },\n \"default_modes\": {}\n}"
response = http.request(request)
puts response.read_body{
"capabilities": [
{
"key": "spend_to_accounting.SupplierInvoices",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "Supplier invoices",
"description": "<string>",
"kind": "main",
"offered": true,
"default_mode": "spend_to_accounting.SupplierInvoices.AsInvoice",
"modes": [
{
"key": "spend_to_accounting.SupplierInvoices.AsInvoice",
"title": "<string>",
"description": "<string>"
}
]
}
],
"cron": "0 * * * *"
}Choose which capabilities your consumers are offered
Turns capabilities on or off for all your consumers and sets the mode preselected where a consumer can choose. A capability that is off is absent for your consumers and stops running for them; turned on again, it runs again for the consumers who had selected it. Selections, mapping values and answers are never deleted. cron sets when the sync runs for every consumer that enabled it; it can always be started by hand.
curl --request PUT \
--url https://api.chift.eu/syncs/{syncid}/capabilities \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cron": "0 * * * *",
"offered": {
"spend_to_accounting.Payments": false
},
"default_modes": {}
}
'import requests
url = "https://api.chift.eu/syncs/{syncid}/capabilities"
payload = {
"cron": "0 * * * *",
"offered": { "spend_to_accounting.Payments": False },
"default_modes": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
cron: '0 * * * *',
offered: {'spend_to_accounting.Payments': false},
default_modes: {}
})
};
fetch('https://api.chift.eu/syncs/{syncid}/capabilities', 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.chift.eu/syncs/{syncid}/capabilities",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'cron' => '0 * * * *',
'offered' => [
'spend_to_accounting.Payments' => false
],
'default_modes' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.chift.eu/syncs/{syncid}/capabilities"
payload := strings.NewReader("{\n \"cron\": \"0 * * * *\",\n \"offered\": {\n \"spend_to_accounting.Payments\": false\n },\n \"default_modes\": {}\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.put("https://api.chift.eu/syncs/{syncid}/capabilities")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"cron\": \"0 * * * *\",\n \"offered\": {\n \"spend_to_accounting.Payments\": false\n },\n \"default_modes\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chift.eu/syncs/{syncid}/capabilities")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cron\": \"0 * * * *\",\n \"offered\": {\n \"spend_to_accounting.Payments\": false\n },\n \"default_modes\": {}\n}"
response = http.request(request)
puts response.read_body{
"capabilities": [
{
"key": "spend_to_accounting.SupplierInvoices",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "Supplier invoices",
"description": "<string>",
"kind": "main",
"offered": true,
"default_mode": "spend_to_accounting.SupplierInvoices.AsInvoice",
"modes": [
{
"key": "spend_to_accounting.SupplierInvoices.AsInvoice",
"title": "<string>",
"description": "<string>"
}
]
}
],
"cron": "0 * * * *"
}Authorizations
This access token needs to be included in each of your request to the Chift API.
Path Parameters
Query Parameters
ISO 639-1 code of the language of the texts (en, fr, nl, de, es; any case), falling back to English. Without it, translation keys.
Body
When the sync runs for each consumer that enabled it, as a cron expression; it can always be started by hand. Null: only by hand.
"0 * * * *"
Capability key -> offered. A capability left out keeps its value.
Show child attributes
Show child attributes
{ "spend_to_accounting.Payments": false }
Capability key -> mode key. Replaces every default mode when given; leave it out to keep them.
Show child attributes
Show child attributes
Response
Successful Response
What the account offers its consumers. Whether a capability is available depends on each consumer's connections.