Create a new widget, or updates an existing one when you supply unique_id. Requires the location to have an active widget add-on; a new widget gets a hashid unique_id generated from its id after the first save.
Auth: Both — authentication in the role-agnostic account/* group (route name api.brand.widget.update); no HiPages gate. store_id must sit inside your own account tree (auth user's company-hierarchy walk). Note: despite the controller's OpenAPI annotation listing company_id as an alternative, the actual makes store_id required for every role — company_id is NOT a request field here and is only set from $validated['company_id'] (always null in practice). Both roles use the same params; a partner can target stores anywhere in its tree, an account user only its own.
Rate limit: No rate limit.
Request
- Body:
| Field | Type | Required | Notes |
|---|---|---|---|
store_id | integer | required | Must Must be an existing location and pass an ownership check. Also used for the active-add-on check. |
widget_type_id | integer | required | Must Must be an existing widget type. |
unique_id | string | optional | When present (hashid decode must resolve to a Widget whose unique_id matches); switches the call to update that widget. |
widget_title | string | optional | max 255. |
widget_options | array/object | optional | Arbitrary widget config JSON (e.g. numberOfReviews, reviewSiteValue.value). |
Response — { data. } envelope (success wrapper), plus feature-limit headers via withFeatureHeaders(. REVIEW_WIDGETS). Returns 400 (badRequestResponse) when the store has no active widget add-on.
message(string)status(string) —successdata.unique_id(string) — the saved widget's hashid code
Errors: 402 when creating a new widget while the review-widgets limit of your plan is reached.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
