Ortaklar için API › Ayarlar Kategoriyi sil POST /api/crm/v2/categories.deletev2
operationId: categories.delete
Bir kategoriyi ve tüm alt kategorilerini, ayrıca bu kategorilere ait ürünlerin bilgisayar ve mobil cihazlar için olan görsellerini siler. Eğer kategoride ürün veya alt kategori yoksa, 12 hata kodu döndürülür.
Yetkilendirme api-token + language + role
Sorgu parametreleri branch_id integer zorunlu
Örnek: 1
İstek gövdesi application/json Yanıtlar 200
object
status string zorunlu
Değerler: successerror
Örnek: success
curl PHP JavaScript Python Kopyala
curl -X POST 'https://foodsoul.ru/api/crm/v2/categories.delete?branch_id=1' \
-H 'Authorization: Bearer fs_api_YOUR_TOKEN' \
-H 'language: tr' \
-H 'role: partner' \
-H 'Content-Type: application/json' \
-d '{"id":1}' <?php
$client = new \GuzzleHttp\Client ();
$response = $client -> request ( 'POST' , 'https://foodsoul.ru/api/crm/v2/categories.delete?branch_id=1' , [
'headers' => [
'Authorization' => 'Bearer fs_api_YOUR_TOKEN' ,
'language' => 'tr' ,
'role' => 'partner' ,
],
'json' => [
'id' => 1 ,
],
]);
$data = json_decode (( string ) $response -> getBody (), true ); const response = await fetch ( "https://foodsoul.ru/api/crm/v2/categories.delete?branch_id=1" , {
method : "POST" ,
headers : {
"Authorization" : "Bearer fs_api_YOUR_TOKEN" ,
"language" : "tr" ,
"role" : "partner" ,
"Content-Type" : "application/json"
},
body : JSON . stringify ({
"id" : 1
}),
})
const data = await response . json () import requests
response = requests . request (
"POST" ,
"https://foodsoul.ru/api/crm/v2/categories.delete?branch_id=1" ,
headers ={
"Authorization" : "Bearer fs_api_YOUR_TOKEN" ,
"language" : "tr" ,
"role" : "partner" ,
},
json ={
"id" : 1 ,
},
)
data = response . json () Yanıt 200
{
"status" : "success" ,
"data" : {}
} İstekler foodsoul.ru adresine gönderiliyor — bu portalın ana bilgisayarıdır, başka birini seçmek mümkün değildir.