# ALPHA: How to handle API across pages and handle refresh in a multi-page application?

**URL:** https://community.neutrinos.com/t/alpha-how-to-handle-api-across-pages-and-handle-refresh-in-a-multi-page-application/1499
**Category:** Neutrinos Platform
**Tags:** neutrinos-alpha
**Created:** [November 12, 2025, 12:15pm UTC](https://community.neutrinos.com/t/alpha-how-to-handle-api-across-pages-and-handle-refresh-in-a-multi-page-application/1499 "2025-11-12T12:15:39Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Vignesh-U](https://community.neutrinos.com/letter_avatar_proxy/v4/letter/v/3be4f8/32.png) [@Vignesh-U](https://community.neutrinos.com/u/Vignesh-U)
#### Post date: [November 12, 2025, 12:15pm UTC](https://community.neutrinos.com/t/alpha-how-to-handle-api-across-pages-and-handle-refresh-in-a-multi-page-application/1499/1 "2025-11-12T12:15:39Z")

</div>

Hi,

@Sam @Simphiwe @Eldho

In my application,`onLoad` lands on the **Customer Information** page, where I execute the **getSubmission data API** to fetch all submission details from the database. I need these submission details to be available across all pages.

Currently, I store the data in a local variable and use it throughout the pages. However, when the user is on the **Service** page and refreshes the tab, all local variables are cleared, and the app reloads on the Service page.

1. Is there a way to make the user land on the **Customer Information** page every time they refresh?
2. Alternatively, is there a way to conditionally execute APIs so that the required data is fetched again without forcing navigation?

 ![image](https://community.neutrinos.com/uploads/default/original/2X/3/3ef7762d5770b9e13383e9005f911f1e4c395104.png)

---

<div class="post-metadata">

### Author: ![Eldho](https://community.neutrinos.com/letter_avatar_proxy/v4/letter/e/c6cbf5/32.png) [@Eldho](https://community.neutrinos.com/u/Eldho)
#### Post date: [November 12, 2025, 12:20pm UTC](https://community.neutrinos.com/t/alpha-how-to-handle-api-across-pages-and-handle-refresh-in-a-multi-page-application/1499/2 "2025-11-12T12:20:09Z")

</div>

@Sam please support asap

---

<div class="post-metadata">

### Author: ![Simphiwe](https://community.neutrinos.com/letter_avatar_proxy/v4/letter/s/3be4f8/32.png) [@Simphiwe](https://community.neutrinos.com/u/Simphiwe)
#### Post date: [November 12, 2025, 12:45pm UTC](https://community.neutrinos.com/t/alpha-how-to-handle-api-across-pages-and-handle-refresh-in-a-multi-page-application/1499/3 "2025-11-12T12:45:29Z")

</div>

Hi @Vignesh-U,

On Alpha studio everything assigned to local or co inside the alpha object it is accessible across all the pages when navigating to other pages untill the whole application is refreshed/loaded.  
If you want data to be available even after refresh you can use localstorage.

1. What you can try doing is checking on Before Init if the submission data is available on local if not route a user back to Customer Information page.
2. I don’t think the is a way unless if you doing it on the custom code which becomes messy.

---

<div class="post-metadata">

### Author: ![Edward](https://community.neutrinos.com/letter_avatar_proxy/v4/letter/e/90db22/32.png) [@Edward](https://community.neutrinos.com/u/Edward)
#### Post date: [November 13, 2025, 10:11am UTC](https://community.neutrinos.com/t/alpha-how-to-handle-api-across-pages-and-handle-refresh-in-a-multi-page-application/1499/4 "2025-11-13T10:11:01Z")

</div>

In Alpha Studio, since data stored in the `alpha.local` or `alpha.co` object is only retained during navigation and lost after a full refresh, how can I persist form submission data more cleanly—without relying on messy custom code or manually managing `localStorage`?

---

<div class="post-metadata">

### Author: ![Sam](https://community.neutrinos.com/letter_avatar_proxy/v4/letter/s/5f9b8f/32.png) [@Sam](https://community.neutrinos.com/u/Sam)
#### Post date: [November 13, 2025, 10:39am UTC](https://community.neutrinos.com/t/alpha-how-to-handle-api-across-pages-and-handle-refresh-in-a-multi-page-application/1499/5 "2025-11-13T10:39:02Z")

</div>

Hello @Edward ,  
You can try using the case service — the data will persist with that approach. Hope this helps!

---

<div class="post-metadata">

### Author: ![Edward](https://community.neutrinos.com/letter_avatar_proxy/v4/letter/e/90db22/32.png) [@Edward](https://community.neutrinos.com/u/Edward)
#### Post date: [November 13, 2025, 10:39am UTC](https://community.neutrinos.com/t/alpha-how-to-handle-api-across-pages-and-handle-refresh-in-a-multi-page-application/1499/6 "2025-11-13T10:39:49Z")

</div>

Thanks @Sam will try that.

---

<div class="post-metadata">

### Author: ![Vignesh-U](https://community.neutrinos.com/letter_avatar_proxy/v4/letter/v/3be4f8/32.png) [@Vignesh-U](https://community.neutrinos.com/u/Vignesh-U)
#### Post date: [November 13, 2025, 12:35pm UTC](https://community.neutrinos.com/t/alpha-how-to-handle-api-across-pages-and-handle-refresh-in-a-multi-page-application/1499/7 "2025-11-13T12:35:59Z")

</div>

Hi @Simphiwe ,

My submission api will get data from DB, we are not using the case services to store the data.

Browser LocalStorage will not be helpful when we have multiple tabs.

If routing back user to customer page is the only option, It will increase the application load time

Alternatively, is there a way to conditionally execute APIs so that the required data is fetched again without forcing navigation?

---

<div class="post-metadata">

### Author: ![Simphiwe](https://community.neutrinos.com/letter_avatar_proxy/v4/letter/s/3be4f8/32.png) [@Simphiwe](https://community.neutrinos.com/u/Simphiwe)
#### Post date: [November 13, 2025, 1:52pm UTC](https://community.neutrinos.com/t/alpha-how-to-handle-api-across-pages-and-handle-refresh-in-a-multi-page-application/1499/8 "2025-11-13T13:52:15Z")

</div>

Hi @Vignesh-U,

Yes it is possible on the custom code.
