List Specifications for a Product

GET /api/v2/products/{productId}/specifications.json

List specification values associated with a Product using a range of accepted query parameters.

Scopes

Requires either the products or products.readonly OAuth scope.

Path Parameters

productId required
The Product 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.
specId:in
Return entries with a Specification ID within a comma-separated list.
valueId:in
Return entries with a Specification Value ID within a comma-separated list.


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 Product Specification data objects including value (Specification Value) and spec (Specification) sub-objects (see example below for clarity).
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 a Product with a colour and size specification.

{
    "success": true,
    "status": 200,
    "data": [
        {
            "id": 1,
            "productId": 1,
            "spec": {
                "id": 1,
                "title": "Colour",
                "reference": "color",
                "description": null,
                "type": "swatch",
                "unit": null,
                "sequence": 8
            },
            "value": {
                "id": 1,
                "specId": 1,
                "value": "Red",
                "color": "#ff0000",
                "image": null,
                "maxValue": null,
                "sequence": 1
            }
        },
        {
            "id": 2,
            "productId": 1,
            "spec": {
                "id": 2,
                "title": "Size",
                "reference": "size",
                "description": null,
                "type": "string",
                "uri": null,
                "sequence": 2
            },
            "value": {
                "id": 56,
                "specId": 2,
                "value": "L",
                "color": null,
                "image": null,
                "maxValue": null,
                "sequence": 3
            }
        }
    ],
    "pagination": {
        "page": 1,
        "limit": 100,
        "total": 2,
        "totalPages": 1
    },
    "links": {
        "self": "https://examples.evance.me/api/v2/products/1/specifications.json",
        "previous": null,
        "next": null
    }
}