getProductsByStatusMarker
Search for a product status object by its textual identifier (marker).
Description
This method searches for a product status object based on its textual identifier (marker) from the API. It returns a Promise that resolves to a product status object IProductStatusEntity.
ProductStatuses.getProductsByStatusMarker(
marker*,
langCode
);
Parameters schema
Schema
marker(required): string
Product marker
example: "in_stock"
langCode: string
Language code. Default: "en_US"
example: "en_US"
Examples
Minimal example
const response = await ProductStatuses.getProductsByStatusMarker('my-marker');
Example with attributes
const response = await ProductStatuses.getProductsByStatusMarker('my-marker', 'en_US');
Example response
{
"id": 2,
"identifier": "sold",
"localizeInfos": {
"title": "Sold"
},
"version": 0,
"isDefault": false,
"position": 1
}
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.
example:
{
"title": "Catalog",
"plainContent": "Content for catalog",
"htmlContent": "<b>Content for catalog</b>",
"menuTitle": "Catalog"
}
isDefault: boolean
Default status flag.
example: true
version: number
The version number of the object.
example: 1
position: number
Position number.
example: 1