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

API Commandes

Endpoints pour la gestion des commandes.

SDK: client.app.store.order

Endpoints

Lister les commandes

POST /app/{appId}/store/order/list
ChampTypeRequisDescription
apiKeystringOuiClé 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/create
ChampTypeRequisDescription
apiKeystringOuiClé API
customerIdstringOuiID du client
sellerIdstringOuiID du vendeur
itemsarrayOuiArticles de la commande
refstringNonRéférence personnalisée
shippingAddressobjectNonAdresse de livraison
billingAddressobjectNonAdresse de facturation
discountTotalnumberNonRéduction totale
shippingTotalnumberNonFrais de livraison
taxTotalnumberNonTaxes 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}
ChampTypeRequisDescription
apiKeystringOuiClé 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}/edit
ChampTypeRequisDescription
apiKeystringOuiClé API
statusstringNonNouveau statut
paymentStatusstringNonNouveau statut de paiement
fulfillmentStatusstringNonNouveau statut de fulfillment
refstringNonNouvelle référence
shippingAddressobjectNonNouvelle adresse livraison
billingAddressobjectNonNouvelle 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}/delete
ChampTypeRequisDescription
apiKeystringOuiClé 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