API pro affiliate partnery › Podpora Získat chat s autorem požadavku POST /api/crm/v2/tickets.get_chat_customerv2
operationId: tickets.getChatCustomer
Vrací zprávy z otevřeného chatu s autorem požadavku (hidden=false): autor, text, odkazy na přílohy a reply_id — ID zprávy, na kterou byla poskytnuta odpověď.
Autorizace api-token + language + role
Tělo požadavku application/json object
id integer povinné
Příklad: 394
Odpovědi 200
object
status string povinné
Hodnoty: successerror
Příklad: success
data object
messages array of object
id integer povinné
Příklad: 880
date string (DataTimeFormatSQL) povinné
Příklad: 2024-05-02 08:31:16
user_id integer
Příklad: 632
message string
Příklad: Hello World
reply_id integer
Příklad: 879
hidden boolean povinné
Příklad: false
user_name string
Příklad: User Name
affiliate_name string
Příklad: user name
files array of object
file_id string povinné
Příklad: df9a0531a9da6cf027e5143f38486dba
link string povinné
Příklad: https://cdn.foodsoul.pro/support/407/images/df9a0531a9da6cf027e5143f38486dba.jpg?v1733409704
curl PHP JavaScript Python Kopírovat
curl -X POST 'https://foodsoul.ru/api/crm/v2/tickets.get_chat_customer' \
-H 'Authorization: Bearer fs_api_YOUR_TOKEN' \
-H 'language: cs' \
-H 'role: affiliate' \
-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' => 'cs' ,
'role' => 'affiliate' ,
],
'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" : "cs" ,
"role" : "affiliate" ,
"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" : "cs" ,
"role" : "affiliate" ,
},
json ={
"id" : 394 ,
},
)
data = response . json () Odpověď 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"
}
]
}
]
}
} Žádosti jsou odesílány na foodsoul.ru — to je hostitel tohoto portálu, jiný vybrat nelze.