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

Produits (StoreProduct)

Le module StoreProductModule permet de créer, modifier, lister et supprimer des produits dans votre boutique.

Accès : client.app.store.product

Méthodes

create

Crée un nouveau produit avec ses variantes.

const response = await client.app.store.product.create({ appId: "app_id", apiKey: "user_api_key", name: "T-Shirt Premium", description: "Un t-shirt de haute qualité", sellerId: "seller_id", categoryId: "category_id", variants: [ { price: 2500, quantity: 100, isDefault: true, images: [{ url: "https://example.com/image.jpg", imageId: "img_1" }] } ] }); if (response.success) { console.log("Produit créé :", response.data); }

list

Récupère la liste des produits avec pagination, recherche et filtres.

const response = await client.app.store.product.list({ appId: "app_id", apiKey: "user_api_key", search: "T-Shirt", // Recherche texte (nom, SKU, description...) categoryId: "cat_123", // Filtrer par catégorie status: "ACTIVE", // Filtrer par statut page: 1, limit: 20 });

get

Récupère les détails d’un produit spécifique.

const response = await client.app.store.product.get({ appId: "app_id", apiKey: "user_api_key", id: "product_id" });

update

Met à jour un produit existant.

const response = await client.app.store.product.update({ appId: "app_id", apiKey: "user_api_key", id: "product_id", name: "T-Shirt Premium V2", status: "ARCHIVED" });

delete

Supprime un produit.

const response = await client.app.store.product.delete({ appId: "app_id", apiKey: "user_api_key", id: "product_id" });
Last updated on