API per partner › Account Eliminare un contraente POST /api/crm/v2/contractors.deletev2
operationId: contractors.delete
Elimina un contraente. Non è possibile eliminare una voce con readonly — cioè con un contratto già stipulato. Non è inoltre possibile eliminare l’ultimo contraente dell’account: in ogni filiale deve rimanere almeno un contraente.
Autorizzazione api-token + language + role
Parametri della richiesta chain_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.ru/api/crm/v2/contractors.delete?chain_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.ru/api/crm/v2/contractors.delete?chain_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.ru/api/crm/v2/contractors.delete?chain_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.ru/api/crm/v2/contractors.delete?chain_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.ru, che è l’host di questo portale; non è possibile sceglierne un altro.