PHP code example of remp / crm-coupon-module

1. Go to this page and download the library: Download remp/crm-coupon-module library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

remp / crm-coupon-module example snippets

shell
curl -X POST \
  http://crm.press/api/v1/coupon/activate \
  -H 'Authorization: Bearer XXX' \
  -H 'Content-Type: application/json' \
  -d '{
    "code": "123456-789ABC-DEFG",
    "notifyUser": true
  }'
json5
{
    "coupon_id": 1234567,
    "coupon_type": "new-user-promo",
    "subscription_id": 1234345,
    "subscription_type_id": 123,
    "subscription_type_name": "1 month promo subscription",
    "subscription_start_time": "2020-07-02T11:30:00+00:00", // String; RFC3339 encoded start time
    "subscription_end_time": "2020-08-02T11:30:00+00:00" // String; RFC3339 encoded end time
}