If the response is a success, don't include
error in your response. Example:
"name": "A cookie with pieces of chocolate",
On the other hand, an error would look like:
"error-message": "The specified product identifier cannot be converted to a number."
Do change the HTTP status code on error. Returning 200 OK when something got wrong is silly.
Don't include error fields in the success response. Why would you? You aren't including
is-available in the erroneous response, are you?
Do use strings for text and numbers for numbers. Your
"error_code": "XXX" looks like you are putting a number as an error code, but passing it as a string. If it's a number, it should remain a number in the response. Note that using strings as error codes may be a good solution: error 5020 is not extremely explicit; error "InvalidProductIdentifier" is.