curl --request GET \
--url https://api.chift.eu/consumers/{consumer_id}/syncs/{syncid}/mappings/{table_key} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.chift.eu/consumers/{consumer_id}/syncs/{syncid}/mappings/{table_key}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.chift.eu/consumers/{consumer_id}/syncs/{syncid}/mappings/{table_key}', 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}/mappings/{table_key}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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.chift.eu/consumers/{consumer_id}/syncs/{syncid}/mappings/{table_key}"
req, _ := http.NewRequest("GET", 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.get("https://api.chift.eu/consumers/{consumer_id}/syncs/{syncid}/mappings/{table_key}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chift.eu/consumers/{consumer_id}/syncs/{syncid}/mappings/{table_key}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"key": "spend_to_accounting.PurchaseVatCodes",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"description": "<string>",
"required": true,
"allow_delete": true,
"rows": [
{
"source_key": "601000",
"label": "601000 Office supplies",
"value": "<string>",
"value_label": "<string>",
"origin": "<string>",
"hidden": true,
"missing": true
}
],
"candidates": {
"items": [
{
"key": "601000",
"label": "601000 Office supplies",
"fixed": true
}
],
"total": 1,
"page": 2,
"size": 2
}
}One mapping table of a consumer: its rows, values and candidates
The table’s rows with their values, and one page of what a row may point at. Rows are what the source lists (or the fixed rows in use), then the keys an execution or a preview met without a value. Candidates are read from the consumer’s connection: refresh reads them again, not from the connector’s cache. The table’s autofill rules run first, so a row they can fill has a value. Edit the values with PATCH /consumers/{consumer_id}/syncs/{syncid}.
curl --request GET \
--url https://api.chift.eu/consumers/{consumer_id}/syncs/{syncid}/mappings/{table_key} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.chift.eu/consumers/{consumer_id}/syncs/{syncid}/mappings/{table_key}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.chift.eu/consumers/{consumer_id}/syncs/{syncid}/mappings/{table_key}', 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}/mappings/{table_key}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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.chift.eu/consumers/{consumer_id}/syncs/{syncid}/mappings/{table_key}"
req, _ := http.NewRequest("GET", 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.get("https://api.chift.eu/consumers/{consumer_id}/syncs/{syncid}/mappings/{table_key}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chift.eu/consumers/{consumer_id}/syncs/{syncid}/mappings/{table_key}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"key": "spend_to_accounting.PurchaseVatCodes",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"description": "<string>",
"required": true,
"allow_delete": true,
"rows": [
{
"source_key": "601000",
"label": "601000 Office supplies",
"value": "<string>",
"value_label": "<string>",
"origin": "<string>",
"hidden": true,
"missing": true
}
],
"candidates": {
"items": [
{
"key": "601000",
"label": "601000 Office supplies",
"fixed": true
}
],
"total": 1,
"page": 2,
"size": 2
}
}Authorizations
This access token needs to be included in each of your request to the Chift API.
Query Parameters
Keeps the candidates whose label or key contains it, ignoring case.
Page of candidates.
x >= 1Candidates per page.
1 <= x <= 1000Every item of the target, not only the suggested ones.
The row (its source_key) to suggest candidates for: a table can suggest per row.
Read the rows and candidates from the connections again.
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.
Response
Successful Response
One mapping table of a consumer: its rows with their values, and what they may point at.
Stable key, e.g. 'spend_to_accounting.SupplierInvoices'. Send it back as is.
"spend_to_accounting.PurchaseVatCodes"
The stable uuid derived from the key, as the legacy sync routes identify the same item.
Name to show, in the requested language; its translation key without one.
What it does, the tooltip: in the requested language, its translation key without one.
A row without a value stops the objects that need it (an issue is raised).
The consumer may hide rows.
The source's rows, then the keys met in the data, then any other row holding a value.
Show child attributes
Show child attributes
One page of what a row may point at, matching search: the suggested items sorted by label, then the table's fixed options. With show_all, every item of the target.
Show child attributes
Show child attributes