As part of a doing a build for a Jenkins pipeline the build object is annotated with various jenkins urls. One of the these should be the build itself, This will be the url that the QR code is based on.