Basic Usage
HTTP Status
Smake Production Preparation API - HTTP Status
Along with the HTTP methods that the API responds to, it will also return standard HTTP statuses, including error codes.
In the case of a problem, the status contains the error code, while the body of the response will usually contain additional information about the problem that was encountered.
Codes
| Code | Description |
|---|---|
| 200 - OK | Everything works as expected. |
| 201 - Created | The resource was created successfully. |
| 400 - Bad Request | The request is valid, but the preparation order is not in a state that allows it. |
| 401 - Unauthorized | No valid API token has been specified. |
| 404 - Not Found | The requested resource does not exist. |
| 406 - Not Acceptable | The Accept header does not contain application/json. |
| 415 - Unsupported Media Type | The Content-Type header of a request with a body is not application/json. |
| 429 - Too Many Requests | Too many requests in a short time, see Rate Limit. |
| 500 - Internal Server Error | Request failed due to an internal error in Smake. |
| 503 - Service Unavailable | Smake is offline for maintenance. |
We recommend writing code that gracefully handles all possible API exceptions.
Please handle the status codes and not the message. It only contains additional information for you to
analyze the problem.
Example
HTTP/1.1 400 Bad Request
{
"message": "The preparation order is not released yet."
}