getProductStatuses
Get all product statuses.
Description
Fetches all product statuses defined in the project. Resolves to an array of IProductStatusEntity objects.
.getProductStatuses(
);
Parameters schema
Schema
langCode: string
Language code. Default: the langCode passed to defineOneEntry ("en_US" if none).
example: "en_US"
Examples
Minimal example
const response = await ProductStatuses.getProductStatuses();
Example with langCode
const response = await ProductStatuses.getProductStatuses('en_US');
Example response
[
{
"id": 2,
"identifier": "sold",
"localizeInfos": {
"title": "Sold"
},
"isDefault": false,
"version": 0,
"position": 1
},
{
"id": 1,
"identifier": "sale",
"localizeInfos": {
"title": "Sale"
},
"isDefault": true,
"version": 0,
"position": 2
}
]
Response schema
Schema: IProductStatusEntity[]
id: number
ID of the object.
example: 12345
identifier: string
Text identifier (marker) of the object.
example: "in_stock"
localizeInfos: ILocalizeInfo
Localized name of the product status.
example:
{
"title": "Sold"
}
isDefault: boolean
Whether this is the default status.
example: true
version: number
Version number of the object; changes with each update.
example: 1
position: number
Position used for sorting.
example: 1