Skip to content

Widget Settings

GEThttps://rebuyengine.com/api/v1/widgets/settings?id={ Widget ID }&cache_key={Cache Key}

Requirements

In order to get the most up to date widget settings from this endpoint, you must pull your cache key from your store'suser/config. This can be done by either accessing window.Rebuy.shop.cache_key or by hitting this endpoint: https://rebuyengine.com/api/v1/user/config?shop={{myshopify domain here}} and pulling it from data.shop.cache_key.

Query Parameters

widget_id · string
The ID of the widget you need settings for
cache_key · string
Your store's cache key

Code Example

// GET https://cached.rebuyengine.com/api/v1/widgets/settings?id={widget_id}&cache_key={cache_key}
const params = new URLSearchParams({
  widget_id: "YOUR_VALUE",
  cache_key: "YOUR_VALUE"
});

fetch(`https://cached.rebuyengine.com/api/v1/widgets/settings?id={widget_id}&cache_key={cache_key}?${params}`)
  .then(response => response.json())
  .then(data => console.log(data));