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.
// GET https://cached.rebuyengine.com/api/v1/widgets/settings?id={widget_id}&cache_key={cache_key}constparams=newURLSearchParams({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));
---
title: Widget Settings
excerpt: Returns all settings for a given widget.
api:
file: cached-rebuy.json
operationId: widget-settings-url
deprecated: false
hidden: false
metadata:
title: ''
description: ''
robots: index
next:
description: ''
---
## GET /api/v1/widgets/settings?id={ Widget ID }&cache_key={Cache Key}
!!! note "Requirements"
In order to get the most up to date widget settings from this endpoint, you must pull your cache key from your store's`user/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
```javascript
// 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));
```