Skip to Content
Nouvelle documentation Applite - JS SDK, Dart SDK & REST API
JavaScript SDKTémoignages

Témoignages (TestimonyApi)

Le module TestimonyApi gère les témoignages clients. Les témoignages passent par un workflow d’approbation (PENDING → APPROVED/REJECTED).

Accès : client.testimony

Méthodes

create

Crée un nouveau témoignage (admin).

const response = await client.testimony.create({ appId: "app_id", apiKey: "user_api_key", name: "Jean Dupont", comment: "Excellent service !", rating: 5, status: "APPROVED" });

list

Liste les témoignages avec filtres et pagination.

const response = await client.testimony.list({ appId: "app_id", apiKey: "user_api_key", status: "APPROVED", page: 1, limit: 20 });

getById

Récupère un témoignage par son ID.

const response = await client.testimony.getById({ appId: "app_id", apiKey: "user_api_key", id: "testimony_id" });

update

Met à jour un témoignage.

const response = await client.testimony.update({ appId: "app_id", apiKey: "user_api_key", id: "testimony_id", rating: 4, isFeatured: true });

delete

Supprime un témoignage.

const response = await client.testimony.delete({ appId: "app_id", apiKey: "user_api_key", id: "testimony_id" });

updateStatus

Approuve ou rejette un témoignage.

const response = await client.testimony.updateStatus({ appId: "app_id", apiKey: "user_api_key", id: "testimony_id", status: "APPROVED" });

submit

Permet à un client de soumettre un témoignage.

const response = await client.testimony.submit({ appId: "app_id", appApiKey: "app_api_key", customerApiKey: "customer_api_key", name: "Marie Martin", comment: "Super expérience !", rating: 5 });

listPublic

Liste les témoignages approuvés (endpoint public).

const response = await client.testimony.listPublic({ appId: "app_id", appApiKey: "app_api_key", isFeatured: true, limit: 10 });
Last updated on