API untuk afiliasi › Otorisasi Mendapatkan berita terbaru GET /api/crm/v2/application.get_last_news_itemv2
operationId: application.getLastNewsItem
Mengembalikan berita terakhir yang belum dibaca untuk pengguna saat ini, untuk ditampilkan dalam jendela pop-up. Setelah respons, berita akan ditandai sebagai telah ditampilkan agar tidak muncul lagi.
Otorisasi api-token + language + role
Tanggapan 200
object
status string wajib
Nilai: successerror
Contoh: success
data array of object wajib
date_publication string wajib
Contoh: 2023-12-28 21:57:50
title string wajib
Contoh: Test: Boys next door
content string wajib
Contoh: <b>Best regards, the FoodSoul team!</b>
section string wajib
Contoh: news
curl PHP JavaScript Python Salin
curl -X GET 'https://foodsoul.pro/api/crm/v2/application.get_last_news_item' \
-H 'Authorization: Bearer fs_api_YOUR_TOKEN' \
-H 'language: id' \
-H 'role: affiliate' <?php
$client = new \GuzzleHttp\Client ();
$response = $client -> request ( 'GET' , 'https://foodsoul.pro/api/crm/v2/application.get_last_news_item' , [
'headers' => [
'Authorization' => 'Bearer fs_api_YOUR_TOKEN' ,
'language' => 'id' ,
'role' => 'affiliate' ,
],
]);
$data = json_decode (( string ) $response -> getBody (), true ); const response = await fetch ( "https://foodsoul.pro/api/crm/v2/application.get_last_news_item" , {
method : "GET" ,
headers : {
"Authorization" : "Bearer fs_api_YOUR_TOKEN" ,
"language" : "id" ,
"role" : "affiliate"
},
})
const data = await response . json () import requests
response = requests . request (
"GET" ,
"https://foodsoul.pro/api/crm/v2/application.get_last_news_item" ,
headers ={
"Authorization" : "Bearer fs_api_YOUR_TOKEN" ,
"language" : "id" ,
"role" : "affiliate" ,
},
)
data = response . json () Jawaban 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"
}
]
} Permintaan dikirim ke foodsoul.pro — host dari portal ini, tidak dapat memilih yang lain.