How to implement external api in templates and landing pages

developertools

#1

I want to use this
GET
https://orion.nfusioncatalog.com/service/price/all?currency=CAD&withretailtiers=true&withwholesaletiers=true&withCost=true&token=&shippingInAsk=true

API in hubspot please help me to do and get values in UI


#2

Hi @Venkatesh_Srikanth,

What exactly are you trying to do with that API? Are you trying to pull information on your website? Or pull data into your HubSpot portal?


#3

https://orion.nfusioncatalog.com/Account/ApiDocs

I want to show the product name / Price in User Interface. Just display in HubSpot landing pages and templates


#4

Hi @Venkatesh_Srikanth,

If you’re trying to show the response on your website, you should be able to make an AJAX request to that API and display the response on your landing/website pages. If instead you’re trying to show the response within the HubSpot UI, that isn’t possible. The only way to make the items returned by that API accessible within the HubSpot UI would be to create a HubDB table and push the items into that table. Then, you could create website pages and request the items from the HubDB table. Here’s some documentation on HubDB:

https://developers.hubspot.com/docs/methods/hubdb/hubdb_overview


#5

Thank you @Derek_Gervais,

Any example for Ajax request to that api and display the response on my landing/website pages.


#6

Hi @Venkatesh_Srikanth,

if you’re using jQuery:
https://www.w3schools.com/jquery/ajax_ajax.asp
Or with plain Javascript: