Looks like the problem is that the UI portion of this is not accepting the Session Cookie from the WebAPI.
When the API does not receive the Session Cookie from a client, the API will start a new session when it receives a request.
What you will need to do then is to enable cookies in the UI portion of your project.
MS Docs does have guidance on this:
HTTP Cookies in ASP.NET Web API | Microsoft Docs[
^]
There are also some third party GIT packages such as CookieAwareWebClient that may make this easier
Addendum 1
Cookieless sessions were once the answer but are no longer supported. They also made
really ugly URLs as they tacked on a query string to ID the session
ASP.NET MVC and using cookieless sessions - Stack Overflow[
^]
Addendum 2
Upon re-reading your original post, I see you only are going to be dealing with
"literally one integer ID", what you could do is send that data out as a response header (encrypted if needed) and have the calling UI receive it and send it back in the request headers.
This is how some APIs work keeping track of tokens for identification and authorization types of things