Where is the LinkList API endpoint?

Magnolia
New Member
2 0 12

For nine years, people have been asking why there isn't a LinkList API endpoint:

 

I read http://api.shopify.com/ but I really, really felt like I was missing something because an object that necessary to developing a Shopify app really seems like it should be accessible in the API...

 

And for nine years, there's only been one hacky workaround. Here's from 2010:

 

A workaround I used: sacrifice your "page.liquid" template, set its layout to none and include a snippet file containing the straight menu code HTML. then, access it through cURL.

 

Here's from February of 2019:

...one way around that is to build out a page without layout and do something like shown in this gist which will traverse the linklist object ... Give it a try to see what I mean - many workarounds are solved using this concept.

 

So, given responses like these from Shopify staff and partners for nearly a decade:

 

  • "The short answer is a big unfortunate no. Linklists are not in the api."

  • "I have some shops that have +20 linklists and it's a freakin' pain."
  • "I can see a linklists API being useful for developers but that's not an option you've got at the moment. "

Why hasn't this API been created yet?

This data already being populated at `/admin/menus.json` and `/admin/menus/{{ ID }}.json`. A simple GET endpoint, like the product or collections endpoints would solve a lot of developer headaches, including mine. But for some reason, after years of this being a clear pain point, there's been absolutely no movement on this.

Replies 6 (6)
Magnolia
New Member
2 0 12

In the meantime, here's how you'll have to set up your own pseudo-API for linklists.

  • In your theme, create a template named 'page.api.menus.liquid'.
  • Copy and paste this gist I made into your new template. The gist renders valid JSON of all your linklists, iterating up to 3 levels deep.
  • With this template in your published theme, create a page, title it, and set the template to "page.api.menus".
  • Publish and navigate to the page. The url of this page is now your pseudo-endpoint for API calls.
HunkyBill
Shopify Expert
4837 60 587

This is beautiful. Just sayin'

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
nick-mealey
Shopify Expert
49 0 29

This would be so helpful.

Helium Development Shopify Developer, Website Design, App Development
jbwhaley
Shopify Partner
4 0 3

Make that 12 YEARS. Ridiculous.

HunkyBill
Shopify Expert
4837 60 587

Apparently, Rome was not built in a day either, so I guess we wait. This stuff is hard you know!

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
jbwhaley
Shopify Partner
4 0 3

It's probably not as hard as manually managing dozens of linklists across a dozen stores, but nobody at Shopify has to do that so they don't care.

 

There is no excuse for this omission. Shopify has massively overhauled the entire platform this year, but they still "can't" even add a single API endpoint that simply returns a relatively small JSON object populated with data that already exists in their database...OK, sure, sounds really really really hard to me.