POST
Auth Required
Validate Failed Order
Validate a failed order's data and get suggestions for corrections.
https://hoodsly-moc-api.wppool.dev/api/v1/failed-orders/{id}/validate
Request Body
JSON
{
"order_data": {
"billing": {
"first_name": "John",
"last_name": "Doe",
"email": "john@example",
"phone": "(555) 123-4567"
}
}
}
Response
200 OK
{
"valid": false,
"errors": [
{"field": "billing.email", "message": "Invalid email format", "suggestion": "john.doe@example.com"}
],
"warnings": [
{"field": "billing.phone", "message": "Phone format could be standardized"}
],
"suggestions": {
"billing.email": ["john.doe@example.com", "johndoe@example.com"]
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
valid | bool | Whether the data passes validation |
errors | array | List of validation errors |
warnings | array | List of warnings (non-blocking) |
suggestions | object | Suggested corrections for each field |
Request
GET
/api/v1/status
Response