Change coupon status - celdotro/marketplace GitHub Wiki

About

  • Change coupon status

Class

celmarket\Campaigns\CampaignsEdit

Method

toggleCouponStatus

API

  • method: Coupons
  • action: toggleCouponStatus

Parameters

  • campaignId = campaign's ID
  • couponId = coupon's ID
  • status = new status

Response

An object with the following attributes

  • success = 1 -> operation was successfully executed

Example - PHP

https://github.com/celdotro/marketplace_examples/blob/master/Campaigns/13.toggleCouponStatus.php

Example - JSON

{
  "request": {
    "campaignId": 1,
    "couponId": 1,
    "status": 1
  },
  
  "response": {
    "success": 1
  }
}
⚠️ **GitHub.com Fallback** ⚠️