Errors

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 codeDescription
200 - OKEverything worked as expected.
400 - Bad RequestIllegal operation on a resource
401 - UnauthorizedNo valid authentication provided
403 - ForbiddenAuthentication given but not authorized to resource operation
404 - Not FoundThe requested resource or referenced resources could not be found
405 - Method Not AllowedThe used HTTP method is not allowed on the resource
422 - Unprocessable EntityThe request could not be interpreted, often missing a required parameter or wrongly formatted parameters
429 - Request limiting exceededThe request is declined either due to request rate limiting (code=122) or concurrent requests limit (code=123).
500-504 - Server ErrorsAn 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"
}
ParameterTypeDescription
codeintegerBillwerk+Optimize API error code. See full list of error codes here
errorstringShort error message
messagestringOptional clarifying error message
http_statusintegerHTTP status code of the error (same as the HTTP response)
http_reasonstringHTTP reason of the error (same as the HTTP response)
pathstringThe path generating the error response
timestampstringDate when the error occurred. In ISO-8601 extended offset date-time format.
request-idstringUnique request id for the failed request.
transaction_error stringOptional transaction error in the case the request involved transaction processing. See table below with possible transaction errors.