curl PHP JavaScript Python Kopeeri
curl -X POST 'https://foodsoul.ru/api/crm/v2/pickup.update_template?branch_id=8778' \
-H 'Authorization: Bearer fs_api_YOUR_TOKEN' \
-H 'language: et' \
-H 'role: partner' \
-H 'Content-Type: application/json' \
-d '{"day_time":["00:00 - 23:59"],"pickup_force_enabled":false,"operator_id":7109,"all_pickups_operator_id":true,"minimum_order_amount":200,"all_pickups_minimum_order_amount":false,"preparation_time":60,"all_pickups_preparation_time":false,"other_preparation_time_enabled":true,"all_pickups_other_preparation_time_enabled":false,"other_preparation_time":90,"all_pickups_other_preparation_time":false,"other_preparation_time_periods":"00:00 - 23:59","all_pickups_other_preparation_time_periods":false,"other_minimum_order_amount_enabled":true,"all_pickups_other_minimum_order_amount_enabled":false,"other_minimum_order_amount":300,"all_pickups_other_minimum_order_amount":false,"other_minimum_order_amount_periods":"00:00 - 23:59","all_pickups_other_minimum_order_amount_periods":false,"other_minimum_order_amount_days":[1],"all_pickups_other_minimum_order_amount_days":false,"timework":"00:00 - 23:59","all_pickups_work_time":false,"all_pickups":false,"day_mode_base_1":1,"day_mode_base_2":1,"day_mode_base_3":1,"day_mode_base_4":1,"day_mode_base_5":1,"day_mode_base_6":1,"day_mode_base_7":1}' <?php
$client = new \GuzzleHttp\Client ();
$response = $client -> request ( 'POST' , 'https://foodsoul.ru/api/crm/v2/pickup.update_template?branch_id=8778' , [
'headers' => [
'Authorization' => 'Bearer fs_api_YOUR_TOKEN' ,
'language' => 'et' ,
'role' => 'partner' ,
],
'json' => [
'day_time' => [
'00:00 - 23:59' ,
],
'pickup_force_enabled' => false ,
'operator_id' => 7109 ,
'all_pickups_operator_id' => true ,
'minimum_order_amount' => 200 ,
'all_pickups_minimum_order_amount' => false ,
'preparation_time' => 60 ,
'all_pickups_preparation_time' => false ,
'other_preparation_time_enabled' => true ,
'all_pickups_other_preparation_time_enabled' => false ,
'other_preparation_time' => 90 ,
'all_pickups_other_preparation_time' => false ,
'other_preparation_time_periods' => '00:00 - 23:59' ,
'all_pickups_other_preparation_time_periods' => false ,
'other_minimum_order_amount_enabled' => true ,
'all_pickups_other_minimum_order_amount_enabled' => false ,
'other_minimum_order_amount' => 300 ,
'all_pickups_other_minimum_order_amount' => false ,
'other_minimum_order_amount_periods' => '00:00 - 23:59' ,
'all_pickups_other_minimum_order_amount_periods' => false ,
'other_minimum_order_amount_days' => [
1 ,
],
'all_pickups_other_minimum_order_amount_days' => false ,
'timework' => '00:00 - 23:59' ,
'all_pickups_work_time' => false ,
'all_pickups' => false ,
'day_mode_base_1' => 1 ,
'day_mode_base_2' => 1 ,
'day_mode_base_3' => 1 ,
'day_mode_base_4' => 1 ,
'day_mode_base_5' => 1 ,
'day_mode_base_6' => 1 ,
'day_mode_base_7' => 1 ,
],
]);
$data = json_decode (( string ) $response -> getBody (), true ); const response = await fetch ( "https://foodsoul.ru/api/crm/v2/pickup.update_template?branch_id=8778" , {
method : "POST" ,
headers : {
"Authorization" : "Bearer fs_api_YOUR_TOKEN" ,
"language" : "et" ,
"role" : "partner" ,
"Content-Type" : "application/json"
},
body : JSON . stringify ({
"day_time" : [
"00:00 - 23:59"
],
"pickup_force_enabled" : false ,
"operator_id" : 7109 ,
"all_pickups_operator_id" : true ,
"minimum_order_amount" : 200 ,
"all_pickups_minimum_order_amount" : false ,
"preparation_time" : 60 ,
"all_pickups_preparation_time" : false ,
"other_preparation_time_enabled" : true ,
"all_pickups_other_preparation_time_enabled" : false ,
"other_preparation_time" : 90 ,
"all_pickups_other_preparation_time" : false ,
"other_preparation_time_periods" : "00:00 - 23:59" ,
"all_pickups_other_preparation_time_periods" : false ,
"other_minimum_order_amount_enabled" : true ,
"all_pickups_other_minimum_order_amount_enabled" : false ,
"other_minimum_order_amount" : 300 ,
"all_pickups_other_minimum_order_amount" : false ,
"other_minimum_order_amount_periods" : "00:00 - 23:59" ,
"all_pickups_other_minimum_order_amount_periods" : false ,
"other_minimum_order_amount_days" : [
1
],
"all_pickups_other_minimum_order_amount_days" : false ,
"timework" : "00:00 - 23:59" ,
"all_pickups_work_time" : false ,
"all_pickups" : false ,
"day_mode_base_1" : 1 ,
"day_mode_base_2" : 1 ,
"day_mode_base_3" : 1 ,
"day_mode_base_4" : 1 ,
"day_mode_base_5" : 1 ,
"day_mode_base_6" : 1 ,
"day_mode_base_7" : 1
}),
})
const data = await response . json () import requests
response = requests . request (
"POST" ,
"https://foodsoul.ru/api/crm/v2/pickup.update_template?branch_id=8778" ,
headers ={
"Authorization" : "Bearer fs_api_YOUR_TOKEN" ,
"language" : "et" ,
"role" : "partner" ,
},
json ={
"day_time" : [
"00:00 - 23:59" ,
],
"pickup_force_enabled" : False ,
"operator_id" : 7109 ,
"all_pickups_operator_id" : True ,
"minimum_order_amount" : 200 ,
"all_pickups_minimum_order_amount" : False ,
"preparation_time" : 60 ,
"all_pickups_preparation_time" : False ,
"other_preparation_time_enabled" : True ,
"all_pickups_other_preparation_time_enabled" : False ,
"other_preparation_time" : 90 ,
"all_pickups_other_preparation_time" : False ,
"other_preparation_time_periods" : "00:00 - 23:59" ,
"all_pickups_other_preparation_time_periods" : False ,
"other_minimum_order_amount_enabled" : True ,
"all_pickups_other_minimum_order_amount_enabled" : False ,
"other_minimum_order_amount" : 300 ,
"all_pickups_other_minimum_order_amount" : False ,
"other_minimum_order_amount_periods" : "00:00 - 23:59" ,
"all_pickups_other_minimum_order_amount_periods" : False ,
"other_minimum_order_amount_days" : [
1 ,
],
"all_pickups_other_minimum_order_amount_days" : False ,
"timework" : "00:00 - 23:59" ,
"all_pickups_work_time" : False ,
"all_pickups" : False ,
"day_mode_base_1" : 1 ,
"day_mode_base_2" : 1 ,
"day_mode_base_3" : 1 ,
"day_mode_base_4" : 1 ,
"day_mode_base_5" : 1 ,
"day_mode_base_6" : 1 ,
"day_mode_base_7" : 1 ,
},
)
data = response . json () Päringud saadetakse aadressile foodsoul.ru — see on selle portaali host, teist valida ei saa.