getAllOrdersStorage
Getting all order storage objects. 🔐 This method requires authorization.
Description
This method getting all the order storage objects. The method will add the default language to the request body. If you want to change the language, just pass it with the second argument It returns a Promise that resolves to an array of IOrdersEntity objects.
Orders.getAllOrdersStorage(
langCode,
offset,
limit
);
Parameters schema
Schema
langCode: string
Language code. Default: "en_US"
example: "en_US"
offset: number
Optional parameter for pagination. Default: 0
example: 0
limit: number
Optional parameter for pagination. Default: 30
example: 30
Examples
Minimal example
const response = await Orders.getAllOrdersStorage();
Example with attributes
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": "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"
}
]