Can I use ajax to pull info my own site into my Shopify theme app extension? Is it possible?

Hello,

I am creating an app block with theme app extension with a select menu for the online store. The goal is to allow users/merchants to install our app, add the app by using Add Block and then hit the select menu and select a booklet/pdf from our site to embed on their storefont.

I am currently using Shopify CLI 3.0 and have the app installed to our store with the select menu (on the right panel) but the values are hardcoded at the moment.

I wanted to know (Is this possible?):

  1. Can I connect to our site, via ajax, on behalf of the account owner and pull a booklet list?
  2. Can I dynamically update the drop-down menu with that booklet list?

I have the liquid file for the block looking like this:

app-block.liquid:

> > {% schema %}> {> "name": "Title for App",> "target": "section",> "stylesheet": "app.css",> "javascript": "app.js",> "settings": [> {> "type": "select",> "id": "**workpad_key**",> "label": "Embed your booklet to your store",> "options": [> {> "value": "**5xsYPWgs3l3VbOK1izBx6j**",> "label": "Booklet 1"> },> {> "value": "C8Ij8PqtVpDvVpVNVXDQhw",> "label": "Booklet 2"> },> {> "value": "hLxVnSxFJuLw3iCvpfLko1",> "label": "Booklet 3"> }> ]> }> ]> }> {% endschema %}> > ![Screen Shot 2022-09-13 at 3.08.48 PM.png|3434x1924](upload://111rLFrUeQkFjB1SxanfDsLpPtk.jpeg)