API for partners › Support Get chat with the ticket author POST /api/crm/v2/tickets.get_chat_customerv2
operationId: tickets.getChatCustomer
Returns messages from the open chat with the ticket author (hidden=false): author, text, attachment links, and reply_id — the ID of the message being replied to.
Authorization api-token + language + role
Request body application/json object
id integer required
Example: 394
Responses 200
object
status string required
Values: successerror
Example: success
data object
messages array of object
id integer required
Example: 880
date string (DataTimeFormatSQL) required
Example: 2024-05-02 08:31:16
user_id integer
Example: 632
message string
Example: Hello World
reply_id integer
Example: 879
hidden boolean required
Example: false
user_name string
Example: User Name
affiliate_name string
Example: user name
files array of object
file_id string required
Example: df9a0531a9da6cf027e5143f38486dba
link string required
Example: https://cdn.foodsoul.pro/support/407/images/df9a0531a9da6cf027e5143f38486dba.jpg?v1733409704
curl PHP JavaScript Python Copy
curl -X POST 'https://foodsoul.ru/api/crm/v2/tickets.get_chat_customer' \
-H 'Authorization: Bearer fs_api_YOUR_TOKEN' \
-H 'language: en' \
-H 'role: partner' \
-H 'Content-Type: application/json' \
-d '{"id":394}' <?php
$client = new \GuzzleHttp\Client ();
$response = $client -> request ( 'POST' , 'https://foodsoul.ru/api/crm/v2/tickets.get_chat_customer' , [
'headers' => [
'Authorization' => 'Bearer fs_api_YOUR_TOKEN' ,
'language' => 'en' ,
'role' => 'partner' ,
],
'json' => [
'id' => 394 ,
],
]);
$data = json_decode (( string ) $response -> getBody (), true ); const response = await fetch ( "https://foodsoul.ru/api/crm/v2/tickets.get_chat_customer" , {
method : "POST" ,
headers : {
"Authorization" : "Bearer fs_api_YOUR_TOKEN" ,
"language" : "en" ,
"role" : "partner" ,
"Content-Type" : "application/json"
},
body : JSON . stringify ({
"id" : 394
}),
})
const data = await response . json () import requests
response = requests . request (
"POST" ,
"https://foodsoul.ru/api/crm/v2/tickets.get_chat_customer" ,
headers ={
"Authorization" : "Bearer fs_api_YOUR_TOKEN" ,
"language" : "en" ,
"role" : "partner" ,
},
json ={
"id" : 394 ,
},
)
data = response . json () Response 200
{
"status" : "success" ,
"data" : {
"messages" : [
{
"id" : 880 ,
"date" : "2024-05-02 08:31:16" ,
"user_id" : 632 ,
"message" : "Hello World" ,
"reply_id" : 879 ,
"hidden" : false ,
"user_name" : "User Name" ,
"affiliate_name" : "user name" ,
"files" : [
{
"file_id" : "df9a0531a9da6cf027e5143f38486dba" ,
"link" : "https://cdn.foodsoul.pro/support/407/images/df9a0531a9da6cf027e5143f38486dba.jpg?v1733409704"
}
]
}
]
}
} Requests are sent to foodsoul.ru — the host of this portal; you cannot choose another one.