Execute some steps before REST POST request I have created a custom content type and configured it to be created via REST POST method using REST client like POSTMAN or any frontend(like angularJS or react).

I want to execute few steps before creation of content type when a POST request is made. For example, make a SOAP call to SAP or make a query to external DB, and based on some condition like if data is received from SAP or external DB, then only content type should be created else it should throw some custom error.

I am new to Drupal and any guidance is welcome.
There is a hook called entity_presave.

This is always called when you persist a new or updated entity through Drupal API. 
You can always check for the current request's method to see if it was a POST method (you can also check for the route itself). 
So these presave changes (or can be save or post save) will be only taken place if that criteria is met.