API pro affiliate partnery › Podpora Získat historii změn tiketu POST /api/crm/v2/tickets.get_historyv2
operationId: tickets.getHistory
Vrací historii změn tiketu: vytvoření, přidané a odstraněné soubory, změny stavu, tématu, popisu, odpovědné osoby, týmů, produktu, platformy a typu — s datem, iniciátorem, hodnotami před a po a názvem sítě.
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 array of object
id integer povinné
Příklad: 1100
date string (DataTimeFormatSQL) povinné
Příklad: 2024-05-02 08:31:16
action string (HistoryItemAction) povinné
Hodnoty: createdaddedchangeddeleted
Příklad: created
type string (HistoryItemType) povinné
Hodnoty: subjectdescriptionfilesstatususer_name_in_chargeteamsproductplatformtype
Příklad: subject
before string
Hodnota před změnou: stav žádosti, akce nebo identifikátory souborů
Příklad: waiting_customer_response
after string
Hodnota po změně: stav žádosti, akce nebo identifikátory souborů
Příklad: 28d25e2b19189609dc68018406d920cb, b942924cbf4d341567dade78e60d8e2e
user_name string
Příklad: user name
chain_name string
Příklad: Green Basket | Kirov
affiliate_name string
Příklad: Alexandritto
curl PHP JavaScript Python Kopírovat
curl -X POST 'https://foodsoul.ru/api/crm/v2/tickets.get_history' \
-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_history' , [
'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_history" , {
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_history" ,
headers ={
"Authorization" : "Bearer fs_api_YOUR_TOKEN" ,
"language" : "cs" ,
"role" : "affiliate" ,
},
json ={
"id" : 394 ,
},
)
data = response . json () Odpověď 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"
}
]
} Žádosti jsou odesílány na foodsoul.ru — to je hostitel tohoto portálu, jiný vybrat nelze.