Create or update widget

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:
FieldTypeRequiredNotes
store_idintegerrequiredMust Must be an existing location and pass an ownership check. Also used for the active-add-on check.
widget_type_idintegerrequiredMust Must be an existing widget type.
unique_idstringoptionalWhen present (hashid decode must resolve to a Widget whose unique_id matches); switches the call to update that widget.
widget_titlestringoptionalmax 255.
widget_optionsarray/objectoptionalArbitrary 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) — success
  • data.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.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
integer
integer
string
widget_options
object
Responses

Language
Credentials
Bearer
JWT
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json