Commerce API Errors
All error messages include a type identifier and a human readable message.
Error response
When the validation of the resource fails on POST or PUT requests, validation_error
is returned with status code 400. The response contains an error
field with a list of errors.
Error response 400
{
"error": {
"type": "invalid_request",
"message": "Required parameter missing: name"
}
}
{
"error": { "type": "not_found", "message": "Not found" }
}
Warnings
Responses can include a warnings
parameter to notify the developer of best practices, implementation suggestions or deprecation warnings. While you don’t need show warnings to the user, they are usually something you need to act on.
Example warning
{
"warnings": [
"Missing X-CC-Version header; serving latest API version (2018-03-22)"
]
}
See Also: