API per partner › Gestione Ottenere le impostazioni del sito GET /api/crm/v2/sites_settingsv2
operationId: sitesSettings.default
Autorizzazione api-token + language + role
Parametri della richiesta branch_id integer obbligatorio
Esempio: 8810
Risposte 200
object
status string obbligatorio
Valori: successerror
Esempio: success
data object
filters object obbligatorio
branch_id object (FilterSelectInteger)
value integer
Esempio: 8920
type string obbligatorio
Esempio: select
option array of object
value integer obbligatorio
Esempio: 8920
name string obbligatorio
Esempio: Green Basket | Kaliningrad
mode string (FilterMode)
Come l'interfaccia gestisce il filtro; un filtro normale non ha mode.
force_shown — sempre visibile, non può essere nascosto.
value_required — punto di ingresso nella sezione: sempre visibile, non può avere valore vuoto (finché non viene selezionato un valore, la lista è vuota; non esiste l'opzione "tutti"), il reset generale non lo azzera.
Valori: force_shownvalue_required
Esempio: value_required
notice string
Esempio: message
yandex_metrika string
Esempio: 314159
list array of object
id string obbligatorio
Identificatore composto: [page]_[platform]_[type]_[section]
Esempio: all_site_desktop_head
page string obbligatorio
Valori: allaboutfeedbackmainmobidel-trackerpopularrecommendspecial-offersvacancies
Esempio: all
platform string obbligatorio
Valori: allsitesocial-app
Esempio: all
type string obbligatorio
Valori: alldesktopmobile
Esempio: all
section string obbligatorio
Valori: headbody
Esempio: head
html string obbligatorio
Esempio: <meta name='robots' content='index, follow'>
curl PHP JavaScript Python Copiare
curl -X GET 'https://foodsoul.pro/api/crm/v2/sites_settings?branch_id=8810' \
-H 'Authorization: Bearer fs_api_YOUR_TOKEN' \
-H 'language: it' \
-H 'role: partner' <?php
$client = new \GuzzleHttp\Client ();
$response = $client -> request ( 'GET' , 'https://foodsoul.pro/api/crm/v2/sites_settings?branch_id=8810' , [
'headers' => [
'Authorization' => 'Bearer fs_api_YOUR_TOKEN' ,
'language' => 'it' ,
'role' => 'partner' ,
],
]);
$data = json_decode (( string ) $response -> getBody (), true ); const response = await fetch ( "https://foodsoul.pro/api/crm/v2/sites_settings?branch_id=8810" , {
method : "GET" ,
headers : {
"Authorization" : "Bearer fs_api_YOUR_TOKEN" ,
"language" : "it" ,
"role" : "partner"
},
})
const data = await response . json () import requests
response = requests . request (
"GET" ,
"https://foodsoul.pro/api/crm/v2/sites_settings?branch_id=8810" ,
headers ={
"Authorization" : "Bearer fs_api_YOUR_TOKEN" ,
"language" : "it" ,
"role" : "partner" ,
},
)
data = response . json () Risposta 200
{
"status" : "success" ,
"data" : {
"filters" : {
"branch_id" : {
"value" : 8920 ,
"type" : "select" ,
"option" : [
{
"value" : 8920 ,
"name" : "Green Basket | Kaliningrad"
}
],
"mode" : "value_required"
}
},
"notice" : "message" ,
"yandex_metrika" : "314159" ,
"list" : [
{
"id" : "all_site_desktop_head" ,
"page" : "all" ,
"platform" : "all" ,
"type" : "all" ,
"section" : "head" ,
"html" : "<meta name='robots' content='index, follow'>"
}
]
}
} Le richieste vengono inviate a foodsoul.pro, che è l’host di questo portale; non è possibile sceglierne un altro.