التوثيق متوفّر بالفرنسية والإنجليزية. يُعرض المحتوى هنا بالفرنسية — اختر EN من القائمة العلوية لقراءته بالإنجليزية.
Commandes
Création depuis un système externe, suivi, cycle de vie.
- GET
/ordersLister les commandes de la boutique - POST
/ordersCréer une commande (panier → commande) - GET
/orders/{order}Suivre une commande - POST
/orders/{order}/paymentsEnregistrer l’encaissement d’une commande - POST
/orders/{order}/statusFaire avancer une commande (confirmation, préparation, expédition, livraison, annulation)
Lister les commandes de la boutique #
/api/public/v1/quoshop/ordersorders:readlistOrdersCommandes passées sur la vitrine et créées par l’API. Filtres : status, paymentStatus (multi-valeurs), channel, externalId / source, email, placedFrom / placedTo, updatedSince (suivi incrémental des statuts). Tri permis : placedAt, number, updatedAt, total (défaut -placedAt). Pagination par curseur conseillée pour un parcours complet (limit, cursor).
المعاملات
langstringالاستعلامLangue du contenu marchand (titres, descriptions), parmi celles de la boutique (
GET /store→locales). Défaut :Accept-Language, sinon la langue par défaut de la boutique. Les libellés de codes (statusLabel…) suivent cette langue si elle estfr,enouar, l’anglais sinon.pagenumberالاستعلامNuméro de page (à partir de 1).
pageSizenumberالاستعلامÉléments par page (100 au plus).
sortstringالاستعلامTri : champs séparés par des virgules, préfixe
-pour l’ordre décroissant. Champs permis : voir la description de la route.updatedSincestringالاستعلامNe renvoie que les éléments créés ou modifiés depuis cet instant (ISO 8601, inclus) : la forme recommandée d’une synchronisation incrémentale, en complément des webhooks.
cursorstringالاستعلامPagination par curseur :
nextCursorde la page précédente, à repasser tel quel avec les mêmes filtres et le même tri. Stable même si des éléments sont créés pendant le parcours, et de coût constant quelle que soit la profondeur. Exclusif depage.limitnumberالاستعلامPagination par curseur : éléments par page (100 au plus).
?limit=100ouvre un parcours par curseur ; la réponse rendpagination.nextCursor.statusstring[]الاستعلامStatuts, séparés par des virgules.
paymentStatusstring[]الاستعلامStatuts de règlement, séparés par des virgules.
channelstringالاستعلامSTOREFRONTAPIexternalIdstringالاستعلامRéférence externe exacte.
sourcestringالاستعلامEspace de noms externe exact.
emailstringالاستعلامEmail de l’acheteur (exact, insensible à la casse).
placedFromstringالاستعلامPassées depuis (ISO 8601, inclus).
placedTostringالاستعلامPassées jusqu’à (ISO 8601, inclus — journée entière).
X-QuoShop-StorestringترويسةBoutique visée : identifiant (UUID) ou slug. Facultatif quand l’espace n’en tient qu’une. Boutique absente de l’espace (404), suspendue (403), ou non désignée alors que l’espace en tient plusieurs (400,
detail.stores).
الاستجابة 200application/json
Succès.
itemsOrderDto[]إلزاميتفاصيل OrderDto
paginationPaginationDtoإلزاميتفاصيل PaginationDto
الأخطاء
400VALIDATION_FAILEDIDEMPOTENCY_KEY_INVALIDINVALID_CURSOR
Paramètre ou corps invalide (champ manquant, inconnu, mal typé, tri non permis), ou curseur de pagination émis pour un autre tri ou d’autres filtres.
401API_KEY_MISSINGAPI_KEY_INVALIDAPI_KEY_REVOKEDAPI_KEY_EXPIRED
Jeton absent, invalide, révoqué ou expiré.
403API_KEY_WRONG_PERIMETERAPI_INSUFFICIENT_SCOPEAPI_ORIGIN_NOT_ALLOWEDAPI_TENANT_MISMATCHAPI_TENANT_INACTIVEAPI_MODULE_UNAVAILABLEAPI_FEATURE_UNAVAILABLE
Jeton valide mais insuffisant : mauvais périmètre, scope manquant, origine refusée, abonnement inactif ou module / option non inclus dans le plan.
404NOT_FOUND
Ressource absente — ou appartenant à un autre espace, ce qui revient au même.
429API_RATE_LIMITEDAPI_AUTH_BLOCKED
Quota du jeton ou de l’espace atteint (voir Retry-After), ou adresse bloquée.
500INTERNAL_ERROR
Erreur inattendue. Citez requestId au support.
503SERVICE_UNAVAILABLE
Indisponibilité temporaire (voir Retry-After). Aucun détail d’infrastructure.
curl 'https://quosuite.com/api/public/v1/quoshop/orders' \
-H "Authorization: Bearer $QUOSHOP_API_KEY"{
"success": true,
"data": {
"items": [
{
"id": "4d5be26d-7215-4ca2-8d6a-d2caf7cb2b25",
"number": "WEB-2026-000042",
"channel": "STOREFRONT",
"externalSource": "woocommerce",
"externalId": "10293",
"status": "NEW",
"statusLabel": "Confirmée",
"paymentStatus": "PENDING",
"paymentStatusLabel": "Payée",
"currency": "TND",
"locale": "fr",
"customer": {
"id": "b8d9d661-908c-4f9a-8102-7062468ebf9d",
"email": "client@exemple.tn",
"name": "Sarra Ben Ali",
"phone": null
},
"shippingAddress": {
"fullName": null,
"line1": "12 rue de la Liberté",
"line2": null,
"postalCode": "1002",
"city": "Tunis",
"country": "TN",
"notes": null
},
"billingAddress": {
"fullName": null,
"line1": "12 rue de la Liberté",
"line2": null,
"postalCode": "1002",
"city": "Tunis",
"country": "TN",
"notes": null
},
"delivery": {
"methodId": "a1bf3148-0209-4730-8b6d-9431e00e4125",
"code": "STANDARD",
"label": "Livraison standard"
},
"payment": {
"method": "CARD",
"label": "Carte bancaire",
"reference": "pi_3QxYz"
},
"totals": {
"items": 238,
"shipping": 7,
"discount": 0,
"totalExclTax": 207,
"tax": 38,
"total": 245,
"paid": 245,
"due": 0
},
"lines": [
{
"productId": "fb9cb358-8d6c-4602-8818-1c6d44d2c349",
"sku": "ART-0042",
"title": "Chaise en chêne massif",
"quantity": 2,
"unitPrice": 119,
"unitPriceExclTax": 100,
"vatRate": 19,
"totalExclTax": 200,
"tax": 38,
"total": 238
}
],
"erp": {
"posted": true,
"postedAt": "2026-10-02T09:15:00.000Z",
"salesDocument": {
"type": "COMMANDE_VENTE",
"typeLabel": "Facture",
"number": "FAC-2026-00042"
},
"invoiceNumber": "FAC-2026-00042",
"creditNoteNumber": null,
"stockApplied": true,
"lastError": null
},
"note": null,
"cancelReason": null,
"placedAt": "2026-10-02T09:15:00.000Z",
"confirmedAt": "2026-10-02T09:15:00.000Z",
"preparedAt": "2026-10-02T09:15:00.000Z",
"shippedAt": "2026-10-02T09:15:00.000Z",
"deliveredAt": "2026-10-02T09:15:00.000Z",
"cancelledAt": "2026-10-02T09:15:00.000Z",
"updatedAt": "2026-10-02T09:15:00.000Z"
}
],
"pagination": {
"page": 1,
"pageSize": 25,
"totalItems": 132,
"totalPages": 6,
"limit": 100,
"nextCursor": "c1.eyJzIjoiZGF0ZTpkZXNjLGlkOmFzYyIsImYiOiJ…",
"hasMore": true
}
},
"timestamp": "2026-10-02T09:15:00.000Z"
}جرّب هذا الطلب
Créer une commande (panier → commande) #
/api/public/v1/quoshop/ordersorders:writeآمن عند الإعادةcreateOrderCrée une commande sur la boutique depuis un système externe, puis la porte en gestion par la même passerelle que la vitrine : client ERP retrouvé par email (créé à défaut), pièce de vente au montant plein payé par le client, stock selon la politique de la boutique, règlement enregistré et lettré si payment.status = PAID.
Prix : ceux du catalogue publié au moment de la commande (promotions comprises) — jamais fournis par l’appelant ; expectedTotal permet de refuser un écart. Stock : contrôlé comme à la vitrine (409 si insuffisant). Livraison : un mode de la boutique (frais calculés par elle) ou des frais annoncés par l’intégration.
Idempotence stricte : (source, externalId) désigne une seule commande par boutique, garanti par la base. Le même envoi rejoué rend la commande existante (Idempotent-Replayed: true) et termine son passage en gestion s’il avait échoué ; un contenu différent sous la même référence est refusé (409, detail.orderId). Une même commande externe ne produit donc jamais deux factures.
Un échec du passage en gestion ne perd pas la commande : elle est créée (201), erp.posted = false et erp.lastError disent pourquoi.
المعاملات
X-QuoShop-StorestringترويسةBoutique visée : identifiant (UUID) ou slug. Facultatif quand l’espace n’en tient qu’une. Boutique absente de l’espace (404), suspendue (403), ou non désignée alors que l’espace en tient plusieurs (400,
detail.stores).Idempotency-KeystringترويسةClé d'idempotence (1–255 caractères ASCII imprimables, UUID v4 recommandé). Un nouvel essai avec la même clé et le même corps dans les 24 h rejoue la réponse du premier appel réussi (en-tête
Idempotent-Replayed: true) au lieu de créer une seconde fois. Même clé, corps différent : 422IDEMPOTENCY_KEY_REUSED. Premier appel encore en cours : 409IDEMPOTENCY_IN_PROGRESS.
جسم الطلب application/json
externalIdstringإلزاميIdentifiant de la commande dans le système externe. Avec
source, c’est la clé d’idempotence de la création, garantie par la base : renvoyer la même commande rend celle déjà créée (Idempotent-Replayed: true) — jamais une seconde commande, ni une seconde facture.مثال10293sourcestringEspace de noms du système externe. À distinguer quand plusieurs systèmes créent des commandes sur la même boutique avec des numérotations qui se recoupent.
افتراضي"api"مثالwoocommercecustomerOrderCustomerInputإلزاميتفاصيل OrderCustomerInput
linesOrderLineInput[]إلزاميLignes commandées (100 au plus). Les prix ne sont pas fournis : ils sont ceux du catalogue publié au moment de la commande, comme sur la vitrine.
تفاصيل OrderLineInput
shippingAddressCheckoutAddressDtoExigée pour un mode
SHIPPING.تفاصيل CheckoutAddressDto
billingAddressCheckoutAddressDtoOmise : l’adresse de livraison fait office d’adresse de facturation.
تفاصيل CheckoutAddressDto
deliveryOrderDeliveryInputتفاصيل OrderDeliveryInput
paymentOrderPaymentInputتفاصيل OrderPaymentInput
notestringMessage du client.
localestringLangue de l’acheteur (libellés des lignes, emails), parmi celles de la boutique.
مثالfrexpectedTotalnumberTotal TTC que l’intégration a affiché au client. Jamais utilisé pour facturer : un écart de plus d’un centime avec le total calculé par la boutique fait refuser la commande (409), plutôt que d’encaisser un montant que le client n’a pas vu.
مثال245postToErpbooleanPorter la commande en gestion immédiatement (client ERP, pièce de vente, stock, règlement).
false: la commande attend une confirmation (POST …/status).افتراضيtruenotifyCustomerbooleanEnvoyer l’accusé de réception de la boutique à l’acheteur.
افتراضيfalse
الاستجابة 201application/json
Commande créée — ou commande existante pour cette référence externe (`Idempotent-Replayed: true`).
idstring (uuid)إلزاميnumberstringإلزاميNuméro communiqué au client.
مثالWEB-2026-000042channelstringإلزاميPassée sur la vitrine, ou créée par un système externe.
القيمSTOREFRONTAPIexternalSourcestring | nullمثالwoocommerceexternalIdstring | nullمثال10293statusstringإلزاميالقيمNEWCONFIRMEDPREPAREDSHIPPEDDELIVEREDCANCELLEDstatusLabelstringإلزاميمثالConfirméepaymentStatusstringإلزاميالقيمPENDINGAUTHORIZEDPAIDPARTIALLY_REFUNDEDREFUNDEDFAILEDpaymentStatusLabelstringإلزاميمثالPayéecurrencystringإلزاميDevise de la boutique.
مثالTNDlocalestring | nullمثالfrcustomerOrderCustomerDtoإلزاميتفاصيل OrderCustomerDto
shippingAddressOrderAddressDto | nullتفاصيل OrderAddressDto
billingAddressOrderAddressDto | nullتفاصيل OrderAddressDto
deliveryOrderDeliveryDtoإلزاميتفاصيل OrderDeliveryDto
paymentOrderPaymentInfoDtoإلزاميتفاصيل OrderPaymentInfoDto
totalsOrderTotalsDtoإلزاميتفاصيل OrderTotalsDto
linesOrderLineDto[]إلزاميتفاصيل OrderLineDto
erpOrderErpDtoإلزاميتفاصيل OrderErpDto
notestring | nullcancelReasonstring | nullplacedAtstringإلزاميconfirmedAtstring | nullpreparedAtstring | nullshippedAtstring | nulldeliveredAtstring | nullcancelledAtstring | nullupdatedAtstringإلزامي
الأخطاء
400VALIDATION_FAILEDIDEMPOTENCY_KEY_INVALIDINVALID_CURSOR
Paramètre ou corps invalide (champ manquant, inconnu, mal typé, tri non permis), ou curseur de pagination émis pour un autre tri ou d’autres filtres.
401API_KEY_MISSINGAPI_KEY_INVALIDAPI_KEY_REVOKEDAPI_KEY_EXPIRED
Jeton absent, invalide, révoqué ou expiré.
403API_KEY_WRONG_PERIMETERAPI_INSUFFICIENT_SCOPEAPI_ORIGIN_NOT_ALLOWEDAPI_TENANT_MISMATCHAPI_TENANT_INACTIVEAPI_MODULE_UNAVAILABLEAPI_FEATURE_UNAVAILABLE
Jeton valide mais insuffisant : mauvais périmètre, scope manquant, origine refusée, abonnement inactif ou module / option non inclus dans le plan.
404NOT_FOUND
Ressource absente — ou appartenant à un autre espace, ce qui revient au même.
409CONFLICTIDEMPOTENCY_IN_PROGRESS
Conflit : valeur unique déjà prise, ou même clé d’idempotence encore en cours.
422BUSINESS_RULE_VIOLATIONIDEMPOTENCY_KEY_REUSED
Requête bien formée mais refusée par une règle de gestion de l’ERP (transition de statut interdite, pièce réglée verrouillée, stock…), ou clé d’idempotence réutilisée.
429API_RATE_LIMITEDAPI_AUTH_BLOCKED
Quota du jeton ou de l’espace atteint (voir Retry-After), ou adresse bloquée.
500INTERNAL_ERROR
Erreur inattendue. Citez requestId au support.
503SERVICE_UNAVAILABLE
Indisponibilité temporaire (voir Retry-After). Aucun détail d’infrastructure.
# Une clé par opération, réutilisée telle quelle à chaque nouvel essai.
curl -X POST 'https://quosuite.com/api/public/v1/quoshop/orders' \
-H "Authorization: Bearer $QUOSHOP_API_KEY" \
-H 'Idempotency-Key: 3f1c2a9e-5b7d-4e8a-9c1f-2d6b8e4a7c30' \
-H 'Content-Type: application/json' \
-d '{
"externalId": "10293",
"customer": {
"email": "client@exemple.tn"
},
"lines": [
{
"quantity": 2
}
]
}'{
"success": true,
"data": {
"id": "4d5be26d-7215-4ca2-8d6a-d2caf7cb2b25",
"number": "WEB-2026-000042",
"channel": "STOREFRONT",
"externalSource": "woocommerce",
"externalId": "10293",
"status": "NEW",
"statusLabel": "Confirmée",
"paymentStatus": "PENDING",
"paymentStatusLabel": "Payée",
"currency": "TND",
"locale": "fr",
"customer": {
"id": "b8d9d661-908c-4f9a-8102-7062468ebf9d",
"email": "client@exemple.tn",
"name": "Sarra Ben Ali",
"phone": null
},
"shippingAddress": {
"fullName": null,
"line1": "12 rue de la Liberté",
"line2": null,
"postalCode": "1002",
"city": "Tunis",
"country": "TN",
"notes": null
},
"billingAddress": {
"fullName": null,
"line1": "12 rue de la Liberté",
"line2": null,
"postalCode": "1002",
"city": "Tunis",
"country": "TN",
"notes": null
},
"delivery": {
"methodId": "a1bf3148-0209-4730-8b6d-9431e00e4125",
"code": "STANDARD",
"label": "Livraison standard"
},
"payment": {
"method": "CARD",
"label": "Carte bancaire",
"reference": "pi_3QxYz"
},
"totals": {
"items": 238,
"shipping": 7,
"discount": 0,
"totalExclTax": 207,
"tax": 38,
"total": 245,
"paid": 245,
"due": 0
},
"lines": [
{
"productId": "fb9cb358-8d6c-4602-8818-1c6d44d2c349",
"sku": "ART-0042",
"title": "Chaise en chêne massif",
"quantity": 2,
"unitPrice": 119,
"unitPriceExclTax": 100,
"vatRate": 19,
"totalExclTax": 200,
"tax": 38,
"total": 238
}
],
"erp": {
"posted": true,
"postedAt": "2026-10-02T09:15:00.000Z",
"salesDocument": {
"type": "COMMANDE_VENTE",
"typeLabel": "Facture",
"number": "FAC-2026-00042"
},
"invoiceNumber": "FAC-2026-00042",
"creditNoteNumber": null,
"stockApplied": true,
"lastError": null
},
"note": null,
"cancelReason": null,
"placedAt": "2026-10-02T09:15:00.000Z",
"confirmedAt": "2026-10-02T09:15:00.000Z",
"preparedAt": "2026-10-02T09:15:00.000Z",
"shippedAt": "2026-10-02T09:15:00.000Z",
"deliveredAt": "2026-10-02T09:15:00.000Z",
"cancelledAt": "2026-10-02T09:15:00.000Z",
"updatedAt": "2026-10-02T09:15:00.000Z"
},
"timestamp": "2026-10-02T09:15:00.000Z"
}Suivre une commande #
/api/public/v1/quoshop/orders/{order}orders:readgetOrderStatut, règlement, lignes, totaux et passage en gestion (erp : pièce de vente et facture émises, stock appliqué, dernier échec éventuel).
المعاملات
orderstringالمسارإلزاميIdentifiant (UUID) ou numéro (
WEB-2026-000042) de la commande.langstringالاستعلامLangue du contenu marchand (titres, descriptions), parmi celles de la boutique (
GET /store→locales). Défaut :Accept-Language, sinon la langue par défaut de la boutique. Les libellés de codes (statusLabel…) suivent cette langue si elle estfr,enouar, l’anglais sinon.X-QuoShop-StorestringترويسةBoutique visée : identifiant (UUID) ou slug. Facultatif quand l’espace n’en tient qu’une. Boutique absente de l’espace (404), suspendue (403), ou non désignée alors que l’espace en tient plusieurs (400,
detail.stores).
الاستجابة 200application/json
Succès.
idstring (uuid)إلزاميnumberstringإلزاميNuméro communiqué au client.
مثالWEB-2026-000042channelstringإلزاميPassée sur la vitrine, ou créée par un système externe.
القيمSTOREFRONTAPIexternalSourcestring | nullمثالwoocommerceexternalIdstring | nullمثال10293statusstringإلزاميالقيمNEWCONFIRMEDPREPAREDSHIPPEDDELIVEREDCANCELLEDstatusLabelstringإلزاميمثالConfirméepaymentStatusstringإلزاميالقيمPENDINGAUTHORIZEDPAIDPARTIALLY_REFUNDEDREFUNDEDFAILEDpaymentStatusLabelstringإلزاميمثالPayéecurrencystringإلزاميDevise de la boutique.
مثالTNDlocalestring | nullمثالfrcustomerOrderCustomerDtoإلزاميتفاصيل OrderCustomerDto
shippingAddressOrderAddressDto | nullتفاصيل OrderAddressDto
billingAddressOrderAddressDto | nullتفاصيل OrderAddressDto
deliveryOrderDeliveryDtoإلزاميتفاصيل OrderDeliveryDto
paymentOrderPaymentInfoDtoإلزاميتفاصيل OrderPaymentInfoDto
totalsOrderTotalsDtoإلزاميتفاصيل OrderTotalsDto
linesOrderLineDto[]إلزاميتفاصيل OrderLineDto
erpOrderErpDtoإلزاميتفاصيل OrderErpDto
notestring | nullcancelReasonstring | nullplacedAtstringإلزاميconfirmedAtstring | nullpreparedAtstring | nullshippedAtstring | nulldeliveredAtstring | nullcancelledAtstring | nullupdatedAtstringإلزامي
الأخطاء
400VALIDATION_FAILEDIDEMPOTENCY_KEY_INVALIDINVALID_CURSOR
Paramètre ou corps invalide (champ manquant, inconnu, mal typé, tri non permis), ou curseur de pagination émis pour un autre tri ou d’autres filtres.
401API_KEY_MISSINGAPI_KEY_INVALIDAPI_KEY_REVOKEDAPI_KEY_EXPIRED
Jeton absent, invalide, révoqué ou expiré.
403API_KEY_WRONG_PERIMETERAPI_INSUFFICIENT_SCOPEAPI_ORIGIN_NOT_ALLOWEDAPI_TENANT_MISMATCHAPI_TENANT_INACTIVEAPI_MODULE_UNAVAILABLEAPI_FEATURE_UNAVAILABLE
Jeton valide mais insuffisant : mauvais périmètre, scope manquant, origine refusée, abonnement inactif ou module / option non inclus dans le plan.
404NOT_FOUND
Ressource absente — ou appartenant à un autre espace, ce qui revient au même.
429API_RATE_LIMITEDAPI_AUTH_BLOCKED
Quota du jeton ou de l’espace atteint (voir Retry-After), ou adresse bloquée.
500INTERNAL_ERROR
Erreur inattendue. Citez requestId au support.
503SERVICE_UNAVAILABLE
Indisponibilité temporaire (voir Retry-After). Aucun détail d’infrastructure.
curl 'https://quosuite.com/api/public/v1/quoshop/orders/1c5f6225-fd1a-4972-8a9d-b546c2158aed' \
-H "Authorization: Bearer $QUOSHOP_API_KEY"{
"success": true,
"data": {
"id": "4d5be26d-7215-4ca2-8d6a-d2caf7cb2b25",
"number": "WEB-2026-000042",
"channel": "STOREFRONT",
"externalSource": "woocommerce",
"externalId": "10293",
"status": "NEW",
"statusLabel": "Confirmée",
"paymentStatus": "PENDING",
"paymentStatusLabel": "Payée",
"currency": "TND",
"locale": "fr",
"customer": {
"id": "b8d9d661-908c-4f9a-8102-7062468ebf9d",
"email": "client@exemple.tn",
"name": "Sarra Ben Ali",
"phone": null
},
"shippingAddress": {
"fullName": null,
"line1": "12 rue de la Liberté",
"line2": null,
"postalCode": "1002",
"city": "Tunis",
"country": "TN",
"notes": null
},
"billingAddress": {
"fullName": null,
"line1": "12 rue de la Liberté",
"line2": null,
"postalCode": "1002",
"city": "Tunis",
"country": "TN",
"notes": null
},
"delivery": {
"methodId": "a1bf3148-0209-4730-8b6d-9431e00e4125",
"code": "STANDARD",
"label": "Livraison standard"
},
"payment": {
"method": "CARD",
"label": "Carte bancaire",
"reference": "pi_3QxYz"
},
"totals": {
"items": 238,
"shipping": 7,
"discount": 0,
"totalExclTax": 207,
"tax": 38,
"total": 245,
"paid": 245,
"due": 0
},
"lines": [
{
"productId": "fb9cb358-8d6c-4602-8818-1c6d44d2c349",
"sku": "ART-0042",
"title": "Chaise en chêne massif",
"quantity": 2,
"unitPrice": 119,
"unitPriceExclTax": 100,
"vatRate": 19,
"totalExclTax": 200,
"tax": 38,
"total": 238
}
],
"erp": {
"posted": true,
"postedAt": "2026-10-02T09:15:00.000Z",
"salesDocument": {
"type": "COMMANDE_VENTE",
"typeLabel": "Facture",
"number": "FAC-2026-00042"
},
"invoiceNumber": "FAC-2026-00042",
"creditNoteNumber": null,
"stockApplied": true,
"lastError": null
},
"note": null,
"cancelReason": null,
"placedAt": "2026-10-02T09:15:00.000Z",
"confirmedAt": "2026-10-02T09:15:00.000Z",
"preparedAt": "2026-10-02T09:15:00.000Z",
"shippedAt": "2026-10-02T09:15:00.000Z",
"deliveredAt": "2026-10-02T09:15:00.000Z",
"cancelledAt": "2026-10-02T09:15:00.000Z",
"updatedAt": "2026-10-02T09:15:00.000Z"
},
"timestamp": "2026-10-02T09:15:00.000Z"
}جرّب هذا الطلب
Enregistrer l’encaissement d’une commande #
/api/public/v1/quoshop/orders/{order}/paymentsorders:writeآمن عند الإعادةrecordOrderPaymentEncaissement survenu après la commande (paiement à la livraison, virement reçu…) : enregistré dans l’ERP et lettré sur la facture, la commande étant portée en gestion au passage si elle ne l’était pas. Idempotent par reference : rejouée, la même référence n’enregistre rien de plus. Une commande porte un règlement : un second, sous une autre référence, est refusé (409).
المعاملات
orderstringالمسارإلزاميIdentifiant (UUID) ou numéro (
WEB-2026-000042) de la commande.X-QuoShop-StorestringترويسةBoutique visée : identifiant (UUID) ou slug. Facultatif quand l’espace n’en tient qu’une. Boutique absente de l’espace (404), suspendue (403), ou non désignée alors que l’espace en tient plusieurs (400,
detail.stores).Idempotency-KeystringترويسةClé d'idempotence (1–255 caractères ASCII imprimables, UUID v4 recommandé). Un nouvel essai avec la même clé et le même corps dans les 24 h rejoue la réponse du premier appel réussi (en-tête
Idempotent-Replayed: true) au lieu de créer une seconde fois. Même clé, corps différent : 422IDEMPOTENCY_KEY_REUSED. Premier appel encore en cours : 409IDEMPOTENCY_IN_PROGRESS.
جسم الطلب application/json
referencestringإلزاميRéférence de l’encaissement — clé d’idempotence : rejouée, rien n’est réécrit.
مثالpi_3QxYzamountnumberإلزاميمثال245methodstringCarte par défaut.
القيمCASHCHECKDRAFTTRANSFERCARDLOYALTYBALANCECREDITOTHERpaidAtstringمثال2026-10-02T09:12:00Z
الاستجابة 201application/json
Créé.
idstring (uuid)إلزاميnumberstringإلزاميNuméro communiqué au client.
مثالWEB-2026-000042channelstringإلزاميPassée sur la vitrine, ou créée par un système externe.
القيمSTOREFRONTAPIexternalSourcestring | nullمثالwoocommerceexternalIdstring | nullمثال10293statusstringإلزاميالقيمNEWCONFIRMEDPREPAREDSHIPPEDDELIVEREDCANCELLEDstatusLabelstringإلزاميمثالConfirméepaymentStatusstringإلزاميالقيمPENDINGAUTHORIZEDPAIDPARTIALLY_REFUNDEDREFUNDEDFAILEDpaymentStatusLabelstringإلزاميمثالPayéecurrencystringإلزاميDevise de la boutique.
مثالTNDlocalestring | nullمثالfrcustomerOrderCustomerDtoإلزاميتفاصيل OrderCustomerDto
shippingAddressOrderAddressDto | nullتفاصيل OrderAddressDto
billingAddressOrderAddressDto | nullتفاصيل OrderAddressDto
deliveryOrderDeliveryDtoإلزاميتفاصيل OrderDeliveryDto
paymentOrderPaymentInfoDtoإلزاميتفاصيل OrderPaymentInfoDto
totalsOrderTotalsDtoإلزاميتفاصيل OrderTotalsDto
linesOrderLineDto[]إلزاميتفاصيل OrderLineDto
erpOrderErpDtoإلزاميتفاصيل OrderErpDto
notestring | nullcancelReasonstring | nullplacedAtstringإلزاميconfirmedAtstring | nullpreparedAtstring | nullshippedAtstring | nulldeliveredAtstring | nullcancelledAtstring | nullupdatedAtstringإلزامي
الأخطاء
400VALIDATION_FAILEDIDEMPOTENCY_KEY_INVALIDINVALID_CURSOR
Paramètre ou corps invalide (champ manquant, inconnu, mal typé, tri non permis), ou curseur de pagination émis pour un autre tri ou d’autres filtres.
401API_KEY_MISSINGAPI_KEY_INVALIDAPI_KEY_REVOKEDAPI_KEY_EXPIRED
Jeton absent, invalide, révoqué ou expiré.
403API_KEY_WRONG_PERIMETERAPI_INSUFFICIENT_SCOPEAPI_ORIGIN_NOT_ALLOWEDAPI_TENANT_MISMATCHAPI_TENANT_INACTIVEAPI_MODULE_UNAVAILABLEAPI_FEATURE_UNAVAILABLE
Jeton valide mais insuffisant : mauvais périmètre, scope manquant, origine refusée, abonnement inactif ou module / option non inclus dans le plan.
404NOT_FOUND
Ressource absente — ou appartenant à un autre espace, ce qui revient au même.
409CONFLICTIDEMPOTENCY_IN_PROGRESS
Conflit : valeur unique déjà prise, ou même clé d’idempotence encore en cours.
422BUSINESS_RULE_VIOLATIONIDEMPOTENCY_KEY_REUSED
Requête bien formée mais refusée par une règle de gestion de l’ERP (transition de statut interdite, pièce réglée verrouillée, stock…), ou clé d’idempotence réutilisée.
429API_RATE_LIMITEDAPI_AUTH_BLOCKED
Quota du jeton ou de l’espace atteint (voir Retry-After), ou adresse bloquée.
500INTERNAL_ERROR
Erreur inattendue. Citez requestId au support.
503SERVICE_UNAVAILABLE
Indisponibilité temporaire (voir Retry-After). Aucun détail d’infrastructure.
# Une clé par opération, réutilisée telle quelle à chaque nouvel essai.
curl -X POST 'https://quosuite.com/api/public/v1/quoshop/orders/1c5f6225-fd1a-4972-8a9d-b546c2158aed/payments' \
-H "Authorization: Bearer $QUOSHOP_API_KEY" \
-H 'Idempotency-Key: 3f1c2a9e-5b7d-4e8a-9c1f-2d6b8e4a7c30' \
-H 'Content-Type: application/json' \
-d '{
"reference": "pi_3QxYz",
"amount": 245
}'{
"success": true,
"data": {
"id": "4d5be26d-7215-4ca2-8d6a-d2caf7cb2b25",
"number": "WEB-2026-000042",
"channel": "STOREFRONT",
"externalSource": "woocommerce",
"externalId": "10293",
"status": "NEW",
"statusLabel": "Confirmée",
"paymentStatus": "PENDING",
"paymentStatusLabel": "Payée",
"currency": "TND",
"locale": "fr",
"customer": {
"id": "b8d9d661-908c-4f9a-8102-7062468ebf9d",
"email": "client@exemple.tn",
"name": "Sarra Ben Ali",
"phone": null
},
"shippingAddress": {
"fullName": null,
"line1": "12 rue de la Liberté",
"line2": null,
"postalCode": "1002",
"city": "Tunis",
"country": "TN",
"notes": null
},
"billingAddress": {
"fullName": null,
"line1": "12 rue de la Liberté",
"line2": null,
"postalCode": "1002",
"city": "Tunis",
"country": "TN",
"notes": null
},
"delivery": {
"methodId": "a1bf3148-0209-4730-8b6d-9431e00e4125",
"code": "STANDARD",
"label": "Livraison standard"
},
"payment": {
"method": "CARD",
"label": "Carte bancaire",
"reference": "pi_3QxYz"
},
"totals": {
"items": 238,
"shipping": 7,
"discount": 0,
"totalExclTax": 207,
"tax": 38,
"total": 245,
"paid": 245,
"due": 0
},
"lines": [
{
"productId": "fb9cb358-8d6c-4602-8818-1c6d44d2c349",
"sku": "ART-0042",
"title": "Chaise en chêne massif",
"quantity": 2,
"unitPrice": 119,
"unitPriceExclTax": 100,
"vatRate": 19,
"totalExclTax": 200,
"tax": 38,
"total": 238
}
],
"erp": {
"posted": true,
"postedAt": "2026-10-02T09:15:00.000Z",
"salesDocument": {
"type": "COMMANDE_VENTE",
"typeLabel": "Facture",
"number": "FAC-2026-00042"
},
"invoiceNumber": "FAC-2026-00042",
"creditNoteNumber": null,
"stockApplied": true,
"lastError": null
},
"note": null,
"cancelReason": null,
"placedAt": "2026-10-02T09:15:00.000Z",
"confirmedAt": "2026-10-02T09:15:00.000Z",
"preparedAt": "2026-10-02T09:15:00.000Z",
"shippedAt": "2026-10-02T09:15:00.000Z",
"deliveredAt": "2026-10-02T09:15:00.000Z",
"cancelledAt": "2026-10-02T09:15:00.000Z",
"updatedAt": "2026-10-02T09:15:00.000Z"
},
"timestamp": "2026-10-02T09:15:00.000Z"
}Faire avancer une commande (confirmation, préparation, expédition, livraison, annulation) #
/api/public/v1/quoshop/orders/{order}/statusorders:writeupdateOrderStatusPour un système externe qui gère la préparation et l’expédition. L’avancement suit la table de transitions de la boutique (NEW → CONFIRMED → PREPARED → SHIPPED → DELIVERED ; annulation tant que rien n’est parti) — une transition interdite répond 422. Les effets ERP sont ceux du back-office : confirmer porte en gestion, expédier sort le stock et facture si la boutique facture à l’expédition, annuler annule les pièces et remet le stock sorti. Demander l’étape où la commande se trouve déjà ne change rien.
المعاملات
orderstringالمسارإلزاميIdentifiant (UUID) ou numéro (
WEB-2026-000042) de la commande.X-QuoShop-StorestringترويسةBoutique visée : identifiant (UUID) ou slug. Facultatif quand l’espace n’en tient qu’une. Boutique absente de l’espace (404), suspendue (403), ou non désignée alors que l’espace en tient plusieurs (400,
detail.stores).
جسم الطلب application/json
statusstringإلزاميÉtape suivante.
CONFIRMEDporte la commande en gestion ;SHIPPEDsort la marchandise et facture si la boutique facture à l’expédition ;CANCELLED(avant expédition) annule les pièces et remet le stock sorti.القيمCONFIRMEDPREPAREDSHIPPEDDELIVEREDCANCELLEDreasonstringMotif (annulation).
notifyCustomerbooleanEnvoyer à l’acheteur l’avis d’étape de la boutique.
افتراضيfalse
الاستجابة 200application/json
Succès.
idstring (uuid)إلزاميnumberstringإلزاميNuméro communiqué au client.
مثالWEB-2026-000042channelstringإلزاميPassée sur la vitrine, ou créée par un système externe.
القيمSTOREFRONTAPIexternalSourcestring | nullمثالwoocommerceexternalIdstring | nullمثال10293statusstringإلزاميالقيمNEWCONFIRMEDPREPAREDSHIPPEDDELIVEREDCANCELLEDstatusLabelstringإلزاميمثالConfirméepaymentStatusstringإلزاميالقيمPENDINGAUTHORIZEDPAIDPARTIALLY_REFUNDEDREFUNDEDFAILEDpaymentStatusLabelstringإلزاميمثالPayéecurrencystringإلزاميDevise de la boutique.
مثالTNDlocalestring | nullمثالfrcustomerOrderCustomerDtoإلزاميتفاصيل OrderCustomerDto
shippingAddressOrderAddressDto | nullتفاصيل OrderAddressDto
billingAddressOrderAddressDto | nullتفاصيل OrderAddressDto
deliveryOrderDeliveryDtoإلزاميتفاصيل OrderDeliveryDto
paymentOrderPaymentInfoDtoإلزاميتفاصيل OrderPaymentInfoDto
totalsOrderTotalsDtoإلزاميتفاصيل OrderTotalsDto
linesOrderLineDto[]إلزاميتفاصيل OrderLineDto
erpOrderErpDtoإلزاميتفاصيل OrderErpDto
notestring | nullcancelReasonstring | nullplacedAtstringإلزاميconfirmedAtstring | nullpreparedAtstring | nullshippedAtstring | nulldeliveredAtstring | nullcancelledAtstring | nullupdatedAtstringإلزامي
الأخطاء
400VALIDATION_FAILEDIDEMPOTENCY_KEY_INVALIDINVALID_CURSOR
Paramètre ou corps invalide (champ manquant, inconnu, mal typé, tri non permis), ou curseur de pagination émis pour un autre tri ou d’autres filtres.
401API_KEY_MISSINGAPI_KEY_INVALIDAPI_KEY_REVOKEDAPI_KEY_EXPIRED
Jeton absent, invalide, révoqué ou expiré.
403API_KEY_WRONG_PERIMETERAPI_INSUFFICIENT_SCOPEAPI_ORIGIN_NOT_ALLOWEDAPI_TENANT_MISMATCHAPI_TENANT_INACTIVEAPI_MODULE_UNAVAILABLEAPI_FEATURE_UNAVAILABLE
Jeton valide mais insuffisant : mauvais périmètre, scope manquant, origine refusée, abonnement inactif ou module / option non inclus dans le plan.
404NOT_FOUND
Ressource absente — ou appartenant à un autre espace, ce qui revient au même.
409CONFLICTIDEMPOTENCY_IN_PROGRESS
Conflit : valeur unique déjà prise, ou même clé d’idempotence encore en cours.
422BUSINESS_RULE_VIOLATIONIDEMPOTENCY_KEY_REUSED
Requête bien formée mais refusée par une règle de gestion de l’ERP (transition de statut interdite, pièce réglée verrouillée, stock…), ou clé d’idempotence réutilisée.
429API_RATE_LIMITEDAPI_AUTH_BLOCKED
Quota du jeton ou de l’espace atteint (voir Retry-After), ou adresse bloquée.
500INTERNAL_ERROR
Erreur inattendue. Citez requestId au support.
503SERVICE_UNAVAILABLE
Indisponibilité temporaire (voir Retry-After). Aucun détail d’infrastructure.
curl -X POST 'https://quosuite.com/api/public/v1/quoshop/orders/1c5f6225-fd1a-4972-8a9d-b546c2158aed/status' \
-H "Authorization: Bearer $QUOSHOP_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"status": "CONFIRMED"
}'{
"success": true,
"data": {
"id": "4d5be26d-7215-4ca2-8d6a-d2caf7cb2b25",
"number": "WEB-2026-000042",
"channel": "STOREFRONT",
"externalSource": "woocommerce",
"externalId": "10293",
"status": "NEW",
"statusLabel": "Confirmée",
"paymentStatus": "PENDING",
"paymentStatusLabel": "Payée",
"currency": "TND",
"locale": "fr",
"customer": {
"id": "b8d9d661-908c-4f9a-8102-7062468ebf9d",
"email": "client@exemple.tn",
"name": "Sarra Ben Ali",
"phone": null
},
"shippingAddress": {
"fullName": null,
"line1": "12 rue de la Liberté",
"line2": null,
"postalCode": "1002",
"city": "Tunis",
"country": "TN",
"notes": null
},
"billingAddress": {
"fullName": null,
"line1": "12 rue de la Liberté",
"line2": null,
"postalCode": "1002",
"city": "Tunis",
"country": "TN",
"notes": null
},
"delivery": {
"methodId": "a1bf3148-0209-4730-8b6d-9431e00e4125",
"code": "STANDARD",
"label": "Livraison standard"
},
"payment": {
"method": "CARD",
"label": "Carte bancaire",
"reference": "pi_3QxYz"
},
"totals": {
"items": 238,
"shipping": 7,
"discount": 0,
"totalExclTax": 207,
"tax": 38,
"total": 245,
"paid": 245,
"due": 0
},
"lines": [
{
"productId": "fb9cb358-8d6c-4602-8818-1c6d44d2c349",
"sku": "ART-0042",
"title": "Chaise en chêne massif",
"quantity": 2,
"unitPrice": 119,
"unitPriceExclTax": 100,
"vatRate": 19,
"totalExclTax": 200,
"tax": 38,
"total": 238
}
],
"erp": {
"posted": true,
"postedAt": "2026-10-02T09:15:00.000Z",
"salesDocument": {
"type": "COMMANDE_VENTE",
"typeLabel": "Facture",
"number": "FAC-2026-00042"
},
"invoiceNumber": "FAC-2026-00042",
"creditNoteNumber": null,
"stockApplied": true,
"lastError": null
},
"note": null,
"cancelReason": null,
"placedAt": "2026-10-02T09:15:00.000Z",
"confirmedAt": "2026-10-02T09:15:00.000Z",
"preparedAt": "2026-10-02T09:15:00.000Z",
"shippedAt": "2026-10-02T09:15:00.000Z",
"deliveredAt": "2026-10-02T09:15:00.000Z",
"cancelledAt": "2026-10-02T09:15:00.000Z",
"updatedAt": "2026-10-02T09:15:00.000Z"
},
"timestamp": "2026-10-02T09:15:00.000Z"
}مولَّدة من عقد OpenAPI لـ QuoShop API الإصدار 1.0.0.