curl PHP JavaScript Python Copy
curl -X POST 'https://foodsoul.ru/api/crm/v2/districts.sort?branch_id=1' \
-H 'Authorization: Bearer fs_api_YOUR_TOKEN' \
-H 'language: en' \
-H 'role: partner' \
-H 'Content-Type: application/json' \
-d '{"sort":{"4925":0,"4926":1}}' <?php
$client = new \GuzzleHttp\Client ();
$response = $client -> request ( 'POST' , 'https://foodsoul.ru/api/crm/v2/districts.sort?branch_id=1' , [
'headers' => [
'Authorization' => 'Bearer fs_api_YOUR_TOKEN' ,
'language' => 'en' ,
'role' => 'partner' ,
],
'json' => [
'sort' => [
'4925' => 0 ,
'4926' => 1 ,
],
],
]);
$data = json_decode (( string ) $response -> getBody (), true ); const response = await fetch ( "https://foodsoul.ru/api/crm/v2/districts.sort?branch_id=1" , {
method : "POST" ,
headers : {
"Authorization" : "Bearer fs_api_YOUR_TOKEN" ,
"language" : "en" ,
"role" : "partner" ,
"Content-Type" : "application/json"
},
body : JSON . stringify ({
"sort" : {
"4925" : 0 ,
"4926" : 1
}
}),
})
const data = await response . json () import requests
response = requests . request (
"POST" ,
"https://foodsoul.ru/api/crm/v2/districts.sort?branch_id=1" ,
headers ={
"Authorization" : "Bearer fs_api_YOUR_TOKEN" ,
"language" : "en" ,
"role" : "partner" ,
},
json ={
"sort" : {
"4925" : 0 ,
"4926" : 1 ,
},
},
)
data = response . json () Response 200
{
"status" : "success" ,
"data" : {}
} Requests are sent to foodsoul.ru — the host of this portal; you cannot choose another one.