Add new connection
curl --request POST \
--url https://api.chift.eu/consumers/{consumer_id}/connections \
--header 'Content-Type: application/json' \
--data '
{
"integrationid": 123,
"name": "<string>",
"credentials": [
{
"key": "<string>",
"value": "<string>"
}
],
"country": "<string>",
"redirect": false,
"apis": []
}
'import requests
url = "https://api.chift.eu/consumers/{consumer_id}/connections"
payload = {
"integrationid": 123,
"name": "<string>",
"credentials": [
{
"key": "<string>",
"value": "<string>"
}
],
"country": "<string>",
"redirect": False,
"apis": []
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
integrationid: 123,
name: '<string>',
credentials: [{key: '<string>', value: '<string>'}],
country: '<string>',
redirect: false,
apis: []
})
};
fetch('https://api.chift.eu/consumers/{consumer_id}/connections', 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}/connections",
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([
'integrationid' => 123,
'name' => '<string>',
'credentials' => [
[
'key' => '<string>',
'value' => '<string>'
]
],
'country' => '<string>',
'redirect' => false,
'apis' => [
]
]),
CURLOPT_HTTPHEADER => [
"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}/connections"
payload := strings.NewReader("{\n \"integrationid\": 123,\n \"name\": \"<string>\",\n \"credentials\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"country\": \"<string>\",\n \"redirect\": false,\n \"apis\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
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.chift.eu/consumers/{consumer_id}/connections")
.header("Content-Type", "application/json")
.body("{\n \"integrationid\": 123,\n \"name\": \"<string>\",\n \"credentials\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"country\": \"<string>\",\n \"redirect\": false,\n \"apis\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chift.eu/consumers/{consumer_id}/connections")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"integrationid\": 123,\n \"name\": \"<string>\",\n \"credentials\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"country\": \"<string>\",\n \"redirect\": false,\n \"apis\": []\n}"
response = http.request(request)
puts response.read_body{
"url": "<string>"
}Connections
Add new connection
Returns the url that can be used by your client to enable his integrations.
POST
/
consumers
/
{consumer_id}
/
connections
Add new connection
curl --request POST \
--url https://api.chift.eu/consumers/{consumer_id}/connections \
--header 'Content-Type: application/json' \
--data '
{
"integrationid": 123,
"name": "<string>",
"credentials": [
{
"key": "<string>",
"value": "<string>"
}
],
"country": "<string>",
"redirect": false,
"apis": []
}
'import requests
url = "https://api.chift.eu/consumers/{consumer_id}/connections"
payload = {
"integrationid": 123,
"name": "<string>",
"credentials": [
{
"key": "<string>",
"value": "<string>"
}
],
"country": "<string>",
"redirect": False,
"apis": []
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
integrationid: 123,
name: '<string>',
credentials: [{key: '<string>', value: '<string>'}],
country: '<string>',
redirect: false,
apis: []
})
};
fetch('https://api.chift.eu/consumers/{consumer_id}/connections', 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}/connections",
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([
'integrationid' => 123,
'name' => '<string>',
'credentials' => [
[
'key' => '<string>',
'value' => '<string>'
]
],
'country' => '<string>',
'redirect' => false,
'apis' => [
]
]),
CURLOPT_HTTPHEADER => [
"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}/connections"
payload := strings.NewReader("{\n \"integrationid\": 123,\n \"name\": \"<string>\",\n \"credentials\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"country\": \"<string>\",\n \"redirect\": false,\n \"apis\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
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.chift.eu/consumers/{consumer_id}/connections")
.header("Content-Type", "application/json")
.body("{\n \"integrationid\": 123,\n \"name\": \"<string>\",\n \"credentials\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"country\": \"<string>\",\n \"redirect\": false,\n \"apis\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chift.eu/consumers/{consumer_id}/connections")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"integrationid\": 123,\n \"name\": \"<string>\",\n \"credentials\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"country\": \"<string>\",\n \"redirect\": false,\n \"apis\": []\n}"
response = http.request(request)
puts response.read_body{
"url": "<string>"
}Learn more:
Body
application/json