Product Item URL


I am having this issue on the checkout. My URL is :
What should I write on the product button a data -item-url?
data-item-url=“” this is not working. Could someone please help me out ?

Thanks in Advance

Hi @Nerea, thanks for reaching out!

When you use a SPA we cannot fetch the product data for the validation, as it is not in the page HTML.
In those cases you need to use ou JSON validation.

Let me know if you have further questions.

Thanks :slight_smile:


Thanks for the info.

Could you please give me more info about it? How should the code look like?

Thanks in advance,


Hi @Nerea.

For that, you should add an API endpoint with the details for each product.
For example, your product button would look like:

<button class="snipcart-add-item"
  data-item-name="The Starry Night">
  Add to cart

And then the URL should return the product info with the structure described in the documentation in JSON format, like:

  "id": "starry-night",
  "price": 79.99,
  "url": ""

Hello @nelitow , could you elaborate how to address custom fields in the JSON crawler? I have a product, that has a couple variants that affect the price, hence I think these variants must be mentioned in the JSON. However, there is no information in the documentation concerning this.