პარტნიორებისთვის API › ინფორმაცია ჩამატება შავ სიაში ჩანაწერის POST /api/crm/v2/black_list.addv2
operationId: blackList.add
ჩამატებს ჩანაწერს შავ სიაში. type_lock განსაზღვრავს, რომელი იდენტიფიკატორია მოსალოდნელი მოთხოვნის სხეულში: phone_number, client_branch_profile_id ან client_account_id. დუბლიკატი ქსელის ფარგლებში უარყოფილია.
ავტორიზაცია api-token + language + role
მოთხოვნის სხეული application/json object
type_lock string სავალდებულო
მნიშვნელობები: phone_numberclient_branch_profile_idclient_account_id
მაგალითი: phone_number
ერთ-ერთი ვარიანტი
blackListOneOf
object (blackListOneOf)
ქსელისთვის მოთხოვნის სხეული
ერთ-ერთი ვარიანტი
object object object
object
ბლოკირება phone_number-ის მიხედვით
phone_format_id integer (PhoneFormatId) სავალდებულო
ქვეყნის კოდი: 1-🇷🇺(+7|8), 2-🇦🇿(+994|0), 3-🇧🇾(+375|80), 4-🇰🇿(+7|8), 6-🇷🇸(+381|0), 7-🇹🇷(+90|0), 8-🇺🇦(+380|0), 9-🇵🇹(+351|0), 10-🇰🇬(+996|0), 11-🇺🇸(+1), 12-🇫🇷(+33|0), 13-🇲🇩(+373|0), 15-🇪🇪(+372), 18-🇬🇪(+995), 19-🇺🇿(+998), 22-🇵🇱(+48|0), 23-🇹🇯(+992|8), 25-🇷🇴(+40|0), 44-🇨🇭(+41|0)
მაგალითი: 1
phone_number string სავალდებულო
მაგალითი: 705-712-51-20
object
ბლოკირება client_branch_profile_id-ის მიხედვით
client_branch_profile_id integer სავალდებულო
ფილიალში კლიენტის პროფილის ID
მაგალითი: 48997963
object
ბლოკირება client_account_id-ის მიხედვით
client_account_id integer სავალდებულო
მაგალითი: 4211309
პასუხები 200
object
status string სავალდებულო
მნიშვნელობები: successerror
მაგალითი: success
data object
description string
მაგალითი: Successfully added
row object
chain_id integer
მაგალითი: 7135
date string (DataTimeFormatSQL)
მაგალითი: 2024-05-02 08:31:16
phone_format_id integer
მაგალითი: 4
phone_number string
მაგალითი: 7057125119
client_account_id integer
მაგალითი: 0
client_branch_profile_id integer
მაგალითი: 0
blocked boolean
მაგალითი: true
curl PHP JavaScript Python კოპირება
curl -X POST 'https://foodsoul.ru/api/crm/v2/black_list.add' \
-H 'Authorization: Bearer fs_api_YOUR_TOKEN' \
-H 'language: ka' \
-H 'role: partner' \
-H 'Content-Type: application/json' \
-d '{"phone_format_id":1,"phone_number":"705-712-51-20"}' <?php
$client = new \GuzzleHttp\Client ();
$response = $client -> request ( 'POST' , 'https://foodsoul.ru/api/crm/v2/black_list.add' , [
'headers' => [
'Authorization' => 'Bearer fs_api_YOUR_TOKEN' ,
'language' => 'ka' ,
'role' => 'partner' ,
],
'json' => [
'phone_format_id' => 1 ,
'phone_number' => '705-712-51-20' ,
],
]);
$data = json_decode (( string ) $response -> getBody (), true ); const response = await fetch ( "https://foodsoul.ru/api/crm/v2/black_list.add" , {
method : "POST" ,
headers : {
"Authorization" : "Bearer fs_api_YOUR_TOKEN" ,
"language" : "ka" ,
"role" : "partner" ,
"Content-Type" : "application/json"
},
body : JSON . stringify ({
"phone_format_id" : 1 ,
"phone_number" : "705-712-51-20"
}),
})
const data = await response . json () import requests
response = requests . request (
"POST" ,
"https://foodsoul.ru/api/crm/v2/black_list.add" ,
headers ={
"Authorization" : "Bearer fs_api_YOUR_TOKEN" ,
"language" : "ka" ,
"role" : "partner" ,
},
json ={
"phone_format_id" : 1 ,
"phone_number" : "705-712-51-20" ,
},
)
data = response . json () პასუხი 200
{
"status" : "success" ,
"data" : {
"description" : "Successfully added" ,
"row" : {
"chain_id" : 7135 ,
"date" : "2024-05-02 08:31:16" ,
"phone_format_id" : 4 ,
"phone_number" : "7057125119" ,
"client_account_id" : 0 ,
"client_branch_profile_id" : 0 ,
"blocked" : true ,
"id" : "82348"
}
}
} მოთხოვნები იგზავნება foodsoul.ru-ზე — ეს პორტალის ჰოსტია, სხვა არჩევა შეუძლებელია.