But I don’t see where I can ask for that in the API.
Also, I can set a SEO slug for items, but nowhere does square tell me what the full URL would be, so I can’t build a link based on that. All my guesses go to 404.
What am I doing wrong? How do I get a permalink to my items?
I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:
If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.
The Square Catalog API does not directly provide a permalink or full URL for catalog items that you can use to link to a detail page. The CatalogEcomSeoData object you mentioned is used for SEO purposes, but it doesn’t generate a direct URL for accessing item detail pages.
To create a link to an item detail page, you typically need to integrate with a platform that supports eCommerce functionality, such as Square Online. In such cases, the platform would handle the generation of URLs for product pages based on the SEO slug or other identifiers.
If you’re using Square Online, you can set up your items there, and the platform will generate the appropriate URLs for you. You can then use these URLs in your frontend application. If you’re building a custom solution, you might need to implement your own logic to generate and manage URLs based on the item data you retrieve from the Catalog API.
If you are encountering 404 errors, it might be due to incorrect assumptions about the URL structure. Ensure that your items are properly set up in the eCommerce platform you are using, and refer to its documentation for guidance on accessing item pages.