Skip to main content

getAllStatusesByStorageMarker

Get all order statuses available in an order storage. 🔐 This method requires authorization.

Description​

Fetches the order statuses defined in the storage with the given marker. Resolves to an array of IOrderStatus objects.

.getAllStatusesByStorageMarker(

, , ,

);

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"

offset: number
Number of records to skip. Default: 0. offset + limit must not exceed 200; a larger window is rejected with 400.
example: 0

limit: number
Maximum number of records to return. Default: 30.
example: 30

Examples​

Minimal example​

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

Example with langCode​

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

Example response​

[
{
"id": 9,
"identifier": "completed-payment",
"localizeInfos": {
"title": "Completed"
},
"isDefault": false,
"isCancelFinal": false,
"isFinalSuccess": true,
"axis": "payment",
"position": 1,
"isUsed": false,
"isMapped": true
},
{
"id": 7,
"identifier": "inProgress-payment",
"localizeInfos": {
"title": "In progress"
},
"isDefault": true,
"isCancelFinal": false,
"isFinalSuccess": false,
"axis": "payment",
"position": 2,
"isUsed": true,
"isMapped": true
},
{
"id": 11,
"identifier": "expired-payment",
"localizeInfos": {
"title": "Expired"
},
"isDefault": false,
"isCancelFinal": false,
"isFinalSuccess": false,
"axis": "payment",
"position": 3,
"isUsed": false,
"isMapped": true
}
]

Response schema​

Schema: IOrderStatus[]

id: number
Status ID.
example: 1

localizeInfos: ILocalizeInfo
Localized data of the status.

identifier: string
Marker of the status.
example: "inProgress-payment"

position: number
Position of the status, used for sorting.
example: 1

isUsed: boolean
Whether the status is in use.
example: true

isDefault: boolean
Whether this is the default status.
example: true

axis: string
Status axis (pipeline) the status belongs to.
example: "payment"

isCancelFinal: boolean
Whether the status is a final cancellation status.
example: false

isFinalSuccess: boolean
Whether the status is a final successful status.
example: true

isMapped: boolean
Whether the status is mapped to its axis.
example: true