Add a Specification Value
POST
/api/v2/specifications/{specId}/values.json
Add a Specification Value to a Specification heading.
Scope
Requires the products
OAuth scope.
Path parameters
specId
required
The ID of the Specification is supplied as a path parameter. |
Request body
Your request body must contain an object including:
data
required
Containing a Specification Value object. |
Example
To add a Specification Value you must POST JSON to this resource within a data
object.
The minimum requirements for a specification value depends on the type of specification the value is being added to.
The default specification type
is string
requiring
just a
value
.
{
"data": {
"value": "Red"
}
}
For full details on the value object requirements see the Specification Value object.
Success responses
If the Specification Value object was created successfully you should receive a response with a 201
status
code:
success
A boolean where a value of true means the object was created successfully.
|
status
The HTTP status code e.g. 201 means the object was created successfully. |
data
Contains the Specification Value object you created including its new id and the URL imported for the image property (if applicable).
|
Error responses
If the Specification Value object could not be created you will encounter a response with a 422
status code:
success
A boolean where a value of false means the object could not be created.
|
status
A response code of 422 means the object could not be created and you should
check the errors property for further information. |
context
The context property indicates where the error occurred. For a 422 error this
will typically contain a value of data , indicating that there was an error
with the data object supplied. |
errors
Contains an array of error objects, each will have the following properties:
|