Skip to main content

getOrdersStorageByMarker

Get an order storage by its marker. 🔐 This method requires authorization.

Description​

Fetches an order storage by its marker. Resolves to an IOrdersEntity.

.getOrdersStorageByMarker(

,

);

Parameters schema​

Schema

marker(required): string
Marker of the order storage.
example: "order_storage_1"

langCode: string
Language code. Default: the langCode passed to defineOneEntry ("en_US" if none).
example: "en_US"

Examples​

Minimal example​

const response = await Orders.getOrdersStorageByMarker('my_order');

Example with langCode​

const response = await Orders.getOrdersStorageByMarker('my_order', 'en_US');

Example response​

{
"id": 1,
"localizeInfos": {
"title": "My order"
},
"position": 1,
"identifier": "my_order",
"formIdentifier": "orderForm",
"generalTypeId": 21,
"paymentAccountIdentifiers": [
{
"identifier": "stripe"
},
{
"identifier": "cash"
},
{
"identifier": "paypal"
}
]
}

Response schema​

Schema: IOrdersEntity

id: number
Object ID.
example: 1

localizeInfos: ILocalizeInfo
Localized name of the order storage.
example:

{
"title": "Cash"
}

position: number | null
Position of the order storage, used for sorting.
example: 1

identifier: string
Marker of the order storage.
example: "order_storage_1"

formIdentifier: string
Marker of the form used by the order storage.
example: "bar-orders-form"

generalTypeId: number | null
ID of the general type.
example: 1

paymentAccountIdentifiers: IPaymentAccountIdentifiers[]
Markers of the payment accounts used by the order storage.
example:

[
{
"identifier": "payment-1"
}
]

paymentAccountIdentifiers.identifier: string
Marker of the payment account.
example: "payment-1"