curl PHP JavaScript Python Copier
curl -X POST 'https://foodsoul.pro/api/crm/v2/base_settings.update?branch_id=8779' \
-H 'Authorization: Bearer fs_api_YOUR_TOKEN' \
-H 'language: fr' \
-H 'role: partner' \
-F 'about=<b>About branch</b>' \
-F 'excludes=["about"]' \
-F 'default_image=@file.jpg' \
-F 'block=true' \
-F 'cart_lead_time=true' \
-F 'notice=free delivery' \
-F 'cart_notice=free delivery' \
-F 'social_network_vk=https://vk.com/id90638739' \
-F 'social_network_ok=https://ok.ru/zloy_ded' \
-F 'social_network_tg=https://t.me/@sh4dberow' \
-F 'social_network_wa=https://chat.whatsapp.com/@sh4dberow' \
-F 'social_network_fb=https://facebook.com/foodsoul' \
-F 'social_network_in=https://instagram.com/foodsoul' \
-F 'order_message_minutes=10' \
-F 'order_message_permanent_client=true' \
-F 'order_message_prepayment_order=true' \
-F 'order_message_custom_texts_prepayment_and_not_work=text' \
-F 'order_message_custom_texts_prepayment_and_work=text' \
-F 'order_message_custom_texts_work=text' \
-F 'order_message_custom_texts_not_work=text' <?php
$client = new \GuzzleHttp\Client ();
$response = $client -> request ( 'POST' , 'https://foodsoul.pro/api/crm/v2/base_settings.update?branch_id=8779' , [
'headers' => [
'Authorization' => 'Bearer fs_api_YOUR_TOKEN' ,
'language' => 'fr' ,
'role' => 'partner' ,
],
'multipart' => [
[
'name' => 'about' ,
'contents' => '<b>About branch</b>' ,
],
[
'name' => 'excludes' ,
'contents' => '["about"]' ,
],
[
'name' => 'default_image' ,
'contents' => '<file>' ,
],
[
'name' => 'block' ,
'contents' => 'true' ,
],
[
'name' => 'cart_lead_time' ,
'contents' => 'true' ,
],
[
'name' => 'notice' ,
'contents' => 'free delivery' ,
],
[
'name' => 'cart_notice' ,
'contents' => 'free delivery' ,
],
[
'name' => 'social_network_vk' ,
'contents' => 'https://vk.com/id90638739' ,
],
[
'name' => 'social_network_ok' ,
'contents' => 'https://ok.ru/zloy_ded' ,
],
[
'name' => 'social_network_tg' ,
'contents' => 'https://t.me/@sh4dberow' ,
],
[
'name' => 'social_network_wa' ,
'contents' => 'https://chat.whatsapp.com/@sh4dberow' ,
],
[
'name' => 'social_network_fb' ,
'contents' => 'https://facebook.com/foodsoul' ,
],
[
'name' => 'social_network_in' ,
'contents' => 'https://instagram.com/foodsoul' ,
],
[
'name' => 'order_message_minutes' ,
'contents' => '10' ,
],
[
'name' => 'order_message_permanent_client' ,
'contents' => 'true' ,
],
[
'name' => 'order_message_prepayment_order' ,
'contents' => 'true' ,
],
[
'name' => 'order_message_custom_texts_prepayment_and_not_work' ,
'contents' => 'text' ,
],
[
'name' => 'order_message_custom_texts_prepayment_and_work' ,
'contents' => 'text' ,
],
[
'name' => 'order_message_custom_texts_work' ,
'contents' => 'text' ,
],
[
'name' => 'order_message_custom_texts_not_work' ,
'contents' => 'text' ,
],
],
]);
$data = json_decode (( string ) $response -> getBody (), true ); const body = new FormData ()
body . append ( "about" , "<b>About branch</b>" )
body . append ( "excludes" , "[\"about\"]" )
body . append ( "default_image" , "<file>" )
body . append ( "block" , "true" )
body . append ( "cart_lead_time" , "true" )
body . append ( "notice" , "free delivery" )
body . append ( "cart_notice" , "free delivery" )
body . append ( "social_network_vk" , "https://vk.com/id90638739" )
body . append ( "social_network_ok" , "https://ok.ru/zloy_ded" )
body . append ( "social_network_tg" , "https://t.me/@sh4dberow" )
body . append ( "social_network_wa" , "https://chat.whatsapp.com/@sh4dberow" )
body . append ( "social_network_fb" , "https://facebook.com/foodsoul" )
body . append ( "social_network_in" , "https://instagram.com/foodsoul" )
body . append ( "order_message_minutes" , "10" )
body . append ( "order_message_permanent_client" , "true" )
body . append ( "order_message_prepayment_order" , "true" )
body . append ( "order_message_custom_texts_prepayment_and_not_work" , "text" )
body . append ( "order_message_custom_texts_prepayment_and_work" , "text" )
body . append ( "order_message_custom_texts_work" , "text" )
body . append ( "order_message_custom_texts_not_work" , "text" )
const response = await fetch ( "https://foodsoul.pro/api/crm/v2/base_settings.update?branch_id=8779" , {
method : "POST" ,
headers : {
"Authorization" : "Bearer fs_api_YOUR_TOKEN" ,
"language" : "fr" ,
"role" : "partner"
},
body ,
})
const data = await response . json () import requests
response = requests . request (
"POST" ,
"https://foodsoul.pro/api/crm/v2/base_settings.update?branch_id=8779" ,
headers ={
"Authorization" : "Bearer fs_api_YOUR_TOKEN" ,
"language" : "fr" ,
"role" : "partner" ,
},
files ={
"about" : [
None ,
"<b>About branch</b>" ,
],
"excludes" : [
None ,
"[\"about\"]" ,
],
"default_image" : [
None ,
"<file>" ,
],
"block" : [
None ,
"true" ,
],
"cart_lead_time" : [
None ,
"true" ,
],
"notice" : [
None ,
"free delivery" ,
],
"cart_notice" : [
None ,
"free delivery" ,
],
"social_network_vk" : [
None ,
"https://vk.com/id90638739" ,
],
"social_network_ok" : [
None ,
"https://ok.ru/zloy_ded" ,
],
"social_network_tg" : [
None ,
"https://t.me/@sh4dberow" ,
],
"social_network_wa" : [
None ,
"https://chat.whatsapp.com/@sh4dberow" ,
],
"social_network_fb" : [
None ,
"https://facebook.com/foodsoul" ,
],
"social_network_in" : [
None ,
"https://instagram.com/foodsoul" ,
],
"order_message_minutes" : [
None ,
"10" ,
],
"order_message_permanent_client" : [
None ,
"true" ,
],
"order_message_prepayment_order" : [
None ,
"true" ,
],
"order_message_custom_texts_prepayment_and_not_work" : [
None ,
"text" ,
],
"order_message_custom_texts_prepayment_and_work" : [
None ,
"text" ,
],
"order_message_custom_texts_work" : [
None ,
"text" ,
],
"order_message_custom_texts_not_work" : [
None ,
"text" ,
],
},
)
data = response . json () Les requêtes sont envoyées à foodsoul.pro — l’hôte de ce portail, il n’est pas possible d’en choisir un autre.