getProductStatuses
Search for all product status objects.
Description
This method searches for all product status objects from the API. It returns a Promise that resolves to an array of product status objects.
ProductStatuses.getProductStatuses(
langCode
);
Parameters schema
Schema
langCode: string
language code
example: en_US
Examples
Minimal example
const value = await ProductStatuses.getProductStatuses();
Example with attributes
const value = await ProductStatuses.getProductStatuses('en_US');
Example response
[
{
"id": 1,
"identifier": "sale",
"localizeInfos": {
"title": "Sale"
},
"isDefault": true,
"version": 0,
"position": 1
},
{
"id": 2,
"identifier": "sold",
"localizeInfos": {
"title": "Sold"
},
"isDefault": false,
"version": 0,
"position": 2
}
]
Response schema
Schema: IProductStatusEntity[]
id: number
object identifier
example: 1764
version number
object's version number of modification
example: 10
identifier: string
textual identifier for a field in the record
example: catalog
localizeInfos: Record<string, any>
json description of the main page data object taking into account the language "en_US" (for example)
example:
{
"en_US": {
"title": "Catalog",
"plainContent": "Content for catalog",
"htmlContent": "<b>Content for catalog</b>",
"menuTitle": "Catalog"
}
}