List Values for a Specification

GET /api/v2/specifications/{specId}/values.json

Get or search for one or more values associated with a Specification using a range of accepted query parameters.

Scopes

Requires either the products or products.readonly OAuth scope.

Path Parameters

specId required
The specification ID is required.


Query Parameters

Accepts the following query parameters:

id:in
Return values for a specification by a comma-separated list of IDs.
id:min
Return values with an ID greater than or equal to that specified.
id:max
Return values with an ID less than or equal to that specified.
id:after
Return values with an ID greater than that specified.
id:before
Return values with an ID less than that specified.


JSON response

Evance will return a JSON object containing the following properties:

success
A successful search request containing zero or more results will always return a true value.
status
An integer matching the HTTP response code. A successful request will have a status of 200.
data
An array containing zero or more Specification Value data objects.
pagination
Search results include a pagination object contain information about the current page, total pages, the limit per page and the total number of results available.
  • limit - the number of results to return per page
  • page - the current page number
  • total - the total number of available results
  • totalPages - the total number of available pages of results
links
An object containing links to traverse available search results.
  • self - the URL for the current search.
  • previous - a URL for the previous results page, or null if there isn't one.
  • next - a URL for the next results page, or null if there isn't one


Example response

In the example below you're able to see examples of values for a Specification object type of swatch.

{
    "success": true,
    "status": 200,
    "data": [
        {
          "id": 1,
          "specId": 1,
          "value": "Red",
          "color": "#ff0000",
          "image": null,
          "maxValue": null,
          "sequence": 1
        },
        {
          "id": 2,
          "specId": 1,
          "value": "Green",
          "color": "#00ff00",
          "image": null,
          "maxValue": null,
          "sequence": 2
        },
        {
          "id": 3,
          "specId": 1,
          "value": "Blue",
          "color": "#0000ff",
          "image": null,
          "maxValue": null,
          "sequence": 3
        }
    ],
    "pagination": {
        "page": 1,
        "limit": 100,
        "total": 3,
        "totalPages": 1
    },
    "links": {
        "self": "https://examples.evance.me/api/v2/specifications/1/values.json",
        "previous": null,
        "next": null
    }
}