Aller au contenu principal

getAllOrdersByMarker

Récupération de toutes les commandes à partir de l'objet de stockage des commandes créé par l'utilisateur. 🔐 Cette méthode nécessite une autorisation.

Description

Cette méthode récupère toutes les commandes du stockage de commandes spécifié par son marqueur, avec pagination. Elle renvoie une promesse qui se résout en un objet IOrdersByMarkerEntity contenant les commandes paginées.

Orders.getAllOrdersByMarker(

marker*, langCode, offset, limit

);

Schéma des paramètres

Schéma

marker(obligatoire) : string
Identifiant textuel de l'objet de stockage des commandes
exemple : "order_storage_1"

langCode : string
Code de langue. Par défaut : "en_US"
exemple : "en_US"

offset : number
Paramètre d'offset. Par défaut : 0
exemple : 0

limit : number
Paramètre de limite. Par défaut : 30
exemple : 30

Par défaut, vous pouvez récupérer 10 objets. Cela est dû à la limite d'enregistrement dans les paramètres de permissions du module.
Pour que la pagination fonctionne correctement, vous devez configurer les Permissions du module selon vos besoins dans la section correspondante.

Essayez-le en direct

Exécutez cette méthode de manière interactive dans le bac à sable JS SDK — connectez votre URL de projet et votre jeton d'application lors de votre première visite, puis ouvrez :


Exemples

Exemple minimal

const response = await Orders.getAllOrdersByMarker('my-order');

Exemple avec des attributs

const response = await Orders.getAllOrdersByMarker('my-order', 'en_US', 0, 30);

Exemple de réponse

{
"items": [
{
"id": 565,
"storageId": 1,
"createdDate": "2026-04-21T19:25:24.570Z",
"statusIdentifier": "inProgress",
"statusLocalizeInfos": {
"title": "In progress"
},
"formIdentifier": "orderForm",
"formData": [
{
"marker": "order_name",
"value": "Ivan",
"type": "string"
}
],
"attributeSetIdentifier": "order_form",
"paymentStrategy": "once",
"totalSum": "285",
"totalSumRaw": "300",
"currency": "",
"paymentAccountIdentifier": "cash",
"paymentAccountLocalizeInfos": {
"title": "Cash"
},
"products": [
{
"id": 2957,
"title": "Cosmo",
"sku": null,
"previewImage": null,
"price": 150,
"quantity": 2,
"isGift": false
}
],
"paymentUrl": null,
"discountConfig": {
"orderDiscounts": [
{
"id": 2,
"identifier": "personal_discount",
"type": "PERSONAL_DISCOUNT",
"localizeInfos": {
"title": "Personal discount"
},
"startDate": "2026-04-21T18:26:19.815Z",
"endDate": "2028-03-21T19:26:24.741Z",
"discountValue": {
"value": 15,
"maxAmount": null,
"discountType": "FIXED_AMOUNT",
"applicability": "TO_ORDER"
},
"exclusions": null,
"position": 1,
"conditionLogic": "AND",
"gifts": [],
"userGroups": null,
"userExclusions": null,
"conditions": [],
"coupon": null
}
],
"productDiscounts": [],
"coupon": null,
"settings": {
"allowStacking": true,
"maxDiscountValue": 50,
"allowGiftStacking": false,
"maxBonusPaymentPercent": null,
"minBonusAmount": null,
"minOrderAmountForBonus": null,
"giftRefundPolicy": "KEEP_GIFT"
},
"additionalDiscountsMarkers": [],
"totalRaw": 300,
"totalSumWithDiscount": 285,
"excludedGiftProductIds": [],
"bonus": {
"availableBalance": 0,
"maxBonusDiscount": 0,
"minBonusAmount": null,
"minOrderAmountForBonus": null,
"bonusApplied": 0
},
"bonusApplied": 0,
"totalDue": 285
},
"isPartial": false,
"isCompleted": null
},
{
"id": 564,
"storageId": 1,
"createdDate": "2026-04-21T19:23:38.644Z",
"statusIdentifier": "inProgress",
"statusLocalizeInfos": {
"title": "In progress"
},
"formIdentifier": "orderForm",
"formData": [
{
"marker": "order_name",
"value": "Ivan",
"type": "string"
}
],
"attributeSetIdentifier": "order_form",
"paymentStrategy": "once",
"totalSum": "285",
"totalSumRaw": "300",
"currency": "",
"paymentAccountIdentifier": "cash",
"paymentAccountLocalizeInfos": {
"title": "Cash"
},
"products": [
{
"id": 2957,
"title": "Cosmo",
"sku": null,
"previewImage": null,
"price": 150,
"quantity": 2,
"isGift": false
}
],
"paymentUrl": null,
"discountConfig": {
"orderDiscounts": [
{
"id": 2,
"identifier": "personal_discount",
"type": "PERSONAL_DISCOUNT",
"localizeInfos": {
"title": "Personal discount"
},
"startDate": "2026-04-21T18:26:19.815Z",
"endDate": "2028-03-21T19:26:24.741Z",
"discountValue": {
"value": 15,
"maxAmount": null,
"discountType": "FIXED_AMOUNT",
"applicability": "TO_ORDER"
},
"exclusions": null,
"position": 1,
"conditionLogic": "AND",
"gifts": [],
"userGroups": null,
"userExclusions": null,
"conditions": [],
"coupon": null
}
],
"productDiscounts": [],
"coupon": null,
"settings": {
"allowStacking": true,
"maxDiscountValue": 50,
"allowGiftStacking": false,
"maxBonusPaymentPercent": null,
"minBonusAmount": null,
"minOrderAmountForBonus": null,
"giftRefundPolicy": "KEEP_GIFT"
},
"additionalDiscountsMarkers": [],
"totalRaw": 300,
"totalSumWithDiscount": 285,
"excludedGiftProductIds": [],
"bonus": {
"availableBalance": 0,
"maxBonusDiscount": 0,
"minBonusAmount": null,
"minOrderAmountForBonus": null,
"bonusApplied": 0
},
"bonusApplied": 0,
"totalDue": 285
},
"isPartial": false,
"isCompleted": null
},
{
"id": 563,
"storageId": 1,
"createdDate": "2026-04-21T19:22:56.768Z",
"statusIdentifier": "inProgress",
"statusLocalizeInfos": {
"title": "In progress"
},
"formIdentifier": "orderForm",
"formData": [
{
"marker": "order_name",
"value": "Ivan",
"type": "string"
}
],
"attributeSetIdentifier": "order_form",
"paymentStrategy": "once",
"totalSum": "285",
"totalSumRaw": "300",
"currency": "",
"paymentAccountIdentifier": "cash",
"paymentAccountLocalizeInfos": {
"title": "Cash"
},
"products": [
{
"id": 2957,
"title": "Cosmo",
"sku": null,
"previewImage": null,
"price": 150,
"quantity": 2,
"isGift": false
}
],
"paymentUrl": null,
"discountConfig": {
"orderDiscounts": [
{
"id": 2,
"identifier": "personal_discount",
"type": "PERSONAL_DISCOUNT",
"localizeInfos": {
"title": "Personal discount"
},
"startDate": "2026-04-21T18:26:19.815Z",
"endDate": "2028-03-21T19:26:24.741Z",
"discountValue": {
"value": 15,
"maxAmount": null,
"discountType": "FIXED_AMOUNT",
"applicability": "TO_ORDER"
},
"exclusions": null,
"position": 1,
"conditionLogic": "AND",
"gifts": [],
"userGroups": null,
"userExclusions": null,
"conditions": [],
"coupon": null
}
],
"productDiscounts": [],
"coupon": null,
"settings": {
"allowStacking": true,
"maxDiscountValue": 50,
"allowGiftStacking": false,
"maxBonusPaymentPercent": null,
"minBonusAmount": null,
"minOrderAmountForBonus": null,
"giftRefundPolicy": "KEEP_GIFT"
},
"additionalDiscountsMarkers": [],
"totalRaw": 300,
"totalSumWithDiscount": 285,
"excludedGiftProductIds": [],
"bonus": {
"availableBalance": 0,
"maxBonusDiscount": 0,
"minBonusAmount": null,
"minOrderAmountForBonus": null,
"bonusApplied": 0
},
"bonusApplied": 0,
"totalDue": 285
},
"isPartial": false,
"isCompleted": null
},
"..."
],
"total": 371
}

Schéma de réponse

Schéma : IOrdersByMarkerEntity

items : IOrderByMarkerEntity[]
Tableau d'objets de stockage des commandes.
exemple :

[
{
"id": 55,
"storageId": 1,
"createdDate": "2025-03-22T21:12:42.371Z",
"statusIdentifier": "inProgress",
"formIdentifier": "orderForm",
"formData": [
{
"marker": "order_name",
"value": "Ivan",
"type": "string"
}
],
"attributeSetIdentifier": "order_form",
"totalSum": "300.00",
"currency": "",
"paymentAccountIdentifier": "cash",
"paymentAccountLocalizeInfos": {
"title": "Cash"
},
"products": [
{
"id": 2957,
"title": "Cosmo",
"sku": null,
"previewImage": null,
"price": 150,
"quantity": 2
}
],
"isCompleted": false
}
]

items.id : number
Identifiant de l'objet.
exemple : 125

items.storageId : number
Identifiant de l'objet de stockage des commandes.
exemple : 1

items.createdDate : string
Date à laquelle la commande a été créée.
exemple : "2023-10-01T12:00:00Z"

items.statusIdentifier : string
Identifiant textuel du statut de la commande.
exemple : "order-status-1"

items.formIdentifier : string
Identifiant textuel du formulaire.
exemple : "bar-orders-form"

items.formData : IOrdersFormData[]
Données soumises par le formulaire lié au stockage de commandes.
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"

items.attributeSetIdentifier : string | null
Identifiant textuel de l'ensemble d'attributs.
exemple : "attribute-set-1"

items.totalSum : string
Montant total de la commande.
exemple : "100.00"

items.currency : string
Devise utilisée pour payer la commande.
exemple : "USD"

items.paymentAccountIdentifier : string | null
Identifiant textuel pour le paiement de la commande.
exemple : "payment-1"

items.paymentAccountLocalizeInfos : ILocalizeInfo
Nom du compte de paiement tenant compte de la localisation.
exemple :

{
"title": "Cash"
}

items.products : IOrderProducts[]
Tableau de produits ajoutés à la commande.
exemple :

[
{
"id": 1,
"name": "Product 1",
"quantity": 2
}
]

products.id : number
Identifiant 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
L'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
L'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

items.paymentUrl : string | null
Lien de paiement.
exemple : "https://example.com/pay/123"

items.isCompleted : boolean | null
Indique que la commande a été complétée.
exemple : true

items.statusLocalizeInfos : ILocalizeInfo
Nom du statut localisé.

total : number
Nombre total d'enregistrements trouvés.
exemple : 100