Skip to main content

getOrderByMarker

Get one order storage object by marker. 🔐 This method requires authorization.

Description

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

Orders.getOrderByMarker(

marker, langCode

);

Parameters schema

Schema

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

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

Examples

Minimal example

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

Example with attributes

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

Example response

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

Response schema

Schema: IOrdersEntity

id: number
Object identifier.
example: 1

localizeInfos: ILocalizeInfo
Name considering localization.
example:

{
"title": "Cash"
}

position: number | null
Position in orders storage.
example: 1

identifier: string
Textual identifier for the record field.
example: "order_storage_1"

formIdentifier: string
Textual identifier for the form used by the order storage.
example: "bar-orders-form"

generalTypeId: number | null
Type identifier.
example: 1

paymentAccountIdentifiers: IPaymentAccountIdentifiers[]
Array of textual identifiers of payment accounts used by the order storage.
example:

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