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 IProductStatusEntity.
ProductStatuses.getProductStatuses(
langCode);
Parameters schema
Schema
langCode: string
Language code. Default: "en_US"
example: "en_US"
Examples
Minimal example
const response = await ProductStatuses.getProductStatuses();
Example with attributes
const response = 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
The unique identifier of the position.
example: 12345
identifier: string
The textual identifier for the record field.
example: "in_stock"
localizeInfos: ILocalizeInfo
The name of the products statuses, taking into account localization.
isDefault: boolean
Default status flag.
example: true
version: number
The version number of the object.
example: 1
position: number
Position number.
example: NaN