API Commandes
Endpoints pour la gestion des commandes.
SDK: client.app.store.order
Endpoints
Lister les commandes
POST /app/{appId}/store/order/listRequête
| Champ | Type | Requis | Description |
|---|---|---|---|
apiKey | string | Oui | Clé API |
curl -X POST https://api.applite.ai/app/{appId}/store/order/list \
-H "Content-Type: application/json" \
-d '{"apiKey": "your_api_key"}'Créer une commande
POST /app/{appId}/store/order/createRequête
| Champ | Type | Requis | Description |
|---|---|---|---|
apiKey | string | Oui | Clé API |
customerId | string | Oui | ID du client |
sellerId | string | Oui | ID du vendeur |
items | array | Oui | Articles de la commande |
ref | string | Non | Référence personnalisée |
shippingAddress | object | Non | Adresse de livraison |
billingAddress | object | Non | Adresse de facturation |
discountTotal | number | Non | Réduction totale |
shippingTotal | number | Non | Frais de livraison |
taxTotal | number | Non | Taxes totales |
Structure d’un article:
{
"productId": "prod_123",
"variantId": "var_001",
"quantity": 2,
"price": 2500
}curl -X POST https://api.applite.ai/app/{appId}/store/order/create \
-H "Content-Type: application/json" \
-d '{
"apiKey": "your_api_key",
"customerId": "cust_456",
"sellerId": "sel_789",
"items": [
{"productId": "prod_123", "variantId": "var_001", "quantity": 2, "price": 2500}
],
"shippingTotal": 1000
}'Obtenir une commande
POST /app/{appId}/store/order/{id}Requête
| Champ | Type | Requis | Description |
|---|---|---|---|
apiKey | string | Oui | Clé API |
curl -X POST https://api.applite.ai/app/{appId}/store/order/{orderId} \
-H "Content-Type: application/json" \
-d '{"apiKey": "your_api_key"}'Mettre à jour une commande
POST /app/{appId}/store/order/{id}/editRequête
| Champ | Type | Requis | Description |
|---|---|---|---|
apiKey | string | Oui | Clé API |
status | string | Non | Nouveau statut |
paymentStatus | string | Non | Nouveau statut de paiement |
fulfillmentStatus | string | Non | Nouveau statut de fulfillment |
ref | string | Non | Nouvelle référence |
shippingAddress | object | Non | Nouvelle adresse livraison |
billingAddress | object | Non | Nouvelle adresse facturation |
curl -X POST https://api.applite.ai/app/{appId}/store/order/{orderId}/edit \
-H "Content-Type: application/json" \
-d '{
"apiKey": "your_api_key",
"status": "confirmed",
"fulfillmentStatus": "fulfilled"
}'Supprimer une commande
POST /app/{appId}/store/order/{id}/deleteRequête
| Champ | Type | Requis | Description |
|---|---|---|---|
apiKey | string | Oui | Clé API |
curl -X POST https://api.applite.ai/app/{appId}/store/order/{orderId}/delete \
-H "Content-Type: application/json" \
-d '{"apiKey": "your_api_key"}'La suppression d’une commande est irréversible. Préférez changer le statut à cancelled pour conserver l’historique.
Last updated on