API untuk afiliasi › Pengaturan Mendapatkan bagian kustom untuk pengeditan GET /api/crm/v2/team.edit_permission_sections_customv2
operationId: team.editPermissionSectionsCustom
Otorisasi api-token + language + role
Parameter permintaan user_id integer wajib
ID pengguna; peran ditentukan berdasarkan ID ini
Contoh: 1
Tanggapan 200
object
status string wajib
Nilai: successerror
Contoh: success
data object
default_permissions array of object
id integer wajib
Contoh: 572
permission_section_id integer wajib
Contoh: 112
readonly_enabled boolean wajib
Contoh: false
slug string wajib
Contoh: branches
user_permissions array of object
id integer wajib
Contoh: 572
permission_section_id integer wajib
Contoh: 112
readonly_enabled boolean wajib
Contoh: false
slug string wajib
Contoh: branches
date_expiration oneOf dapat bernilai null
Tanggal kedaluwarsa akses dalam UTC; null — tanpa batasan. Entri yang kedaluwarsa dihapus secara otomatis.
Salah satu pilihan
DataTimeFormatSQL
string (DataTimeFormatSQL)
Contoh: 2024-05-02 08:31:16
selectable_permissions array of object
Bagian yang dapat dipilih oleh editor: bagian default dari peran yang sedang diedit, serta bagian default dan bagian individual editor
slug string wajib
Contoh: items
description string wajib
Contoh: Items
type string wajib
Nilai: folderpagelink
Contoh: page
endpoint_only_enabled boolean
Hanya untuk tipe page: bagian ini ada sebagai endpoint API dan tidak ditampilkan di menu samping. Akses ke bagian ini diberikan dan diperiksa seperti halaman biasa, sehingga bagian ini tetap ada di referensi hak akses peran dan pengguna.
Contoh: false
firm_section_parent_id integer
Contoh: 1
system_section_parent_id integer
Contoh: 1
affiliate_section_parent_id integer
Contoh: 1
sort integer wajib
Contoh: -1714739780
permission_condition_id integer
Kondisi di mana bagian ditampilkan
Contoh: 2
actions array of object
permission_section_id integer
Contoh: 62
permission_condition_id integer
Contoh: 1
description string
Contoh: view
curl PHP JavaScript Python Salin
curl -X GET 'https://foodsoul.ru/api/crm/v2/team.edit_permission_sections_custom?user_id=1' \
-H 'Authorization: Bearer fs_api_YOUR_TOKEN' \
-H 'language: id' \
-H 'role: affiliate' <?php
$client = new \GuzzleHttp\Client ();
$response = $client -> request ( 'GET' , 'https://foodsoul.ru/api/crm/v2/team.edit_permission_sections_custom?user_id=1' , [
'headers' => [
'Authorization' => 'Bearer fs_api_YOUR_TOKEN' ,
'language' => 'id' ,
'role' => 'affiliate' ,
],
]);
$data = json_decode (( string ) $response -> getBody (), true ); const response = await fetch ( "https://foodsoul.ru/api/crm/v2/team.edit_permission_sections_custom?user_id=1" , {
method : "GET" ,
headers : {
"Authorization" : "Bearer fs_api_YOUR_TOKEN" ,
"language" : "id" ,
"role" : "affiliate"
},
})
const data = await response . json () import requests
response = requests . request (
"GET" ,
"https://foodsoul.ru/api/crm/v2/team.edit_permission_sections_custom?user_id=1" ,
headers ={
"Authorization" : "Bearer fs_api_YOUR_TOKEN" ,
"language" : "id" ,
"role" : "affiliate" ,
},
)
data = response . json () Jawaban 200
{
"status" : "success" ,
"data" : {
"default_permissions" : [
{
"id" : 572 ,
"permission_section_id" : 112 ,
"readonly_enabled" : false ,
"slug" : "branches"
}
],
"user_permissions" : [
{
"id" : 572 ,
"permission_section_id" : 112 ,
"readonly_enabled" : false ,
"slug" : "branches" ,
"date_expiration" : "2024-05-02 08:31:16"
}
],
"selectable_permissions" : [
{
"id" : 1 ,
"slug" : "items" ,
"description" : "Items" ,
"type" : "page" ,
"endpoint_only_enabled" : false ,
"firm_section_parent_id" : 1 ,
"system_section_parent_id" : 1 ,
"affiliate_section_parent_id" : 1 ,
"sort" : -1714739780 ,
"zone" : "ru" ,
"permission_condition_id" : 2 ,
"actions" : [
{
"id" : 1 ,
"permission_section_id" : 62 ,
"permission_condition_id" : 1 ,
"action" : "view" ,
"description" : "view"
}
]
}
]
}
} Permintaan dikirim ke foodsoul.ru — host dari portal ini, tidak dapat memilih yang lain.