curl -X POST 'https://foodsoul.pro/api/crm/v2/branches.update_branch' \
-H 'Authorization: Bearer fs_api_YOUR_TOKEN' \
-H 'language: hy' \
-H 'role: partner' \
-H 'Content-Type: application/json' \
-d '{"id":1,"branch_name":"FoodTruck «Thunderbird»","email_for_feedback":"example@example.com","round_costs_mode":"half_up","round_costs_to_precision":2,"feedback_enabled":true,"preorder_enable":true,"preorder_in_work_time":true,"preorder_always":true,"preorder_delivery_minimum_minutes":0,"preorder_delivery_maximum_days":3,"preorder_pickup_minimum_minutes":10,"preorder_pickup_maximum_days":1,"phone_mask_enable":true,"phone_format":true,"phone_international":true,"email_lite_version":true,"email_include_photo":true,"email_format_address":true,"email_permanent_client":true,"repeat_order_notification_enabled":true,"show_category_enabled":true,"order_auto_confirm_enabled":true,"order_countdown_enabled":true,"order_auto_confirm_delay_minutes_weekdays":30,"order_auto_confirm_delay_minutes_weekend":60,"order_auto_confirm_delay_minutes_holidays":90}'
<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', 'https://foodsoul.pro/api/crm/v2/branches.update_branch', [
'headers' => [
'Authorization' => 'Bearer fs_api_YOUR_TOKEN',
'language' => 'hy',
'role' => 'partner',
],
'json' => [
'id' => 1,
'branch_name' => 'FoodTruck «Thunderbird»',
'email_for_feedback' => 'example@example.com',
'round_costs_mode' => 'half_up',
'round_costs_to_precision' => 2,
'feedback_enabled' => true,
'preorder_enable' => true,
'preorder_in_work_time' => true,
'preorder_always' => true,
'preorder_delivery_minimum_minutes' => 0,
'preorder_delivery_maximum_days' => 3,
'preorder_pickup_minimum_minutes' => 10,
'preorder_pickup_maximum_days' => 1,
'phone_mask_enable' => true,
'phone_format' => true,
'phone_international' => true,
'email_lite_version' => true,
'email_include_photo' => true,
'email_format_address' => true,
'email_permanent_client' => true,
'repeat_order_notification_enabled' => true,
'show_category_enabled' => true,
'order_auto_confirm_enabled' => true,
'order_countdown_enabled' => true,
'order_auto_confirm_delay_minutes_weekdays' => 30,
'order_auto_confirm_delay_minutes_weekend' => 60,
'order_auto_confirm_delay_minutes_holidays' => 90,
],
]);
$data = json_decode((string) $response->getBody(), true);
const response = await fetch("https://foodsoul.pro/api/crm/v2/branches.update_branch", {
method: "POST",
headers: {
"Authorization": "Bearer fs_api_YOUR_TOKEN",
"language": "hy",
"role": "partner",
"Content-Type": "application/json"
},
body: JSON.stringify({
"id": 1,
"branch_name": "FoodTruck «Thunderbird»",
"email_for_feedback": "example@example.com",
"round_costs_mode": "half_up",
"round_costs_to_precision": 2,
"feedback_enabled": true,
"preorder_enable": true,
"preorder_in_work_time": true,
"preorder_always": true,
"preorder_delivery_minimum_minutes": 0,
"preorder_delivery_maximum_days": 3,
"preorder_pickup_minimum_minutes": 10,
"preorder_pickup_maximum_days": 1,
"phone_mask_enable": true,
"phone_format": true,
"phone_international": true,
"email_lite_version": true,
"email_include_photo": true,
"email_format_address": true,
"email_permanent_client": true,
"repeat_order_notification_enabled": true,
"show_category_enabled": true,
"order_auto_confirm_enabled": true,
"order_countdown_enabled": true,
"order_auto_confirm_delay_minutes_weekdays": 30,
"order_auto_confirm_delay_minutes_weekend": 60,
"order_auto_confirm_delay_minutes_holidays": 90
}),
})
const data = await response.json()
import requests
response = requests.request(
"POST",
"https://foodsoul.pro/api/crm/v2/branches.update_branch",
headers={
"Authorization": "Bearer fs_api_YOUR_TOKEN",
"language": "hy",
"role": "partner",
},
json={
"id": 1,
"branch_name": "FoodTruck «Thunderbird»",
"email_for_feedback": "example@example.com",
"round_costs_mode": "half_up",
"round_costs_to_precision": 2,
"feedback_enabled": True,
"preorder_enable": True,
"preorder_in_work_time": True,
"preorder_always": True,
"preorder_delivery_minimum_minutes": 0,
"preorder_delivery_maximum_days": 3,
"preorder_pickup_minimum_minutes": 10,
"preorder_pickup_maximum_days": 1,
"phone_mask_enable": True,
"phone_format": True,
"phone_international": True,
"email_lite_version": True,
"email_include_photo": True,
"email_format_address": True,
"email_permanent_client": True,
"repeat_order_notification_enabled": True,
"show_category_enabled": True,
"order_auto_confirm_enabled": True,
"order_countdown_enabled": True,
"order_auto_confirm_delay_minutes_weekdays": 30,
"order_auto_confirm_delay_minutes_weekend": 60,
"order_auto_confirm_delay_minutes_holidays": 90,
},
)
data = response.json()
Պատասխան 200
{
"status": "success",
"data": {}
}
Հարցումները ուղարկվում են foodsoul.pro՝ այս պորտալի հոստը, այլ ընտրություն հնարավոր չէ։.