Ortaklar için API › Ayarlar Şehirlerin sırasını al GET /api/crm/v2/cities_sortv2
operationId: citiesSort.default
Ağdaki şehirleri, bölgelere göre gruplanmış ve mevcut sıralama değerleriyle birlikte döndürür. Alt ağ için parent_chain_id alanında üst ağın ID'si döndürülür.
Yetkilendirme api-token + language + role
Yanıtlar 200
object
status string zorunlu
Değerler: successerror
Örnek: success
data object
list array of object
zone string zorunlu
Örnek: ru
cities array of object zorunlu
sort integer zorunlu
Örnek: 0
name string zorunlu
Örnek: Kirov
parent_chain_id integer
Örnek: 7134
parent_zone string
Örnek: ru
curl PHP JavaScript Python Kopyala
curl -X GET 'https://foodsoul.pro/api/crm/v2/cities_sort' \
-H 'Authorization: Bearer fs_api_YOUR_TOKEN' \
-H 'language: tr' \
-H 'role: partner' <?php
$client = new \GuzzleHttp\Client ();
$response = $client -> request ( 'GET' , 'https://foodsoul.pro/api/crm/v2/cities_sort' , [
'headers' => [
'Authorization' => 'Bearer fs_api_YOUR_TOKEN' ,
'language' => 'tr' ,
'role' => 'partner' ,
],
]);
$data = json_decode (( string ) $response -> getBody (), true ); const response = await fetch ( "https://foodsoul.pro/api/crm/v2/cities_sort" , {
method : "GET" ,
headers : {
"Authorization" : "Bearer fs_api_YOUR_TOKEN" ,
"language" : "tr" ,
"role" : "partner"
},
})
const data = await response . json () import requests
response = requests . request (
"GET" ,
"https://foodsoul.pro/api/crm/v2/cities_sort" ,
headers ={
"Authorization" : "Bearer fs_api_YOUR_TOKEN" ,
"language" : "tr" ,
"role" : "partner" ,
},
)
data = response . json () Yanıt 200
{
"status" : "success" ,
"data" : {
"filters" : {},
"list" : [
{
"zone" : "ru" ,
"cities" : [
{
"sort" : 0 ,
"id" : 1 ,
"name" : "Kirov"
}
]
}
],
"parent_chain_id" : 7134 ,
"parent_zone" : "ru"
}
} İstekler foodsoul.pro adresine gönderiliyor — bu portalın ana bilgisayarıdır, başka birini seçmek mümkün değildir.