Add transaction ID to REST API. Closes #2652