Skip to main content

getAllOrdersStorage

Get all order storages. 🔐 This method requires authorization.

Description​

Fetches the order storages configured in the project, one page at a time (offset, limit). Resolves to an array of IOrdersEntity objects.

.getAllOrdersStorage(

, ,

);

Parameters schema​

Schema

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

Record limit. If the user group's permission for this method allows only restricted reading, the API returns at most the number of records set in the project settings (10 by default), whatever limit you pass. With full read access, limit works as usual. See Module permissions (opens in a new tab).

Examples​

Minimal example​

const response = await Orders.getAllOrdersStorage();

Example with all parameters​

const response = await Orders.getAllOrdersStorage('en_US', 0, 30);

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"