აფილეიტებისთვის API › ავტორიზაცია ბოლო სიახლის მიღება GET /api/crm/v2/application.get_last_news_itemv2
operationId: application.getLastNewsItem
აბრუნებს მიმდინარე მომხმარებლისთვის ბოლო წაუკითხავ სიახლეს, რათა გამოჩნდეს პოპაპ ფანჯარაში. პასუხის შემდეგ სიახლე აღინიშნება როგორც ნაჩვენები, რომ აღარ გამოჩნდეს ხელახლა.
ავტორიზაცია api-token + language + role
პასუხები 200
object
status string სავალდებულო
მნიშვნელობები: successerror
მაგალითი: success
data array of object სავალდებულო
id number სავალდებულო
მაგალითი: 1
date_publication string სავალდებულო
მაგალითი: 2023-12-28 21:57:50
title string სავალდებულო
მაგალითი: Test: Boys next door
content string სავალდებულო
ახალი ამბების ტექსტი HTML ფორმატში
მაგალითი: <b>Best regards, the FoodSoul team!</b>
section string სავალდებულო
მაგალითი: news
curl PHP JavaScript Python კოპირება
curl -X GET 'https://foodsoul.ru/api/crm/v2/application.get_last_news_item' \
-H 'Authorization: Bearer fs_api_YOUR_TOKEN' \
-H 'language: ka' \
-H 'role: affiliate' <?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' => 'ka' ,
'role' => 'affiliate' ,
],
]);
$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" : "ka" ,
"role" : "affiliate"
},
})
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" : "ka" ,
"role" : "affiliate" ,
},
)
data = response . json () პასუხი 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"
}
]
} მოთხოვნები იგზავნება foodsoul.ru-ზე — ეს პორტალის ჰოსტია, სხვა არჩევა შეუძლებელია.