Skip to navigation Skip to main content
Free on WordPress.org 4.9 · 13 reviews WordPress.org Explore both Plugins
Free on WordPress.org 4.9 · 13 reviews WordPress.org Explore both Plugins
  • WordPress
    Products
    Smart Cycle DiscountsDiscount automation › TrustLensCustomer trust intel › Cycle AI AIPlain-English campaigns ›
    New pluginComing soon
    Resources & toolsDocs, pricing, support ›
    Smart Cycle Discounts

    Smart Cycle Discounts

    Automate WooCommerce discount campaigns — schedule, target, and measure.

    62%
    Free Pro $59 5 discount types Recurring
    Jump into the page
    How it works Capabilities Promo codes Pricing
    Docs
    Getting started Discount types Scheduling
    Explore Smart Cycle Discounts → Changelog
    TrustLens

    TrustLens

    Customer trust intelligence — score buyers, spot abuse, protect revenue.

    Trust 86
    Free Pro $79 6 segments Abuse detection
    Jump into the page
    How it works Detection Outcomes Pricing
    Docs
    Trust scoring Detection modules Card-testing defense
    Explore TrustLens → Verify a report Changelog

    Cycle AI inside Smart Cycle Discounts

    Describe a sale in plain English — Cycle AI builds the whole campaign.

    “20% off hoodies this weekend”
    Included in Pro Natural language Catalog-aware
    See it work

    Type a sentence, get a ready-to-launch discount campaign that already understands your products, prices, and schedule.

    Live demo How it works
    Meet Cycle AI →

    A new plugin Coming soon

    Something is loading in the lab. Join the list to get the reveal first.

    Notify me on launch →

    Resources & tools

    Everything around the plugins — docs, free tools, and help.

    Learn
    Documentation Pricing & bundle Support
    Free tools
    Discount Calculator Sale Calendar
    Stay current
    SCD changelog TrustLens changelog
    Compare all plans →
    Secure checkout WordPress.org 14-day refund View pricing →
  • Affiliate
    Program
    OverviewHow the program works How it works4 steps from apply to earn Commission details30% · 60-day cookie · recurring
    Get started
    Apply nowOpen Takes ~2 minutes Earnings calculatorEstimate your monthly income FAQPayouts, cookies, renewals
    Resources
    Brand kitLogos, banners, copy, social PlaybookTactics that actually convert FTC disclosureHow to disclose properly Affiliate termsFull program agreement Contact teamOpen the contact form
    Earn 30% recurring on every saleFree to join · 60-day cookie · monthly PayPal payouts Apply now
  • Blog
  • DOCS
    Docs & resources

    Guides, references, and answers for every Webstepper plugin.

    Smart Cycle DiscountsAutomated WooCommerce discount campaigns
    Getting started› Discount types› Cycle AI›
    TrustLensCustomer trust & fraud intelligence
    Trust scoring› Detection modules› Card-testing defense›
    Docs home Guides FAQ Pricing Support
    WordPress tools that solve real problems
  • Contact Us
  • About
    Company

    Our Story

    Founded 2020

    Built by store owners, for store owners. We make WordPress tools that solve real problems.

    Learn more
    Built from experienceTools we use ourselves
    Time is preciousSimple, intuitive UX
    Real supportTalk to the founders
    Legal & contact
    Contact us Privacy policy Terms of service Refund policy
    14-day money-backNo questions asked
Popular requests
  • smart cycle discounts
  • trustlens
  • chargeback protection
GET STARTED

Getting Started

5
  • What is Smart Cycle Discounts?
  • Installation Guide
  • Creating Your First Campaign
  • Plugin Dashboard Overview
  • Free & Pro Features

Campaign Wizard

6
  • Campaign Wizard Overview
  • Step 1 – Basic Information
  • Step 2 – Product Selection
  • Step 3 – Discount Configuration
  • Step 4 – Campaign Scheduling
  • Step 5 – Review & Launch

Product Selection

5
  • All Products Mode
  • Specific Products Mode
  • Random Products Mode
  • Smart Selection Mode
  • Product Search Tips

Discount Types

8
  • Percentage Discounts
  • Fixed Amount Discount
  • Buy One Get One (BOGO)
  • Tiered Volume Pricing
  • Spend Threshold Discounts
  • Bundle Discounts
  • Discount Stacking and Priority
  • Coupon Code Campaigns

Scheduling

5
  • Setting Campaign Dates
  • Timezone Configuration
  • Recurring Campaigns
  • Campaign Status Explained
  • Automatic Activation

Campaign Management

7
  • Campaign List
  • Editing Existing Campaigns
  • Duplicating Campaigns
  • Bulk Actions
  • Campaign Priority System
  • Campaign Overview Panel
  • Campaign Intelligence System

Developer Documentation

5
  • Hooks and Filters Reference
  • Rest API Overview
  • Custom Discount Integration
  • Template Customization
  • Database Schema

Troubleshooting

6
  • Campaign Not Activating
  • Discounts Not Displaying
  • Scheduling Issues
  • Product Search Not Working
  • Performance Optimization
  • Common Error Messages

FAQ

3
  • General
  • Compatibility
  • Pricing & Licensing

Notifications

5
  • Email Provider Setup
  • Email Notifications Setup
  • Basic Notifications
  • Proactive Alerts
  • Low Stock Alerts

Setting Configuration

5
  • General Settings
  • Display Settings
  • Advanced Settings
  • Tools and Diagnostics
  • License Management

Use Cases

8
  • Coupon Code Campaign
  • Flash Sale Campaign
  • Seasonal Sale Campaign
  • Weekend Sale Recurring
  • BOGO Promotion
  • Volume Discount Campaign
  • Cart Threshold Promotion
  • Bundle Discount Campaign

Cycle AI

6
  • What is Cycle AI
  • Creating Campaign With AI
  • Refining With Conversation
  • Managing Campaigns With AI
  • Prompt Writing Tips
  • Rate Limit And Troubleshooting
View Categories
  • Home
  • Docs
  • Smart Cycle Discounts
  • Developer Documentation
  • Rest API Overview

Rest API Overview

4 min read

Smart Cycle Discounts Pro provides a REST API for programmatic access to campaigns, analytics, and settings. This allows integration with external systems, mobile apps, and automation workflows. REST API access requires Smart Cycle Discounts Pro.


API Overview #

Base URL #

https://yoursite.com/wp-json/scd/v1/

Authentication #

The API uses WooCommerce REST API authentication:

  • Consumer Key: Generate in WooCommerce → Settings → Advanced → REST API
  • Consumer Secret: Provided when creating API keys
  • Permissions: Read/Write access required

Authentication Methods #

Method Use Case
HTTP Basic Auth Server-to-server requests (HTTPS required)
Query String Simple integrations (less secure)
OAuth 1.0a Third-party apps

Example Authentication #

# HTTP Basic Auth
curl -X GET "https://yoursite.com/wp-json/scd/v1/campaigns" \
  -u "ck_your_consumer_key:cs_your_consumer_secret"

# Query String Auth
curl -X GET "https://yoursite.com/wp-json/scd/v1/campaigns?consumer_key=ck_xxx&consumer_secret=cs_xxx"

Endpoints #

Campaigns #

List Campaigns #

GET /wp-json/scd/v1/campaigns

Parameters:

Parameter Type Description
status string Filter by status (active, scheduled, paused, expired, draft)
per_page integer Results per page (default: 10, max: 100)
page integer Page number
orderby string Order by field (id, name, created_at)
order string Sort order (asc, desc)

Response:

{
  "campaigns": [
    {
      "id": 123,
      "name": "Summer Sale",
      "status": "active",
      "priority": 3,
      "discount_type": "percentage",
      "discount_value": 25,
      "start_date": "2025-06-01T00:00:00",
      "end_date": "2025-06-30T23:59:59",
      "products_count": 45,
      "created_at": "2025-05-15T10:30:00",
      "updated_at": "2025-05-20T14:15:00"
    },
    ...
  ],
  "total": 15,
  "total_pages": 2
}

Get Single Campaign #

GET /wp-json/scd/v1/campaigns/{id}

Response:

{
  "id": 123,
  "name": "Summer Sale",
  "status": "active",
  "priority": 3,
  "discount_type": "percentage",
  "discount_value": 25,
  "product_selection": {
    "type": "conditions",
    "conditions": [
      {
        "field": "category",
        "operator": "equals",
        "value": "summer-collection"
      }
    ]
  },
  "schedule": {
    "start_date": "2025-06-01T00:00:00",
    "end_date": "2025-06-30T23:59:59",
    "recurring": false
  },
  "products": [1, 2, 3, 4, 5],
  "analytics": {
    "revenue": 12500.00,
    "conversions": 230,
    "discount_given": 4166.67
  }
}

Create Campaign #

POST /wp-json/scd/v1/campaigns

Request Body:

{
  "name": "New Campaign",
  "priority": 3,
  "discount_type": "percentage",
  "discount_value": 20,
  "product_selection": {
    "type": "all",
    "exclusions": {
      "categories": [15, 22]
    }
  },
  "schedule": {
    "start_date": "2025-07-01T00:00:00",
    "end_date": "2025-07-31T23:59:59"
  },
  "status": "scheduled"
}

Response:

{
  "id": 124,
  "name": "New Campaign",
  "status": "scheduled",
  ...
}

Update Campaign #

PUT /wp-json/scd/v1/campaigns/{id}

Request Body: Same structure as create, with only fields to update.


Delete Campaign #

DELETE /wp-json/scd/v1/campaigns/{id}

Response:

{
  "deleted": true,
  "id": 123
}

Campaign Actions #

POST /wp-json/scd/v1/campaigns/{id}/activate
POST /wp-json/scd/v1/campaigns/{id}/pause
POST /wp-json/scd/v1/campaigns/{id}/resume
POST /wp-json/scd/v1/campaigns/{id}/duplicate

Analytics #

Get Analytics Summary #

GET /wp-json/scd/v1/analytics

Parameters:

Parameter Type Description
start_date string Start date (YYYY-MM-DD)
end_date string End date (YYYY-MM-DD)
campaign_id integer Filter by campaign

Response:

{
  "summary": {
    "total_revenue": 45000.00,
    "total_conversions": 850,
    "total_discount": 11250.00,
    "avg_order_value": 52.94
  },
  "campaigns": [
    {
      "id": 123,
      "name": "Summer Sale",
      "revenue": 25000.00,
      "conversions": 450
    },
    ...
  ],
  "daily_data": [
    {
      "date": "2025-06-01",
      "revenue": 1500.00,
      "conversions": 28
    },
    ...
  ]
}

Get Campaign Analytics #

GET /wp-json/scd/v1/campaigns/{id}/analytics

Products #

Get Campaign Products #

GET /wp-json/scd/v1/campaigns/{id}/products

Response:

{
  "products": [
    {
      "id": 45,
      "name": "Blue Widget",
      "sku": "BW-001",
      "original_price": 50.00,
      "discounted_price": 37.50,
      "discount_amount": 12.50
    },
    ...
  ],
  "total": 45
}

Check Product Discount #

GET /wp-json/scd/v1/products/{id}/discount

Response:

{
  "product_id": 45,
  "has_discount": true,
  "campaign_id": 123,
  "campaign_name": "Summer Sale",
  "original_price": 50.00,
  "discounted_price": 37.50,
  "discount_type": "percentage",
  "discount_value": 25
}

Settings #

Get Settings #

GET /wp-json/scd/v1/settings

Update Settings #

PUT /wp-json/scd/v1/settings

Error Handling #

Error Response Format #

{
  "code": "rest_invalid_param",
  "message": "Invalid parameter: discount_value",
  "data": {
    "status": 400,
    "params": {
      "discount_value": "Must be between 1 and 100"
    }
  }
}

Common Error Codes #

HTTP Code Error Code Description
400 rest_invalid_param Invalid parameters
401 rest_forbidden Authentication failed
403 rest_forbidden Insufficient permissions
404 rest_not_found Resource not found
500 rest_error Server error

Rate Limiting #

Limits #

Endpoint Type Limit
Read (GET) 120 requests/minute
Write (POST/PUT/DELETE) 60 requests/minute

Rate Limit Headers #

X-RateLimit-Limit: 120
X-RateLimit-Remaining: 115
X-RateLimit-Reset: 1625097600

Webhooks #

Available Webhook Events #

Event Trigger
campaign.created New campaign created
campaign.updated Campaign modified
campaign.activated Campaign becomes active
campaign.deactivated Campaign paused/expired
campaign.deleted Campaign deleted
discount.applied Discount applied to order

Webhook Payload #

{
  "event": "campaign.activated",
  "timestamp": "2025-06-01T00:00:00Z",
  "data": {
    "campaign_id": 123,
    "campaign_name": "Summer Sale",
    ...
  }
}

Code Examples #

PHP with WordPress HTTP API #

$response = wp_remote_get(
    'https://yoursite.com/wp-json/scd/v1/campaigns',
    array(
        'headers' => array(
            'Authorization' => 'Basic ' . base64_encode( $consumer_key . ':' . $consumer_secret ),
        ),
    )
);

$campaigns = json_decode( wp_remote_retrieve_body( $response ), true );

JavaScript (fetch) #

const response = await fetch('https://yoursite.com/wp-json/scd/v1/campaigns', {
    headers: {
        'Authorization': 'Basic ' + btoa(consumerKey + ':' + consumerSecret),
    },
});
const data = await response.json();

Python #

import requests
from requests.auth import HTTPBasicAuth

response = requests.get(
    'https://yoursite.com/wp-json/scd/v1/campaigns',
    auth=HTTPBasicAuth(consumer_key, consumer_secret)
)
campaigns = response.json()
Updated on February 14, 2026

What are your Feelings

  • Happy
  • Normal
  • Sad

Share This Article :

  • Facebook
  • X
  • LinkedIn
  • Pinterest
Hooks and Filters ReferenceCustom Discount Integration
Table of Contents
  • API Overview
    • Base URL
    • Authentication
    • Authentication Methods
    • Example Authentication
  • Endpoints
    • Campaigns
      • List Campaigns
      • Get Single Campaign
      • Create Campaign
      • Update Campaign
      • Delete Campaign
      • Campaign Actions
    • Analytics
      • Get Analytics Summary
      • Get Campaign Analytics
    • Products
      • Get Campaign Products
      • Check Product Discount
    • Settings
      • Get Settings
      • Update Settings
  • Error Handling
    • Error Response Format
    • Common Error Codes
  • Rate Limiting
    • Limits
    • Rate Limit Headers
  • Webhooks
    • Available Webhook Events
    • Webhook Payload
  • Code Examples
    • PHP with WordPress HTTP API
    • JavaScript (fetch)
    • Python
Newsletter

Insights that grow your business

Join thousands of WooCommerce store owners who get actionable tips, plugin updates, and industry news every week — plus 10% off either of our plugins as a welcome.

We respect your privacy. Unsubscribe at any time.

10% off welcome gift — A code for either plugin, on us
Weekly updates — Fresh content every Tuesday
Exclusive content — Tips you won't find on our blog
Early access — Be first to know about new plugins
Webstepper
Weekly WooCommerce Tips
Just now
This week: 5 proven strategies to boost your average order value using smart discount campaigns...
10% off inside
Webstepper

Tools for store owners who'd rather grow than grind.

Simple, powerful plugins that help WooCommerce store owners sell more — without the learning curve.

Products

  • Smart Cycle Discounts
  • TrustLens
  • Discount Calculator
  • Sale Calendar

Company

  • About Us
  • Blog
  • Contact
  • Affiliates
  • Log In

Resources

  • Help Center
  • Guides
  • Verify a report
  • Affiliate Program
  • Become a Partner

Questions? We actually answer.

Real humans, real help. No bots, no runaround. Usually within a few hours.

Get in touch
Operated by Setmood LLC · 7901 4th St N, St Petersburg, FL 33702 · United States

© 2026 Webstepper. All rights reserved.

Privacy Terms Refunds
Visa Mastercard PayPal Apple Pay Google Pay & more
Limited Time Offer

Get 10% off
Smart Cycle Discounts or TrustLens

Drop your email and we’ll send you a unique, single-use code — works on either plugin at checkout. New customers, first payment.

23 hours
:
59 minutes
:
59 seconds

No spam. Unsubscribe anytime.

  • WordPress
    Back
    Products
    Smart Cycle DiscountsDiscount automation › TrustLensCustomer trust intel › Cycle AI AIPlain-English campaigns ›
    New pluginComing soon
    Resources & toolsDocs, pricing, support ›
    Smart Cycle Discounts

    Smart Cycle Discounts

    Automate WooCommerce discount campaigns — schedule, target, and measure.

    62%
    Free Pro $59 5 discount types Recurring
    Jump into the page
    How it works Capabilities Promo codes Pricing
    Docs
    Getting started Discount types Scheduling
    Explore Smart Cycle Discounts → Changelog
    TrustLens

    TrustLens

    Customer trust intelligence — score buyers, spot abuse, protect revenue.

    Trust 86
    Free Pro $79 6 segments Abuse detection
    Jump into the page
    How it works Detection Outcomes Pricing
    Docs
    Trust scoring Detection modules Card-testing defense
    Explore TrustLens → Verify a report Changelog

    Cycle AI inside Smart Cycle Discounts

    Describe a sale in plain English — Cycle AI builds the whole campaign.

    “20% off hoodies this weekend”
    Included in Pro Natural language Catalog-aware
    See it work

    Type a sentence, get a ready-to-launch discount campaign that already understands your products, prices, and schedule.

    Live demo How it works
    Meet Cycle AI →

    A new plugin Coming soon

    Something is loading in the lab. Join the list to get the reveal first.

    Notify me on launch →

    Resources & tools

    Everything around the plugins — docs, free tools, and help.

    Learn
    Documentation Pricing & bundle Support
    Free tools
    Discount Calculator Sale Calendar
    Stay current
    SCD changelog TrustLens changelog
    Compare all plans →
    Secure checkout WordPress.org 14-day refund View pricing →
  • Affiliate
    Back
    Program
    OverviewHow the program works How it works4 steps from apply to earn Commission details30% · 60-day cookie · recurring
    Get started
    Apply nowOpen Takes ~2 minutes Earnings calculatorEstimate your monthly income FAQPayouts, cookies, renewals
    Resources
    Brand kitLogos, banners, copy, social PlaybookTactics that actually convert FTC disclosureHow to disclose properly Affiliate termsFull program agreement Contact teamOpen the contact form
    Earn 30% recurring on every saleFree to join · 60-day cookie · monthly PayPal payouts Apply now
  • Blog
  • DOCS
    Back
    Docs & resources

    Guides, references, and answers for every Webstepper plugin.

    Smart Cycle DiscountsAutomated WooCommerce discount campaigns
    Getting started› Discount types› Cycle AI›
    TrustLensCustomer trust & fraud intelligence
    Trust scoring› Detection modules› Card-testing defense›
    Docs home Guides FAQ Pricing Support
    WordPress tools that solve real problems
  • Contact Us
  • About
    Back
    Company

    Our Story

    Founded 2020

    Built by store owners, for store owners. We make WordPress tools that solve real problems.

    Learn more
    Built from experienceTools we use ourselves
    Time is preciousSimple, intuitive UX
    Real supportTalk to the founders
    Legal & contact
    Contact us Privacy policy Terms of service Refund policy
    14-day money-backNo questions asked
We use cookies to improve your experience on our website. By browsing this website, you agree to our use of cookies.
More info More info Accept