Create a Spotlight rule
create_spotlight_ruleAdd a rule with one trigger (when it applies) and one action (what the visitor sees), switched on immediately and applied after the existing rules. Location ids come from list_locations.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | What the rule is called, for create and update. | |
| endsAt | No | ISO timestamp. After it the rule is dormant. Optional. | |
| startsAt | No | ISO timestamp. Before it the rule is dormant. Optional. | |
| actionKind | Yes | What happens. banner = a message above the results; feature = move locations to the top or bottom; only = show just these, taken from the whole network; hide = remove these. | |
| triggerKind | Yes | When the rule applies. always = every search; no_results = a search that found nothing; radius = within a distance of a point; polygon = inside a drawn area; postcodes = a postcode list, only matched by a typed search; filter = while a tag filter is on. | |
| actionFields | No | The action's own fields: {message, linkUrl, linkLabel} for banner, {locationIds: [...], position: 'top'|'bottom'} for feature, {locationIds: [...]} for only and hide. | |
| triggerFields | No | The trigger's own fields: {lat, lng, radiusKm} for radius, {points: [[lat, lng], ...]} for polygon (at least three), {postcodes: [...]} allowing a trailing * for a prefix, {tagId} for filter. Empty for always and no_results. |