API for partners › Authorization Get the latest news item GET /api/crm/v2/application.get_last_news_itemv2
operationId: application.getLastNewsItem
Returns the latest unread news item for the current user to display in a popup. After the response, the news item is marked as shown so it will not appear again.
Authorization api-token + language + role
Responses 200
object
status string required
Values: successerror
Example: success
data array of object required
id number required
Example: 1
date_publication string required
Example: 2023-12-28 21:57:50
title string required
Example: Test: Boys next door
content string required
Example: <b>Best regards, the FoodSoul team!</b>
section string required
Example: news
curl PHP JavaScript Python Copy
curl -X GET 'https://foodsoul.ru/api/crm/v2/application.get_last_news_item' \
-H 'Authorization: Bearer fs_api_YOUR_TOKEN' \
-H 'language: en' \
-H 'role: partner' <?php
$client = new \GuzzleHttp\Client ();
$response = $client -> request ( 'GET' , 'https://foodsoul.ru/api/crm/v2/application.get_last_news_item' , [
'headers' => [
'Authorization' => 'Bearer fs_api_YOUR_TOKEN' ,
'language' => 'en' ,
'role' => 'partner' ,
],
]);
$data = json_decode (( string ) $response -> getBody (), true ); const response = await fetch ( "https://foodsoul.ru/api/crm/v2/application.get_last_news_item" , {
method : "GET" ,
headers : {
"Authorization" : "Bearer fs_api_YOUR_TOKEN" ,
"language" : "en" ,
"role" : "partner"
},
})
const data = await response . json () import requests
response = requests . request (
"GET" ,
"https://foodsoul.ru/api/crm/v2/application.get_last_news_item" ,
headers ={
"Authorization" : "Bearer fs_api_YOUR_TOKEN" ,
"language" : "en" ,
"role" : "partner" ,
},
)
data = response . json () Response 200
{
"status" : "success" ,
"data" : [
{
"id" : 1 ,
"date_publication" : "2023-12-28 21:57:50" ,
"title" : "Test: Boys next door" ,
"content" : "<b>Best regards, the FoodSoul team!</b>" ,
"section" : "news"
}
]
} Requests are sent to foodsoul.ru — the host of this portal; you cannot choose another one.