The Specification Object
A Specification represents a global heading used by Products and filtering.
Properties
description
Optional description for the specification up to 255 characters in length. Defaults to null .
|
id read-only
An unsigned 64-bit integer, which is unique across all Specifications and all Evance Accounts. |
reference
A unique string identifier for the specification e.g. color .
If omitted when adding a new Specification a new reference may be generated from the specification’s title. May contain lower case characters: a-z
0-9
_
-
up to 50 characters.
|
sequence
Indicates the display position of the specification on product profiles. The sequence of specification items starts from 1 (the first item). You may supply the sequence when adding or updating specifications as an integer or as an object containing placement and
id properties (see Sequencing Specifications below). If omitted when inserting
a specification, the new item will be positioned last in the sequence.
|
title
The specification title up to 50 characters in length. |
type
The type indicates how the Specification’s Values are used, displayed or validated. May be one of the following:
|
uri
An internal help URI up to 255 characters may be associated with the specification offering helpful information regarding the specification. Must be an internal URI relative to root (e.g. /help/my-topic ).
|
Example object
{
"data": {
"id": 53245,
"reference": "color",
"title": "Colour",
"description": null,
"uri": null,
"type": "swatch",
"sequence": 1
}
}
Sequencing Specifications
The position of specifications is represented by the sequence
property. When adding/modifying
data you may stipulate the sequence by supplying either an integer (starting from 1) or a position object containing
placement
and id
properties.
When supplying an integer, existing items with a sequence greater than or equal to the sequence supplied will increment by one. If you supply a sequence number greater than the current number of items, your specification will be positioned last and the appropriate sequence number will be recalculated and returned as part of the response.
Alternatively, you may supply a position object consisting of the following properties:
placement
May be one of the following:
|
id
Required when placement is either before or
after . Represents the ID of another Specification.
|
Example
The example below shows a request to position the Specification before another with ID 1234.
{
"data": {
"sequence": {
"placement": "before",
"id": 1234
}
}
}