HTTP Status Codes¶
Opendi API uses standard HTTP Status Codes to indicate success or failure.
Here is a summary of responses used by this API:
Status Code |
Description |
|---|---|
200 OK |
The request has been fulfilled successfully. |
201 Created |
The request has been fulfilled and resulted in a new resource being created. |
204 No Content |
The request has been fulfilled, but no content is returned. |
400 Bad Request |
Request cannot be processed because of a client error (e.g. malformed request). |
401 Unauthorized |
Authentication failed, check your authentication header. |
403 Forbidden |
Authentication was successful, but this operation is not allowed. |
404 Not Found |
The requested resource could not be found (e.g. listing does not exist). |
409 Conflict |
Cannot do suppress/unsuppress action on listing, as it was claimed by another partner. |
500 Internal Server error |
An unexpected server error has occurred, please contact Opendi. |
Errors¶
Error responses are returned with an HTTP Status Code different than 2xx (either 4xx or 5xx) and contain an Error model in the body.
Examples¶
POST https://api.opendi.com/de/listings/12334
HTTP 404 Not Found
{
"type": "validation",
"message": "Validation failed for Listing model",
"details": [
"'id' field must be an integer, string given",
"'zip' field must be numeric"
]
}
As these errors are all the same, they are not necessary mentioned specifically in the further documentation except they annotate an unusual or extraordinary event or a special use case.