curl --request PUT \
--url https://api.chift.eu/consumers/{consumer_id}/syncs/{syncid}/capabilities \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"selected": [
"spend_to_accounting.SupplierInvoices"
],
"modes": {
"spend_to_accounting.SupplierInvoices": "spend_to_accounting.SupplierInvoices.AsJournalEntry"
},
"preflight": false
}
'import requests
url = "https://api.chift.eu/consumers/{consumer_id}/syncs/{syncid}/capabilities"
payload = {
"selected": ["spend_to_accounting.SupplierInvoices"],
"modes": { "spend_to_accounting.SupplierInvoices": "spend_to_accounting.SupplierInvoices.AsJournalEntry" },
"preflight": False
}
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({
selected: ['spend_to_accounting.SupplierInvoices'],
modes: {
'spend_to_accounting.SupplierInvoices': 'spend_to_accounting.SupplierInvoices.AsJournalEntry'
},
preflight: false
})
};
fetch('https://api.chift.eu/consumers/{consumer_id}/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/consumers/{consumer_id}/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([
'selected' => [
'spend_to_accounting.SupplierInvoices'
],
'modes' => [
'spend_to_accounting.SupplierInvoices' => 'spend_to_accounting.SupplierInvoices.AsJournalEntry'
],
'preflight' => false
]),
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/consumers/{consumer_id}/syncs/{syncid}/capabilities"
payload := strings.NewReader("{\n \"selected\": [\n \"spend_to_accounting.SupplierInvoices\"\n ],\n \"modes\": {\n \"spend_to_accounting.SupplierInvoices\": \"spend_to_accounting.SupplierInvoices.AsJournalEntry\"\n },\n \"preflight\": false\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/consumers/{consumer_id}/syncs/{syncid}/capabilities")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"selected\": [\n \"spend_to_accounting.SupplierInvoices\"\n ],\n \"modes\": {\n \"spend_to_accounting.SupplierInvoices\": \"spend_to_accounting.SupplierInvoices.AsJournalEntry\"\n },\n \"preflight\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chift.eu/consumers/{consumer_id}/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 \"selected\": [\n \"spend_to_accounting.SupplierInvoices\"\n ],\n \"modes\": {\n \"spend_to_accounting.SupplierInvoices\": \"spend_to_accounting.SupplierInvoices.AsJournalEntry\"\n },\n \"preflight\": false\n}"
response = http.request(request)
puts response.read_bodyChoose a consumer's capabilities and modes
Replaces the consumer’s choice of main capabilities and modes. Whatever they need is turned on automatically. Answers with the resulting setup and what changed. Mapping values of tables no longer needed are kept. Send preflight: true to get that answer without saving anything.
curl --request PUT \
--url https://api.chift.eu/consumers/{consumer_id}/syncs/{syncid}/capabilities \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"selected": [
"spend_to_accounting.SupplierInvoices"
],
"modes": {
"spend_to_accounting.SupplierInvoices": "spend_to_accounting.SupplierInvoices.AsJournalEntry"
},
"preflight": false
}
'import requests
url = "https://api.chift.eu/consumers/{consumer_id}/syncs/{syncid}/capabilities"
payload = {
"selected": ["spend_to_accounting.SupplierInvoices"],
"modes": { "spend_to_accounting.SupplierInvoices": "spend_to_accounting.SupplierInvoices.AsJournalEntry" },
"preflight": False
}
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({
selected: ['spend_to_accounting.SupplierInvoices'],
modes: {
'spend_to_accounting.SupplierInvoices': 'spend_to_accounting.SupplierInvoices.AsJournalEntry'
},
preflight: false
})
};
fetch('https://api.chift.eu/consumers/{consumer_id}/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/consumers/{consumer_id}/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([
'selected' => [
'spend_to_accounting.SupplierInvoices'
],
'modes' => [
'spend_to_accounting.SupplierInvoices' => 'spend_to_accounting.SupplierInvoices.AsJournalEntry'
],
'preflight' => false
]),
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/consumers/{consumer_id}/syncs/{syncid}/capabilities"
payload := strings.NewReader("{\n \"selected\": [\n \"spend_to_accounting.SupplierInvoices\"\n ],\n \"modes\": {\n \"spend_to_accounting.SupplierInvoices\": \"spend_to_accounting.SupplierInvoices.AsJournalEntry\"\n },\n \"preflight\": false\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/consumers/{consumer_id}/syncs/{syncid}/capabilities")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"selected\": [\n \"spend_to_accounting.SupplierInvoices\"\n ],\n \"modes\": {\n \"spend_to_accounting.SupplierInvoices\": \"spend_to_accounting.SupplierInvoices.AsJournalEntry\"\n },\n \"preflight\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chift.eu/consumers/{consumer_id}/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 \"selected\": [\n \"spend_to_accounting.SupplierInvoices\"\n ],\n \"modes\": {\n \"spend_to_accounting.SupplierInvoices\": \"spend_to_accounting.SupplierInvoices.AsJournalEntry\"\n },\n \"preflight\": false\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
This access token needs to be included in each of your request to the Chift API.
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
Keys of the main capabilities the consumer turns on. Replaces the previous choice.
["spend_to_accounting.SupplierInvoices"]
Capability key -> mode key, for the capabilities where the consumer chooses.
Show child attributes
Show child attributes
{ "spend_to_accounting.SupplierInvoices": "spend_to_accounting.SupplierInvoices.AsJournalEntry" }
Check the choice without saving it: the answer, or the refusal, is the one saving it would give, so a draft can be shown as it would run.
Response
Successful Response
The sync's one flow: what enable, disable, the answers' PATCH and the executions take as {flowid}.
Whether the sync is enabled for this consumer.
The capabilities the account offers.
Show child attributes
Show child attributes
The mapping tables the running capabilities need.
Show child attributes
Show child attributes
The questions the running capabilities ask.
Show child attributes
Show child attributes
What stops the sync from being enabled.
Show child attributes
Show child attributes
Each vertical of the sync, source first: whether the consumer's connection to it is in place.
Show child attributes
Show child attributes
The most recent preview of this consumer sync, if any.
What the request changed, compared with the setup before it.
Show child attributes
Show child attributes