Get a Product Specification
GET
/api/v2/products/{productId}/specifications/{id}.json
Retrieve a single Product Specification object for a Product using its ID.
Scopes
Requires either the products
or products.readonly
OAuth scope.
Parameters
Accepts the following parameters:
id
required
The ID of the Product Specification is supplied as a path parameter. |
productId
required
The ID of the Product is supplied as a path parameter. |
Response
Returns an object with the following properties:
success
A boolean where a value of true represents a successful request.
|
status
The HTTP status code e.g. 200 for a successful request.
|
data
Contains the Product Specification object with the spec and value properties containing the Specification and
Specification Value sub-objects respectively.
|
JSON Example
An example of JSON returned.
{
"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
}
}
}