Skip to main content

getOrderByMarkerAndId

Getting one order by marker and id from the order storage object created by the user. 🔐 This method requires authorization.

Description

This method retrieves one order storage object by marker and id. It returns a Promise that resolves to an IOrderByMarkerEntity object.

Orders.getOrderByMarkerAndId(

marker*, id*, langCode

);

Parameters schema

Schema

marker(required): string
The text identifier of the order storage object
example: "order_storage_1"

id(required): number
ID of the order object
example: 12345

langCode: string
Language code. Default: "en_US"
example: "en_US"

Examples

Minimal example

const response = await Orders.getOrderByMarkerAndId('my-order', 1764);

Example with attributes

const response = await Orders.getOrderByMarkerAndId('my-order', 1764, 'en_US');

Example response

{
"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"
}
]
}
}

Response schema

Schema: IOrderByMarkerEntity

id: number
Object identifier.
example: 125

storageId: number
Identifier of the order storage object.
example: 1

createdDate: string
Date when the order was created.
example: "2023-10-01T12:00:00Z"

statusIdentifier: string
Text identifier of the order status.
example: "order-status-1"

formIdentifier: string
Text identifier of the form.
example: "bar-orders-form"

formData: IOrdersFormData[]
Data submitted by the form linked to the order store.
example:

[
{
"marker": "order_name",
"value": "Ivan",
"type": "string"
}
]

formData.marker: string
Marker of form field.
example: "name_1"

formData.type: string
Type of value.
example: "string"

formData.value: string
Value.
example: "Name"

attributeSetIdentifier: string | null
Text identifier of the attribute set.
example: "attribute-set-1"

totalSum: string
Total order amount.
example: "100.00"

totalSumRaw: string
Raw total order amount with full precision.
example: "100.00"

currency: string
Currency used to pay for the order.
example: "USD"

paymentAccountIdentifier: string | null
Textual identifier for the order payment.
example: "payment-1"

paymentAccountLocalizeInfos: ILocalizeInfo
Payment account name considering localization.
example:

{
"title": "Cash"
}

products: IOrderProducts[]
Array of products added to order.
example:

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

products.id: number
Product id.
example: 2957

products.quantity: number
Product quantity.
example: 1

products.title: string
Product title.
example: "Cosmo"

products.sku: string | null
Product sku.
example: "SKU"

products.previewImage: IPicture | null
Product previewImage.
example:

{
"filename": "image.jpg",
"downloadLink": "https://example.com/image.jpg",
"size": 102400,
"previewLink": "https://example.com/image-preview.jpg"
}

products.price: number
Product price.
example: 150

products.isGift: boolean
Whether the product is a gift.
example: false

paymentUrl: string | null
Payment link.
example: "https://example.com/pay/123"

isCompleted: boolean | null
Indicates that the order has been completed.
example: true

isPartial: boolean | null
Indicates that the order is partially paid; null on older orders where it was not tracked.
example: false

paymentStrategy: string
Payment strategy of the order.
example: "once"

statusLocalizeInfos: ILocalizeInfo
Localized status name.

discountConfig: IOrderDiscountConfig | null
Resolved discount configuration applied to the order (orderDiscounts, productDiscounts, coupon, settings, bonus, totals); null on older orders without a resolved discount config.

discountConfig.bonus: IOrderDiscountBonus | null
Bonus calculation result, null when bonuses are not used, or omitted entirely when the order has no bonus context.

discountConfig.coupon: unknown | null
Resolved coupon, or null when no coupon is applied.

discountConfig.orderDiscounts: unknown[]
Order-level discounts that were matched and applied.

discountConfig.productDiscounts: unknown[]
Product-level discounts that were matched and applied.

discountConfig.settings: IOrderDiscountSettings
Stacking and cap settings used during calculation.

discountConfig.additionalDiscountsMarkers: string[]
Markers of extra discounts requested by the client (omitted in preview responses).

discountConfig.bonusApplied: number
Bonus amount applied to the order (omitted in preview responses).
example: 0

discountConfig.excludedGiftProductIds: string[]
Product ids excluded from gift selection (omitted in preview responses).

discountConfig.totalDue: number
Total amount due after discounts and bonuses (omitted in preview responses).
example: 300

discountConfig.totalRaw: number
Total amount before discounts (omitted in preview responses).
example: 300

discountConfig.totalSumWithDiscount: number
Total amount after discounts but before bonuses (omitted in preview responses).
example: 300

split: IOrderSplit
Split (staged) payment configuration; present on the by-id order endpoint.

split.completed: boolean
Whether all split stages are completed.
example: false

split.partial: boolean
Whether the split is partially paid.
example: false

split.stages: IOrderSplitStage[]
Ordered list of split payment stages.


Usage examples

Step-by-step walkthrough in the documentation:

  • PDF receipt — fetch a placed order by marker and id, then generate a PDF receipt from it.

Try it live

Run this method interactively in the JS SDK sandbox — connect your Project URL and App Token on first visit, then open:

  • PDF receipt — fetch a placed order by marker and id, then generate a PDF receipt from it.