Skip to Content
Nouvelle documentation Applite - JS SDK, Dart SDK & REST API
Dart SDKClients

Clients (CustomerApi)

Le module CustomerApi permet de gérer les clients de votre application.

Accès : client.customer

Méthodes

auth

Authentifie ou crée un client.

final response = await client.customer.auth( CustomerAuthParams( appId: 'app_id', apiKey: 'user_api_key', fullname: 'Jean Dupont', telephone: '+2250700000000', plateform: 'STORE', ), ); print('Client: ${response.data.fullname}');

list

Liste les clients.

final response = await client.customer.list( CustomerListParams(apiKey: 'user_api_key'), ); for (final c in response.data) { print('${c.fullname} - ${c.telephone}'); }

get

Récupère les détails d’un client.

final response = await client.customer.get( CustomerGetParams( apiKey: 'user_api_key', id: 'customer_id', ), ); print('Commandes: ${response.data?.stats.totalOrders}');

update

Met à jour un client.

final response = await client.customer.update( CustomerUpdateParams( apiKey: 'user_api_key', id: 'customer_id', fullname: 'Jean Dupont Jr', ), );

block

Bloque ou débloque un client.

final response = await client.customer.block( CustomerBlockParams( apiKey: 'user_api_key', id: 'customer_id', isBlocked: true, ), );

markViewed

Marque un client comme vu (supprime le badge “Nouveau”).

final response = await client.customer.markViewed( CustomerMarkViewedParams( apiKey: 'user_api_key', appId: 'app_id', id: 'customer_id', ), );
Last updated on