I want to get the results that do not match \"statusCode\": 200
In order to match text from field you use
GET index01/_search?pretty { \"query\":{
Try this instead
GET ucs_heartbeat/_search?pretty { "query": { "bool": { "must_not": [ { "term": { "statusCode": 200 } } ] } } }