Skip to content

Get Variant Attribute
Beta

Request

Everything about one attribute of the Variant definition, the tenant's own or the platform's, in every language: what it is, what its type carries, where a variant form draws it and what may be changed about it — what a screen editing the attribute loads.

attributeSetId chooses the form the place is read from: that attribute set's Variant form (left out, the default Variant form). It decides nothing else.

Response

200 OK — the attribute under value, in the members a create reports it in: what every attribute has, and what its type carries in every language — a checklist's options with their translations, a table's templates and hasStartingTable, an image's sizeVariants and fileNameAttributes, the linkingPattern of an image or a file, a related items attribute's target and separator. Then where the form draws it, placement (null when the form does not lay it out), and what may be changed about it, editability.

Example

GET /Metadata/Variants/attributes('frmt_strapcolour')?attributeSetId=7 HTTP/1.1
X-API-KEY: your-api-key-here
Path
attributeIdstringrequired

The identifier of the attribute to read, matched exactly

Query
attributeSetIdinteger, (int32)

The attribute set whose Variant form the place is read from; left out, the default Variant form

Headers
X-API-KEYstring

Tenant's API key (required)

curl -i -X GET \
  'https://api2.saleslayer.com/catalog/Metadata/Variants/attributes('\''{attributeId}'\'')?attributeSetId=0' \
  -H 'X-API-KEY: string'

Responses

OK

Bodyapplication/json
@etagstring or null
@contextstring or null
valueany or null
Response
{ "value": { "identifier": "frmt_size", "title": "Size", "attributeType": "shortText", "isLocalized": false, "isFormReadonly": false, "kind": "custom", "isRequired": false, "isFormRequired": false, "titleTranslations": [ … ], "placement": { … }, "editability": { … } }, "@readLink": "https://api2.saleslayer.com/catalog/Metadata/Variants/attributes('frmt_size')", "@editLink": "https://api2.saleslayer.com/catalog/Metadata/Variants/attributes('frmt_size')" }