API for affiliates › Support Get ticket change history POST /api/crm/v2/tickets.get_historyv2
operationId: tickets.getHistory
Returns the ticket change history: creation, added and removed files, status changes, subject, description, assignee, teams, product, platform, and type — with date, initiator, before and after values, and network name.
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 array of object
id integer required
Example: 1100
date string (DataTimeFormatSQL) required
Example: 2024-05-02 08:31:16
action string (HistoryItemAction) required
Values: createdaddedchangeddeleted
Example: created
type string (HistoryItemType) required
Values: subjectdescriptionfilesstatususer_name_in_chargeteamsproductplatformtype
Example: subject
before string
Value before the change: request status, action, or file identifiers
Example: waiting_customer_response
after string
Value after the change: request status, action, or file identifiers
Example: 28d25e2b19189609dc68018406d920cb, b942924cbf4d341567dade78e60d8e2e
user_name string
Example: user name
chain_name string
Example: Green Basket | Kirov
affiliate_name string
Example: Alexandritto
curl PHP JavaScript Python Copy
curl -X POST 'https://foodsoul.ru/api/crm/v2/tickets.get_history' \
-H 'Authorization: Bearer fs_api_YOUR_TOKEN' \
-H 'language: en' \
-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_history' , [
'headers' => [
'Authorization' => 'Bearer fs_api_YOUR_TOKEN' ,
'language' => 'en' ,
'role' => 'affiliate' ,
],
'json' => [
'id' => 394 ,
],
]);
$data = json_decode (( string ) $response -> getBody (), true ); const response = await fetch ( "https://foodsoul.ru/api/crm/v2/tickets.get_history" , {
method : "POST" ,
headers : {
"Authorization" : "Bearer fs_api_YOUR_TOKEN" ,
"language" : "en" ,
"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_history" ,
headers ={
"Authorization" : "Bearer fs_api_YOUR_TOKEN" ,
"language" : "en" ,
"role" : "affiliate" ,
},
json ={
"id" : 394 ,
},
)
data = response . json () Response 200
{
"status" : "success" ,
"data" : [
{
"id" : 1100 ,
"date" : "2024-05-02 08:31:16" ,
"action" : "created" ,
"type" : "subject" ,
"before" : "waiting_customer_response" ,
"after" : "28d25e2b19189609dc68018406d920cb, b942924cbf4d341567dade78e60d8e2e" ,
"user_name" : "user name" ,
"chain_name" : "Green Basket | Kirov" ,
"affiliate_name" : "Alexandritto"
}
]
} Requests are sent to foodsoul.ru — the host of this portal; you cannot choose another one.