bad_request
Error type constant indicating a malformed or invalid request.
What this means
The request you sent doesn't meet the basic structural requirements for processing by the Commerce API. This error occurs when the request itself is malformed—for example, invalid JSON syntax in the request body, missing required HTTP headers like Content-Type: application/json, or using an unsupported HTTP method for the endpoint. Unlike invalid_request_parameter which indicates problems with specific parameter values, bad_request signals that the Commerce API couldn't even parse or understand your request structure.
If you're creating a new order and receive this error, check that your request body is valid JSON, you're using the POST method, and you've included the proper headers. This error type always requires fixing the request structure before retrying.
Example error response
{
"error": {
"type": "bad_request",
"cause": "invalid_request_parameter",
"code": "1293",
"message": "malformed request body",
"detail": "The request body contains invalid JSON syntax. Unable to parse the request.",
"fix_code": "change_request_parameters",
"url": "https://commerce.zebo.dev/e/1293"
}
}
Related errors
- invalid_request_parameter - Specific parameter validation failures
- authentication_failed - Missing or invalid credentials