Billwerk+Optimize uses conventional HTTP response codes to indicate success or failure of an API request. In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error that resulted from the provided information, and codes in the 5xx range indicate an error at Billwerk+Optimize or external systems used by Billwerk+Optimize.
HTTP Status Code Summary
HTTP code | Description |
---|---|
200 - OK | Everything worked as expected. |
400 - Bad Request | Illegal operation on a resource |
401 - Unauthorized | No valid authentication provided |
403 - Forbidden | Authentication given but not authorized to resource operation |
404 - Not Found | The requested resource or referenced resources could not be found |
405 - Method Not Allowed | The used HTTP method is not allowed on the resource |
422 - Unprocessable Entity | The request could not be interpreted, often missing a required parameter or wrongly formatted parameters |
429 - Request limiting exceeded | The request is declined either due to request rate limiting (code=122 ) or concurrent requests limit (code=123 ). |
500-504 - Server Errors | An internal error occurred on Billwerk+Optimize's end |
Error response
All non successful 2xx responses will return a generic JSON error response with the following parameters.
{
"code" : 13,
"error" : "Subscription expired",
"http_reason" : "Bad Request",
"http_status" : 400,
"path" : "/v1/subscription/WHBBv/expire",
"timestamp" : "2015-06-12T06:38:33.876+0000",
"request-id" : "de03e86d0a6d44359b249340f967ddc9",
"transaction_error" : "credit_card_expired"
}
Parameter | Type | Description |
---|---|---|
code | integer | Billwerk+Optimize API error code. See full list of error codes here |
error | string | Short error message |
message | string | Optional clarifying error message |
http_status | integer | HTTP status code of the error (same as the HTTP response) |
http_reason | string | HTTP reason of the error (same as the HTTP response) |
path | string | The path generating the error response |
timestamp | string | Date when the error occurred. In ISO-8601 extended offset date-time format. |
request-id | string | Unique request id for the failed request. |
transaction_error | string | Optional transaction error in the case the request involved transaction processing. See table below with possible transaction errors. |