getAllOrdersByMarker
Obteniendo todas las órdenes del objeto de almacenamiento de órdenes creado por el usuario. 🔐 Este método requiere autorización.
Descripción
Este método obtiene todos los objetos de almacenamiento de órdenes por marcador. El método añadirá el idioma predeterminado al cuerpo de la solicitud. Si deseas cambiar el idioma, simplemente pásalo como segundo argumento. Devuelve una Promesa que se resuelve en un objeto IOrdersByMarkerEntity.
Órdenes.getAllOrdersByMarker(
marker*,
langCode,
offset,
limit
);
Esquema de parámetros
Esquema
marker(requerido): string
Identificador textual del objeto de almacenamiento de órdenes
ejemplo: "order_storage_1"
langCode: string
Código de idioma. Predeterminado: "en_US"
ejemplo: "en_US"
offset: number
Parámetro de desplazamiento. Predeterminado: 0
ejemplo: 0
limit: number
Parámetro de límite. Predeterminado: 30
ejemplo: 30
Por defecto, puedes recuperar 10 objetos. Esto se debe al límite de registros en la configuración de permisos del módulo.
Para que la paginación funcione correctamente, necesitas configurar Permisos del módulo de acuerdo a tus necesidades en la sección correspondiente.
Ejemplos
Ejemplo mínimo
const response = await Orders.getAllOrdersByMarker('my-order');
Ejemplo con atributos
const response = await Orders.getAllOrdersByMarker('my-order', 'en_US', 0, 30);
Ejemplo de respuesta
{
"items": [
{
"id": 551,
"storageId": 1,
"createdDate": "2026-04-15T14:20:29.645Z",
"statusIdentifier": "inProgress",
"statusLocalizeInfos": {
"title": "In progress"
},
"formIdentifier": "orderForm",
"formData": [
{
"marker": "order_name",
"value": "Ivan",
"type": "string"
}
],
"attributeSetIdentifier": "order_form",
"paymentStrategy": "once",
"totalSum": "300",
"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": [],
"productDiscounts": [],
"coupon": null,
"settings": {
"allowStacking": false,
"maxDiscountValue": null,
"allowGiftStacking": false,
"maxBonusPaymentPercent": null,
"minBonusAmount": null,
"minOrderAmountForBonus": null,
"giftRefundPolicy": "KEEP_GIFT"
},
"additionalDiscountsMarkers": [],
"totalRaw": 300,
"totalSumWithDiscount": 300,
"excludedGiftProductIds": [],
"bonus": {
"availableBalance": 0,
"maxBonusDiscount": 0,
"minBonusAmount": null,
"minOrderAmountForBonus": null,
"bonusApplied": 0
},
"bonusApplied": 0,
"totalDue": 300
},
"isPartial": false,
"isCompleted": null
},
{
"id": 550,
"storageId": 1,
"createdDate": "2026-04-14T14:53:59.484Z",
"statusIdentifier": "inProgress",
"statusLocalizeInfos": {
"title": "In progress"
},
"formIdentifier": "orderForm",
"formData": [
{
"marker": "order_name",
"value": "Ivan",
"type": "string"
}
],
"attributeSetIdentifier": "order_form",
"paymentStrategy": "once",
"totalSum": "300",
"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": [],
"productDiscounts": [],
"coupon": null,
"settings": {
"allowStacking": false,
"maxDiscountValue": null,
"allowGiftStacking": false,
"maxBonusPaymentPercent": null,
"minBonusAmount": null,
"minOrderAmountForBonus": null,
"giftRefundPolicy": "KEEP_GIFT"
},
"additionalDiscountsMarkers": [],
"totalRaw": 300,
"totalSumWithDiscount": 300,
"excludedGiftProductIds": [],
"bonus": {
"availableBalance": 0,
"maxBonusDiscount": 0,
"minBonusAmount": null,
"minOrderAmountForBonus": null,
"bonusApplied": 0
},
"bonusApplied": 0,
"totalDue": 300
},
"isPartial": false,
"isCompleted": null
},
{
"id": 549,
"storageId": 1,
"createdDate": "2026-04-14T13:22:58.354Z",
"statusIdentifier": "inProgress",
"statusLocalizeInfos": {
"title": "In progress"
},
"formIdentifier": "orderForm",
"formData": [
{
"marker": "order_name",
"value": "Ivan",
"type": "string"
}
],
"attributeSetIdentifier": "order_form",
"paymentStrategy": "once",
"totalSum": "300",
"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": [],
"productDiscounts": [],
"coupon": null,
"settings": {
"allowStacking": false,
"maxDiscountValue": null,
"allowGiftStacking": false,
"maxBonusPaymentPercent": null,
"minBonusAmount": null,
"minOrderAmountForBonus": null,
"giftRefundPolicy": "KEEP_GIFT"
},
"additionalDiscountsMarkers": [],
"totalRaw": 300,
"totalSumWithDiscount": 300,
"excludedGiftProductIds": [],
"bonus": {
"availableBalance": 0,
"maxBonusDiscount": 0,
"minBonusAmount": null,
"minOrderAmountForBonus": null,
"bonusApplied": 0
},
"bonusApplied": 0,
"totalDue": 300
},
"isPartial": false,
"isCompleted": null
},
"..."
],
"total": 357
}
Esquema de respuesta
Esquema: IOrdersByMarkerEntity
items: IOrderByMarkerEntity[]
Array de objetos de almacenamiento de órdenes.
ejemplo:
[
{
"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
Identificador del objeto.
ejemplo: 125
items.storageId: number
Identificador del objeto de almacenamiento de órdenes.
ejemplo: 1
items.createdDate: string
Fecha en que se creó la orden.
ejemplo: "2023-10-01T12:00:00Z"
items.statusIdentifier: string
Identificador textual del estado de la orden.
ejemplo: "order-status-1"
items.formIdentifier: string
Identificador textual del formulario.
ejemplo: "bar-orders-form"
items.formData: IOrdersFormData[]
Datos enviados por el formulario vinculado a la tienda de órdenes.
ejemplo:
[
{
"marker": "order_name",
"value": "Ivan",
"type": "string"
}
]
formData.marker: string
Marcador del campo del formulario.
ejemplo: "name_1"
formData.type: string
Tipo de valor.
ejemplo: "string"
formData.value: string
Valor.
ejemplo: "Nombre"
items.attributeSetIdentifier: string | null
Identificador textual del conjunto de atributos.
ejemplo: "attribute-set-1"
items.totalSum: string
Monto total de la orden.
ejemplo: "100.00"
items.currency: string
Moneda utilizada para pagar la orden.
ejemplo: "USD"
items.paymentAccountIdentifier: string | null
Identificador textual para el pago de la orden.
ejemplo: "payment-1"
items.paymentAccountLocalizeInfos: ILocalizeInfo
Nombre de la cuenta de pago considerando la localización.
ejemplo:
{
"title": "Cash"
}
items.products: IOrderProducts[]
Array de productos añadidos a la orden.
ejemplo:
[
{
"id": 1,
"name": "Product 1",
"quantity": 2
}
]
products.id: number
Id del producto.
ejemplo: 2957
products.quantity: number
Cantidad del producto.
ejemplo: 1
products.title: string
Título del producto.
ejemplo: "Cosmo"
products.sku: string | null
SKU del producto.
ejemplo: "SKU"
products.previewImage: IPicture | null
Imagen de vista previa del producto.
ejemplo:
{
"filename": "image.jpg",
"downloadLink": "https://example.com/image.jpg",
"size": 102400,
"previewLink": "https://example.com/image-preview.jpg"
}
previewImage.filename: string
El nombre del archivo.
ejemplo: "image.jpg"
previewImage.downloadLink: string
El enlace URL para descargar la imagen.
ejemplo: "https://example.com/image.jpg"
previewImage.size: number
El tamaño de la imagen en bytes.
ejemplo: 102400
previewImage.previewLink: string
El enlace URL para previsualizar la imagen.
ejemplo: "https://example.com/image-preview.jpg"
products.price: number
Precio del producto.
ejemplo: 150
products.isGift: boolean
Si el producto es un regalo.
ejemplo: false
items.paymentUrl: string | null
Enlace de pago.
ejemplo: "https://example.com/pay/123"
items.isCompleted: boolean | null
Indica que la orden ha sido completada.
ejemplo: true
items.statusLocalizeInfos: ILocalizeInfo
Nombre del estado localizado.
total: number
Número total de registros encontrados.
ejemplo: 100