CMS Development

CPark
Member

Hubspot Pages API integration questions.

Hello,

I want to integrate hubspots' landing pages into my website amreswholesale.com via API.

For example 
amreswholesale.com/hubspot/landingpage1
amreswholesale.com/hubspot/landingpage2
amreswholesale.com/hubspot/landingpage3

the route I took is using 

https://gyazo.com/cf69dd8de14b8caf4a80ae7a12b8e0b4
Get all pages
Get specific page by ID

However, when I get the specific page by id... the JSON returns in a format that is specific to HubSpot's workflow. Optimally I would like to receive this information in a way that is more suitable to MERN and not be forced to use an iframe. How can I approach this problem?


0 Upvotes
6 Replies 6
CPark
Member

Hubspot Pages API integration questions.

@tjoyce

i think the rendered data looks like this which is a far cry from what it actually is.

https://gyazo.com/8c0862bb2eec43c2a80bd384ff31aba5

https://gyazo.com/e8d1dd2f7911bdbf4dd1dd14f0281c1f



0 Upvotes
tjoyce
Recognized Expert | Elite Partner
Recognized Expert | Elite Partner

Hubspot Pages API integration questions.

@CPark - Are you referring to the page / module builder JSON settings? or the overall JSON response you get from the API?

 

CPark
Member

Hubspot Pages API integration questions.

Hello,


https://gyazo.com/b6cac2b1cb575f97db0f58cff9ed7f23
I'm referring to the layout_sections array inside the JSON.

This layout_sections seems to be the description of the css,html,javascript,backend technology.

However its not as easy as copy and pasting this into MERN. I'm not sure what I should be doing to replicate the HubSpot page onto my website AmbridgeWholesale.com.

Or if it is even possible?

0 Upvotes
CPark
Member

Hubspot Pages API integration questions.

Im referring to the overall Json response I get from the API.

Do i need to loop through the "layout_sections" array and search for each 

https://gyazo.com/a345d5090a9ad0f8c8291326dffa374b
body
image
preheader
Primary_cta

to recreate parts of the HubSpot website?

0 Upvotes
tjoyce
Recognized Expert | Elite Partner
Recognized Expert | Elite Partner

Hubspot Pages API integration questions.

I don't think hubspot intends for you to write your own module parser / compiler... You should be able to see the rendered html though, if i'm not mistaken.

dennisedson
HubSpot Product Team
HubSpot Product Team

Hubspot Pages API integration questions.

Hey @CPark , great question and interested in what @tjoyce would say about this. 

This might be something you should submit to the ideas board to be honest.  (Unless Tim is able to make me look like a fool here 🙃)