curl PHP JavaScript Python Kopieren
curl -X POST 'https://foodsoul.ru/api/crm/v2/multilinks_buttons.add?multilink_id=17' \
-H 'Authorization: Bearer fs_api_YOUR_TOKEN' \
-H 'language: de' \
-H 'role: partner' \
-H 'Content-Type: application/json' \
-d '{"name":"name","link":"https://ya.ru","new_window":true,"text_color":"ffffff","background_color":"EC0000"}' <?php
$client = new \GuzzleHttp\Client ();
$response = $client -> request ( 'POST' , 'https://foodsoul.ru/api/crm/v2/multilinks_buttons.add?multilink_id=17' , [
'headers' => [
'Authorization' => 'Bearer fs_api_YOUR_TOKEN' ,
'language' => 'de' ,
'role' => 'partner' ,
],
'json' => [
'name' => 'name' ,
'link' => 'https://ya.ru' ,
'new_window' => true ,
'text_color' => 'ffffff' ,
'background_color' => 'EC0000' ,
],
]);
$data = json_decode (( string ) $response -> getBody (), true ); const response = await fetch ( "https://foodsoul.ru/api/crm/v2/multilinks_buttons.add?multilink_id=17" , {
method : "POST" ,
headers : {
"Authorization" : "Bearer fs_api_YOUR_TOKEN" ,
"language" : "de" ,
"role" : "partner" ,
"Content-Type" : "application/json"
},
body : JSON . stringify ({
"name" : "name" ,
"link" : "https://ya.ru" ,
"new_window" : true ,
"text_color" : "ffffff" ,
"background_color" : "EC0000"
}),
})
const data = await response . json () import requests
response = requests . request (
"POST" ,
"https://foodsoul.ru/api/crm/v2/multilinks_buttons.add?multilink_id=17" ,
headers ={
"Authorization" : "Bearer fs_api_YOUR_TOKEN" ,
"language" : "de" ,
"role" : "partner" ,
},
json ={
"name" : "name" ,
"link" : "https://ya.ru" ,
"new_window" : True ,
"text_color" : "ffffff" ,
"background_color" : "EC0000" ,
},
)
data = response . json () Antwort 200
{
"status" : "success" ,
"data" : {}
} Anfragen werden an foodsoul.ru gesendet – dies ist der Host dieses Portals, ein anderer kann nicht ausgewählt werden.