curl PHP JavaScript Python Kopírovat
curl -X POST 'https://foodsoul.ru/api/crm/v2/integration_automations.update?branch_id=1' \
-H 'Authorization: Bearer fs_api_YOUR_TOKEN' \
-H 'language: cs' \
-H 'role: partner' \
-F 'automation_id=1' \
-F 'automation_error_notifications_enabled=true' \
-F 'phone_clean_enabled=true' \
-F 'phone_plus_delete_enabled=true' \
-F 'phone_space_delete_enabled=true' \
-F 'qr_bar_code_enabled=true' \
-F 'callback_api_enabled=true' \
-F 'import_once_catalog_enabled=true' \
-F 'import_once_description_enabled=true' \
-F 'import_once_image_enabled=true' \
-F 'import_once_labels_enabled=true' <?php
$client = new \GuzzleHttp\Client ();
$response = $client -> request ( 'POST' , 'https://foodsoul.ru/api/crm/v2/integration_automations.update?branch_id=1' , [
'headers' => [
'Authorization' => 'Bearer fs_api_YOUR_TOKEN' ,
'language' => 'cs' ,
'role' => 'partner' ,
],
'multipart' => [
[
'name' => 'automation_id' ,
'contents' => '1' ,
],
[
'name' => 'automation_error_notifications_enabled' ,
'contents' => 'true' ,
],
[
'name' => 'phone_clean_enabled' ,
'contents' => 'true' ,
],
[
'name' => 'phone_plus_delete_enabled' ,
'contents' => 'true' ,
],
[
'name' => 'phone_space_delete_enabled' ,
'contents' => 'true' ,
],
[
'name' => 'qr_bar_code_enabled' ,
'contents' => 'true' ,
],
[
'name' => 'callback_api_enabled' ,
'contents' => 'true' ,
],
[
'name' => 'import_once_catalog_enabled' ,
'contents' => 'true' ,
],
[
'name' => 'import_once_description_enabled' ,
'contents' => 'true' ,
],
[
'name' => 'import_once_image_enabled' ,
'contents' => 'true' ,
],
[
'name' => 'import_once_labels_enabled' ,
'contents' => 'true' ,
],
],
]);
$data = json_decode (( string ) $response -> getBody (), true ); const body = new FormData ()
body . append ( "automation_id" , "1" )
body . append ( "automation_error_notifications_enabled" , "true" )
body . append ( "phone_clean_enabled" , "true" )
body . append ( "phone_plus_delete_enabled" , "true" )
body . append ( "phone_space_delete_enabled" , "true" )
body . append ( "qr_bar_code_enabled" , "true" )
body . append ( "callback_api_enabled" , "true" )
body . append ( "import_once_catalog_enabled" , "true" )
body . append ( "import_once_description_enabled" , "true" )
body . append ( "import_once_image_enabled" , "true" )
body . append ( "import_once_labels_enabled" , "true" )
const response = await fetch ( "https://foodsoul.ru/api/crm/v2/integration_automations.update?branch_id=1" , {
method : "POST" ,
headers : {
"Authorization" : "Bearer fs_api_YOUR_TOKEN" ,
"language" : "cs" ,
"role" : "partner"
},
body ,
})
const data = await response . json () import requests
response = requests . request (
"POST" ,
"https://foodsoul.ru/api/crm/v2/integration_automations.update?branch_id=1" ,
headers ={
"Authorization" : "Bearer fs_api_YOUR_TOKEN" ,
"language" : "cs" ,
"role" : "partner" ,
},
files ={
"automation_id" : [
None ,
"1" ,
],
"automation_error_notifications_enabled" : [
None ,
"true" ,
],
"phone_clean_enabled" : [
None ,
"true" ,
],
"phone_plus_delete_enabled" : [
None ,
"true" ,
],
"phone_space_delete_enabled" : [
None ,
"true" ,
],
"qr_bar_code_enabled" : [
None ,
"true" ,
],
"callback_api_enabled" : [
None ,
"true" ,
],
"import_once_catalog_enabled" : [
None ,
"true" ,
],
"import_once_description_enabled" : [
None ,
"true" ,
],
"import_once_image_enabled" : [
None ,
"true" ,
],
"import_once_labels_enabled" : [
None ,
"true" ,
],
},
)
data = response . json () Odpověď 200
{
"status" : "success" ,
"data" : {}
} Žádosti jsou odesílány na foodsoul.ru — to je hostitel tohoto portálu, jiný vybrat nelze.