API per partner › Impostazioni Eliminare una categoria POST /api/crm/v2/categories.deletev2
operationId: categories.delete
Elimina una categoria insieme a tutte le sue sottocategorie, nonché le immagini dei loro prodotti per computer e dispositivi mobili. Se la categoria non contiene né prodotti né sottocategorie, viene restituito l'errore 12.
Autorizzazione api-token + language + role
Parametri della richiesta branch_id integer obbligatorio
Esempio: 1
Corpo della richiesta application/json object
id integer obbligatorio
Esempio: 1
Risposte 200
object
status string obbligatorio
Valori: successerror
Esempio: success
curl PHP JavaScript Python Copiare
curl -X POST 'https://foodsoul.pro/api/crm/v2/categories.delete?branch_id=1' \
-H 'Authorization: Bearer fs_api_YOUR_TOKEN' \
-H 'language: it' \
-H 'role: partner' \
-H 'Content-Type: application/json' \
-d '{"id":1}' <?php
$client = new \GuzzleHttp\Client ();
$response = $client -> request ( 'POST' , 'https://foodsoul.pro/api/crm/v2/categories.delete?branch_id=1' , [
'headers' => [
'Authorization' => 'Bearer fs_api_YOUR_TOKEN' ,
'language' => 'it' ,
'role' => 'partner' ,
],
'json' => [
'id' => 1 ,
],
]);
$data = json_decode (( string ) $response -> getBody (), true ); const response = await fetch ( "https://foodsoul.pro/api/crm/v2/categories.delete?branch_id=1" , {
method : "POST" ,
headers : {
"Authorization" : "Bearer fs_api_YOUR_TOKEN" ,
"language" : "it" ,
"role" : "partner" ,
"Content-Type" : "application/json"
},
body : JSON . stringify ({
"id" : 1
}),
})
const data = await response . json () import requests
response = requests . request (
"POST" ,
"https://foodsoul.pro/api/crm/v2/categories.delete?branch_id=1" ,
headers ={
"Authorization" : "Bearer fs_api_YOUR_TOKEN" ,
"language" : "it" ,
"role" : "partner" ,
},
json ={
"id" : 1 ,
},
)
data = response . json () Risposta 200
{
"status" : "success" ,
"data" : {}
} Le richieste vengono inviate a foodsoul.pro, che è l’host di questo portale; non è possibile sceglierne un altro.