Added block endpoint code.