getOrderByMarkerAndId
Récupérer une commande par marqueur et identifiant à partir de l'objet de stockage des commandes créé par l'utilisateur. 🔐 Cette méthode nécessite l'autorisation.
Description
Cette méthode récupère un objet de stockage de commande par marqueur et identifiant. Elle renvoie une promesse qui se résout en un objet IOrderByMarkerEntity.
Commandes.getOrderByMarkerAndId(
marker*,
id*,
langCode
);
Schéma des paramètres
Schéma
marker(obligatoire): string
L'identifiant textuel de l'objet de stockage de commande
exemple : "order_storage_1"
id(obligatoire): number
ID de l'objet de commande
exemple : 12345
langCode: string
Code de langue. Par défaut : "en_US"
exemple : "en_US"
Exemples
Exemple minimal
const response = await Orders.getOrderByMarkerAndId('my-order', 1764);
Exemple avec des attributs
const response = await Orders.getOrderByMarkerAndId('my-order', 1764, 'en_US');
Exemple de réponse
{
"id": 205,
"storageId": 1,
"createdDate": "2025-07-18T05:51:09.924Z",
"statusIdentifier": "inProgress",
"statusLocalizeInfos": {
"title": "In progress"
},
"formIdentifier": "orderForm",
"formData": [
{
"marker": "order_name",
"type": "string",
"value": "Ivan"
}
],
"attributeSetIdentifier": "order_form",
"paymentStrategy": "once",
"totalSum": "51",
"totalSumRaw": "51",
"currency": "usd",
"paymentAccountIdentifier": "stripe",
"paymentAccountLocalizeInfos": {
"title": "Stripe"
},
"products": [
{
"id": 2954,
"title": "Box",
"sku": null,
"previewImage": null,
"price": 51,
"quantity": 1,
"isGift": false
}
],
"paymentUrl": "https://checkout.stripe.com/c/pay/cs_test_a19RuP9hh4gGmaSOQwb57OBpnypIifa0FDnGhYe7od5XkRXRUpYXUKDRtm#fidnandhYHdWcXxpYCc%2FJ2FgY2RwaXEnKSd2cXdsdWBEZmZqcGtxJz8nZGZmcVo0VHJuTndEZlZqS2YybGBzJyknZHVsTmB8Jz8ndW5acWB2cVowNEtDcERXRG9vaE89NUZTa2tDan1AdkJNaHN2YnE2Tmw8YE5zVUJCb1ZTYXBkQEBgSXNkZ3JTVj1UbmZDUTVVTXA0cH1CMkZXXDVfUUM0YUJRQTVLTGZPbjU1d0tkcmFoNV8nKSdjd2poVmB3c2B3Jz9xd3BgKSdnZGZuYndqcGthRmppancnPycmY2NjY2NjJyknaWR8anBxUXx1YCc%2FJ3Zsa2JpYFpscWBoJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl",
"discountConfig": {
"orderDiscounts": [],
"productDiscounts": [],
"coupon": null,
"settings": {
"allowStacking": false,
"maxDiscountValue": null,
"allowGiftStacking": false
},
"additionalDiscountsMarkers": [],
"totalRaw": 51,
"totalSumWithDiscount": 51,
"excludedGiftProductIds": [],
"bonus": null,
"bonusApplied": 0,
"totalDue": 51
},
"isPartial": false,
"isCompleted": false,
"split": {
"completed": false,
"partial": false,
"stages": [
{
"marker": "default",
"sessionId": null,
"productId": 2954,
"title": "Default",
"value": 51,
"status": "planned"
}
]
}
}
Schéma de réponse
Schéma : IOrderByMarkerEntity
id: number
Identifiant de l'objet.
exemple : 125
storageId: number
Identifiant de l'objet de stockage de commande.
exemple : 1
createdDate: string
Date à laquelle la commande a été créée.
exemple : "2023-10-01T12:00:00Z"
statusIdentifier: string
Identifiant textuel du statut de la commande.
exemple : "order-status-1"
formIdentifier: string
Identifiant textuel du formulaire.
exemple : "bar-orders-form"
formData: IOrdersFormData[]
Données soumises par le formulaire lié au stockage de commande.
exemple :
[
{
"marker": "order_name",
"value": "Ivan",
"type": "string"
}
]
formData.marker: string
Marqueur du champ de formulaire.
exemple : "name_1"
formData.type: string
Type de valeur.
exemple : "string"
formData.value: string
Valeur.
exemple : "Nom"
attributeSetIdentifier: string | null
Identifiant textuel de l'ensemble d'attributs.
exemple : "attribute-set-1"
totalSum: string
Montant total de la commande.
exemple : "100.00"
currency: string
Devise utilisée pour le paiement de la commande.
exemple : "USD"
paymentAccountIdentifier: string | null
Identifiant textuel pour le paiement de la commande.
exemple : "payment-1"
paymentAccountLocalizeInfos: ILocalizeInfo
Nom du compte de paiement en tenant compte de la localisation.
exemple :
{
"title": "Cash"
}
products: IOrderProducts[]
Tableau de produits ajoutés à la commande.
exemple :
[
{
"id": 1,
"name": "Product 1",
"quantity": 2
}
]
products.id: number
ID du produit.
exemple : 2957
products.quantity: number
Quantité de produit.
exemple : 1
products.title: string
Titre du produit.
exemple : "Cosmo"
products.sku: string | null
SKU du produit.
exemple : "SKU"
products.previewImage: IPicture | null
Image de prévisualisation du produit.
exemple :
{
"filename": "image.jpg",
"downloadLink": "https://example.com/image.jpg",
"size": 102400,
"previewLink": "https://example.com/image-preview.jpg"
}
previewImage.filename: string
Le nom du fichier.
exemple : "image.jpg"
previewImage.downloadLink: string
Le lien URL pour télécharger l'image.
exemple : "https://example.com/image.jpg"
previewImage.size: number
La taille de l'image en octets.
exemple : 102400
previewImage.previewLink: string
Le lien URL pour prévisualiser l'image.
exemple : "https://example.com/image-preview.jpg"
products.price: number
Prix du produit.
exemple : 150
products.isGift: boolean
Indique si le produit est un cadeau.
exemple : false
paymentUrl: string | null
Lien de paiement.
exemple : "https://example.com/pay/123"
isCompleted: boolean | null
Indique que la commande a été complétée.
exemple : true
statusLocalizeInfos: ILocalizeInfo
Nom du statut localisé.