API Produits
Endpoints pour la gestion des produits dans la boutique.
SDK: client.app.store.product
Endpoints
Lister les produits
Récupère la liste des produits avec pagination et filtres.
POST /app/{appId}/store/product/listRequête
| Champ | Type | Requis | Description |
|---|---|---|---|
apiKey | string | Oui | Clé API |
search | string | Non | Recherche textuelle |
ids | string[] | Non | Filtrer par IDs |
categoryId | string | Non | Filtrer par catégorie |
sellerId | string | Non | Filtrer par vendeur |
collectionIds | string[] | Non | Filtrer par collections |
tagIds | string[] | Non | Filtrer par tags |
status | string | Non | ACTIVE, DRAFT, ARCHIVED |
page | number | Non | Page (défaut: 1) |
limit | number | Non | Limite (défaut: 20, max: 100) |
curl -X POST https://api.applite.ai/app/{appId}/store/product/list \
-H "Content-Type: application/json" \
-d '{
"apiKey": "your_api_key",
"search": "T-Shirt",
"status": "ACTIVE",
"page": 1,
"limit": 20
}'Créer un produit
Crée un nouveau produit avec ses variantes.
POST /app/{appId}/store/product/createRequête
| Champ | Type | Requis | Description |
|---|---|---|---|
apiKey | string | Oui | Clé API |
name | string | Oui | Nom du produit |
sellerId | string | Oui | ID du vendeur |
categoryId | string | Oui | ID de la catégorie |
variants | array | Oui | Variantes du produit |
sku | string | Non | Code SKU global |
description | string | Non | Description |
status | string | Non | ACTIVE, DRAFT, ARCHIVED |
seoTitle | string | Non | Titre SEO |
seoDescription | string | Non | Description SEO |
collectionIds | string[] | Non | Collections |
tagIds | string[] | Non | Tags |
badgeId | string | Non | Badge |
shippingProfileId | string | Non | Profil de livraison |
attributes | array | Non | Attributs personnalisés |
Structure d’une variante:
{
"price": 2500,
"compareAtPrice": 3000,
"quantity": 100,
"sku": "TSP-001-M",
"isDefault": true,
"images": [
{ "url": "https://...", "imageId": "img_001" }
],
"optionValues": [
{ "optionId": "opt_001", "value": "M" }
]
}curl -X POST https://api.applite.ai/app/{appId}/store/product/create \
-H "Content-Type: application/json" \
-d '{
"apiKey": "your_api_key",
"name": "T-Shirt Premium",
"sellerId": "sel_789",
"categoryId": "cat_456",
"variants": [
{
"price": 2500,
"quantity": 100,
"isDefault": true,
"images": [{"url": "https://cdn.example.com/tshirt.jpg"}]
}
]
}'Obtenir un produit
Récupère les détails complets d’un produit.
POST /app/{appId}/store/product/{id}Requête
| Champ | Type | Requis | Description |
|---|---|---|---|
apiKey | string | Oui | Clé API |
curl -X POST https://api.applite.ai/app/{appId}/store/product/{productId} \
-H "Content-Type: application/json" \
-d '{
"apiKey": "your_api_key"
}'Mettre à jour un produit
Met à jour un produit existant.
POST /app/{appId}/store/product/{id}/editRequête
| Champ | Type | Requis | Description |
|---|---|---|---|
apiKey | string | Oui | Clé API |
name | string | Non | Nouveau nom |
description | string | Non | Nouvelle description |
status | string | Non | Nouveau statut |
categoryId | string | Non | Nouvelle catégorie |
variants | array | Non | Nouvelles variantes |
| … | Autres champs optionnels |
curl -X POST https://api.applite.ai/app/{appId}/store/product/{productId}/edit \
-H "Content-Type: application/json" \
-d '{
"apiKey": "your_api_key",
"name": "T-Shirt Premium V2",
"status": "DRAFT"
}'Supprimer un produit
Supprime un produit.
POST /app/{appId}/store/product/{id}/deleteRequête
| Champ | Type | Requis | Description |
|---|---|---|---|
apiKey | string | Oui | Clé API |
curl -X POST https://api.applite.ai/app/{appId}/store/product/{productId}/delete \
-H "Content-Type: application/json" \
-d '{
"apiKey": "your_api_key"
}'Last updated on