To call Hyperledger, the hyperledger SDKs should be used. For example, the node SDK can be referred at https://hyperledger.github.io/fabric-sdk-node/.
Hyperledger does not provide REST based APIs for the external applications to interact. The external interfaces work with the GRPC protocol and SDKs are the best way to interact with the hyperledger.
The azhlf tool referred in the documentation internally uses the Hyperledger Node SDK. The source code is available here. This can be used as a reference to develop your application.