UGC Techdocs
  • Introduction
  • Guides
    • Analytics
      • Tracking UGC on Adobe Analytics
      • Tracking Widget interactions with Google Analytics
    • Direct Uploader
      • How to add Custom Data to Direct Uploader
      • How to capture Custom Data on Direct Uploader
      • How to automatically tag data on Direct Uploader
      • How to Customize error messages on Direct Uploader
      • How to Track Direct Uploader form submissions with Google Analytics (Universal & GA 4)
    • Data Templates
      • Creating a Data Template
    • Rights via Registration
      • Capture Custom Data on Rights by Registration Form
      • Styling Rights via Registration Form
    • REST API
      • Caching REST API results for optimization
      • Posting content into Nosto via Tile API
      • Posting images into Nosto via Tile API
    • Onsite Widgets (2.0)
      • Blank Canvas
        • How to Use the Blank Canvas to Create a Twitter Count Widget
        • Creating an Auto-Scrolling Carousel using Blank Canvas
        • Creating Gallery Widget by Using the Blank Canvas Widget
        • Creating a simple Hover effect using Blank Canvas
        • Creating a Word Cloud using Blank Canvas
        • Creating Your Widget by Using the Blank Canvas
      • Bind your own Events
      • Creating a Grid Widget from Waterfall
      • Create a Q&A Widget using Data Templates
      • Displaying a Widget in a Mobile App
      • Dynamically Specify Products to Display in Widget
      • Dynamically specify what Tile to display in a Widget
      • How to add a title / subtitle to a widget
      • How to localize the load more button on widgets
      • How to overlay existing Google Map with the UGC Map Widget
      • Styling cross-sellers on Grid and Carousel Widgets
      • How to Load External JS and CSS into Widgets
      • Profiling Widget Performance
      • Re-targeting with Widgets and Facebook Pixel
      • Render Widget filters dynamically
      • Styling Carousel Widget
      • Styling Grid Widget
      • Styling Masonry Widget
      • Styling Waterfall Widget
      • Styling Widget Expanded Tile
      • Styling Widget Shopspots
      • Using Web Fonts in Widgets
    • Digital Screens
      • Customizing Carousel Event Screen
      • Customizing Mosaic Event Screen
      • Customizing Scrollwall Event Screen
      • Customizing the Mosaic Event Screen to Have 9 Even Tiles
    • Email
      • Adding Location to an Email Tile
      • Styling the Email Widget
    • Integrations
      • DoubleClick
        • UGC Ads with Nosto and Google DoubleClick
      • Zapier
        • Consuming UGC Webhooks via Zapier
      • Mailchimp
        • Bring Social Content into a Mailchimp Campaign
    • Webhooks
      • Trigger notifications when content is in the moderation queue
  • Widgets
  • API Docs
    • JavaScript API
      • Widgets
        • Introduction
        • API Reference for Content Widgets
        • API Reference for Blank Canvas
        • API Reference for Map Widget
      • Digital Screens
        • Introduction
        • API Reference
    • Content API
      • Reference
    • REST API
      • Reference
        • Filters API
        • Moderation Views API
        • Tags API
        • Terms API
        • Tiles API
        • Users API
        • Widgets API
        • Automation Rules API
        • REST API Reference Widgets style and config
      • Best Practices
    • Webhooks
  • Enterprise Tools
    • Automation Rules
      • Triggers
      • Actions
      • Samples
    • Data Templates
    • User Access Control (UAC)
    • Single Sign On (SSO)
    • Enterprise Admin User Interface (EAUI)
    • Zapier
  • Commerce Tools
    • Product Feeds
    • Widget Implementation
    • Reporting
    • Integrations
      • Google Tag Manager
      • Magento
      • SalesForce Commerce Cloud
      • Shopify
      • Shopify Add To Cart
        • Global Variant Mapping for Add to Cart
        • Customise Add to Cart Widget Experience
  • Analytics
    • Google Analytics 4
      • Getting Started
      • Widgets Events
      • E-commerce Events
      • Email Events
  • Terms of Use
Powered by GitBook
On this page
  • Overview
  • API Calls
  • Create Rule
  • Fetch All Rules
  • Fetch Specific Rule
  • Update Specific Rule
  • Delete Specific Rule
  • Retrospectively apply a Rule

Was this helpful?

  1. API Docs
  2. REST API
  3. Reference

Automation Rules API

PreviousWidgets APINextREST API Reference Widgets style and config

Last updated 9 months ago

Was this helpful?

Overview

Nosto's UGC offers a full suite of API endpoints for Automation Rules allowing customers with API access to make all appropriate requests namely GET, POST, PUT, and DELETE.

Just like all other REST API calls, Rate Limits, Authentication and Authorisation processes, and Content Type and Accept Headers should all be followed when making your API calls. This information is defined within the Developer Portal

API Calls

Create Rule

Resource URL

POST https://api.stackla.com/api/tilerules/?access_token=[Access Token]&stack=[Stack Name]

The Request Body must include Rule Name (name), (trigger), (action), whether the Rule is active (enabled), and whether it is for Tiles or Assets (type).

{
    "name": "Rule Name",
    "trigger": { "$or": [ ] },
    "action": [ ],
    "enabled": 1,
    "type": 
}

Included below is an example of a filled-out rule-based.

{
    "name": "Rule Name",
    "trigger": {
        "$or": [
            {
                "image_tags": {
                    "$eq": "animal"
                }
            },
            {
                "image_tags": {
                    "$eq": "human"
                }
            }
                     
        ]
    },
    "action": [
        {
            "type":"$addToSet",
            "field":"tags",
            "value":"1"
        },
        {
            "type":"$addToSet",
            "field":"tags",
            "value":"2"
        },
        {
            "type":"$set",
            "field":"location",
            "value":{
                "name":"Crows Nest NSW",
                "latitude":-33.8255695,
                "longitude":151.1949095
            }
        },
        {
            "type":"$set",
            "field":"stackla_sentiment_score",
            "value":1
        },
       {
            "type":"$set",
            "field":"status",
            "value":"published"
        }
    ],
   "enabled": 1,
   "type": tile,
}

Fetch All Rules

Fetch all Automation Rules associated with your Stack

GET https://api.stackla.com/api/tilerules/?access_token=[Access Token]&stack=[Stack Name]

Fetch Specific Rule

Fetch all conditions specified for a Specific Automation Rule on your Stack

GET https://api.stackla.com/api/tilerules/[Rule ID]?access_token=[Access Token]&stack=[Stack Name]

Update Specific Rule

Update a Specific Automation Rule on your Stack

PUT https://api.stackla.com/api/tilerules/[Rule ID]?access_token=[Access Token]&stack=[Stack Name]

Delete Specific Rule

Remove a Specific Automation Rule on your Stack

DELETE https://api.stackla.com/api/tilerules/[Rule ID]?access_token=[Access Token]&stack=[Stack Name]

Retrospectively apply a Rule

Apply an Automation Rule to Tile or Asset records that already exist in your Stack

PUT https://api.stackla.com/api/tilerules/[Rule ID]/apply?access_token=[Access Token]&stack=[Stack Name]

here
Trigger
Action
Back to Top