getAttributeSetByMarker
Get a single attribute set by its marker.
Description
Fetches an attribute set by its marker, including its schema. Resolves to an IAttributeSetsEntity.
.getAttributeSetByMarker(
,
);
Parameters schema
Schema
marker(required): string
Marker of the attribute set.
example: "productAttributes"
langCode: string
Language code. Default: the langCode passed to defineOneEntry ("en_US" if none).
example: "en_US"
Examples
Minimal example
const response = await AttributesSets.getAttributeSetByMarker('admins');
Example with langCode
const response = await AttributesSets.getAttributeSetByMarker('admins', 'en_US');
Example response
{
"id": 27,
"createdDate": "2025-10-28T13:50:27.426Z",
"updatedDate": "2025-02-26T17:18:11.275Z",
"version": 0,
"identifier": "admins",
"title": "Admins",
"schema": {
"admin-text": {
"id": 1,
"type": "string",
"original": true,
"isVisible": true,
"identifier": "admin-text",
"initialValue": null,
"localizeInfos": {
"title": "Admins text"
}
}
},
"isVisible": true,
"type": {
"id": 1,
"type": "forAdmins"
},
"position": 1
}
Response schema
Schema: IAttributeSetsEntity
id: number
ID of the attribute set.
example: 123
createdDate: string
Creation date of the attribute set.
example: "2023-10-01T12:00:00Z"
updatedDate: string
Date the attribute set was last updated.
example: "2023-10-01T12:00:00Z"
version: number
Version number of the attribute set; changes with each update.
example: 1
identifier: string
Marker of the attribute set.
example: "attributeSet1"
title: string
Name of the attribute set.
example: "Product Attributes"
schema: Record<string, IAttributeSchemaItem>
Schema fields keyed by marker.
example:
{
"attribute1": {
"id": 1,
"type": "string",
"isPrice": false,
"original": true,
"identifier": "string",
"localizeInfos": {
"en_US": {
"title": "String"
}
}
}
}
isVisible: boolean
Whether the attribute set is visible.
example: true
type: string
Type of the attribute set.
example: "product"
position: number
1-based index of the set in the response (1 for a single set).
example: 1