Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0
HarryBilney

API Page Creation

Question

Hi,

I'm pulling data from my rental softwares API, I get back an array with various products in. Is it possible for squarespace to create a page for each of the products in the array from a template page?

Cheers

Share this post


Link to post

9 answers to this question

Recommended Posts

  • 0

Yes, but it would require custom coding that exceeds the scope of free forum coding tips. 

I built something similar for a holiday company. 

The process was:

  • Parse the api data and save it as session storage
  • Build filterable price/availability grid
  • Build various widgets that allow the stored data to be presented on category and product pages. 

The time to specify, design, build and test was significant. Days rather than hours. 

Here’s the site - https://www.bigweekends.com


Please hit LIKE to share your appreciation of posts that are helpful or useful. 

The like button is somewhere over thereover-there.jpg

Of course, Likes don't pay the bills.. If you're looking for a Squarespace Developer you can hire me here

Share this post


Link to post
  • 0

1) You could use built-in Squarespace functionality to Import Products from CSV. This will create a Products collection for you, people often do this

2) Second way is to use additional custom code and create Blog with some more logic, my cases:

So I may code for you if it is really time consuming to create manually

3) And third way is pulling your content  from your rental API (with jsonp or proxy server or what way it supports to fetch the data) and build page dynamically on frontend. But Squarespace is giving 404 for non-exist urls, so probably your urls will look like /property?url=my-property-url-there or something that way

Share this post


Link to post
  • 0
1 minute ago, HarryBilney said:

The third option is probably best but how would I go about this? I'm new to squarespace

That is not something Squarespace specific really, dynamic pages and content is as simple as fetch data, parse and append to page.

Share this post


Link to post
  • 0

Squarespace doesn’t support server side programming, so PHP is not an option. It would need to be a client side JavaScript solution. 

Edited by colin.irwin

Please hit LIKE to share your appreciation of posts that are helpful or useful. 

The like button is somewhere over thereover-there.jpg

Of course, Likes don't pay the bills.. If you're looking for a Squarespace Developer you can hire me here

Share this post


Link to post
  • 0
6 minutes ago, HarryBilney said:

Ah so i can just use php with javascript to create dynamic pages?

No php as @colin.irwin said but sometimes your rental API allows to fetch things with just browser JS, also if your rental API allows to export to CSV or XML - it may also be an option to upload that file somewhere and fetch it.

What about me - I prefer 2 way I described - you just hit the button and got articles generated in seconds (or minutes if many). And you do not need to think about search engines and metatags/JSON-LD generating because you have regular Squarespace blog articles, so things are already there (or additional may be added in the moment of generation article)

Caselaw — GI-ESCR 2019-10-15 16-15-59.jpg

Share this post


Link to post
  • 0
On 10/15/2019 at 1:51 PM, michaeleparkour said:

1) You could use built-in Squarespace functionality to Import Products from CSV. This will create a Products collection for you, people often do this

2) Second way is to use additional custom code and create Blog with some more logic, my cases:

So I may code for you if it is really time consuming to create manually

3) And third way is pulling your content  from your rental API (with jsonp or proxy server or what way it supports to fetch the data) and build page dynamically on frontend. But Squarespace is giving 404 for non-exist urls, so probably your urls will look like /property?url=my-property-url-there or something that way

Hi Michael, 

 

I'm trying to link my newly built squarespace website with BaseLinker API but I'm told I need a custom piece of code. Can you help me ? 

Thanks, 

Callum

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...