Search code examples
squarespace

How do you add products to Squarespace with the API?


A friend of mine has asked me to connect their product database with their Squarespace website. However I cannot find any API calls that allow me to add products or get products from the website.

What I would like to do:

  • POST all the products to Squarespace from an external database
  • GET notified (webhook) when a product is sold
  • PUT (update) a product when it has been sold on the website, or somewhere else.

Any links or advice where to find this info would be awesome! :)


Solution

  • Although the limitations may be surprising, the Squarespace developer docs are correct on this:

    With the Squarespace Commerce API, you can build applications that manage data from your Squarespace store. HTTP endpoints are provided which allow you to:

    • Retrieve orders
    • Update orders with fulfillment information

    At time of writing, that's all you can do with the API. So it is not currently possible to add products, receive purchase notifications, nor update a product's status..

    As to receiving purchase notifications, all you could do is retrieve order info on a schedule of some kind and compare to the last set of data in order to discover new orders, which doesn't really count as a good solution in my opinion, but thought I'd mention it.