Changes

no edit summary
Line 391: Line 391:  
Returns Array.
 
Returns Array.
   −
Return promotion information by code
+
Returns an object with detailed information about promotion by promotion code. You can get promotion code
 +
using <code>[[Catalogue#getPromotionList|getPromotionList]]</code> API method. If promotion record with specified
 +
code not found then method returns an empty array (an empty object). If [[Plugins#Simply Smart Promotions|Simply Smart Promotions plugin]]
 +
not enabled then method returns an error with code -32001 (Plugin is not activated). Use
 +
<code>[[#isPluginActivated|isPluginActivated('promo')]]</code> API method call to check if plugin enabled.See [[#getPromotionList response|example]] of <code>getPromotionList</code> API method response. Please note that
 +
response contains a list of services for wich promotion discount can be applied (<code>service_ids</code> key).
      Line 845: Line 850:  
     "allow_event_breaktime_break": "0"
 
     "allow_event_breaktime_break": "0"
 
   }
 
   }
 +
 +
----
 +
 +
====getPluginPromoInfoByCode response====
 +
 +
  {
 +
    "id": "1",
 +
    "title": "[service\/services] with [discount]% discount!",
 +
    "code": "yvuvugum",
 +
    "description": "We are offering [service\/services] with an amazing [discount]% discount! We are running this deal for a limited time only.",
 +
    "discount": "99.9999",
 +
    "start_date": "2015-12-23",
 +
    "expired_date": "2016-01-23",
 +
    "sheduler_start_date": "2015-12-23",
 +
    "sheduler_end_date": "2015-12-31",
 +
    "sheduler_start_time": "09:00:00",
 +
    "sheduler_end_time": "22:30:00",
 +
    "allow_usage_count": "20",
 +
    "fineprint_text": "Deal is limited for new clients only. Reward is claimable [client_claim_times_number] times per client. Deal is only claimable for the locations specified. Deal is cannot be combined with any other promotion. Must be redeemed prior to the expiration date shown on the deal.",
 +
    "redemption_text": "Present your confirmation code when you want to redeem your deal. You may either to print off your confirmation email or show your confirmation code by loggin into Simplybook on your mobile phone\/Pc.\r\n[promocode]\r\n[discount]\r\n[reward]\r\n[referal_qty]",
 +
    "headline": "[service\/services] with [discount]% discount!",
 +
    "image": null,
 +
    "allow_customer_count": "1",
 +
    "show_in_catalogue": "1",
 +
    "status": "active",
 +
    "plugin_promo_message_id": "1",
 +
    "common_promotion_id": "132",
 +
    "service_ids": ["1"]
 +
  }
 +
 +
<code>service_ids</code> contains a list of services for wich promotion discount can be applied.