Request parameters

  • tenant - (mandatory) - to which tenant/system to connect, e.g. "zegoal"
  • account_id - (conditional) - AccountID for which LC will be applied
  • account_name - (conditional) - Account Name
  • account_code - (conditional) - Account Code
  • lc_template - (mandatory) - LC template which will be applied
  • skip_lookup_account - (optional; default false) - is used only when account_id is provided; skips extra call to DB for Account verification
  • reason - (optional) - string that will be return in notification.

One of conditional parameters: account_id, or account_code, or account_name - is mandatory to be provided.


Доступные шаблоны:

"lc_template": "LC_Trial",
      "lc_rules": [
        {
          "clean": 1,
          "lc_state": "Suspended",
          "lc_offset": "+15day"
        },
        {
          "lc_state": "Terminated",
          "lc_offset": "+"& (15 + 60) &"day"
        }
CODE


 "lc_template": "LC_Prepaid_Suspend",
      "lc_rules": [
        {
          "clean": 1,
          "lc_state": "Suspended"
        },
        {
          "lc_state": "Terminated",
          "lc_offset": "+60day"
CODE


Response parameters

Only result of ordering. You can get Invoice information by API GetInvoiceData.


Request:

{
 		 "tenant": "zegoal",
         "lc_template": "LC_Trial",
         "account_name": "abonent1",
         "account_id": 1,
         "account_code": "code1",
 		 "reason": "STOP subscription"
}
CODE


Response (success):

{
   "processing_result":    {
      "text": "success",
      "template": "ok",
      "status": "ok",
      "code": 0
   },
   "processing_date": "2020-04-02 15:35:23 +03:00",
   "ApplyLCTemplate": {
      "response": {
         "tenant": "zegoal",
         "lc_template": "LC_Trial",
         "lc": [
            {
               "lc_to": "2020-04-17 15:35:17",
               "lc_status": "Active",
               "lc_from": "2020-03-24 12:36:49",
               "is_current": true
            },
            {
               "lc_to": "2020-06-16 15:35:21",
               "lc_status": "Suspended",
               "lc_from": "2020-04-17 15:35:17",
               "is_current": false
            },
            {
               "lc_to": "",
               "lc_status": "Terminated",
               "lc_from": "2020-06-16 15:35:21",
               "is_current": false
            }
         ],
         "account_name": "abonent1",
         "account_id": 1,
         "account_code": "code1"
      },
      "request": {
         "tenant": "zegoal",
         "lc_template": "LC_Trial",
         "account_name": "abonent1",
         "account_id": 1,
         "account_code": "code1",
		 "reason": "STOP subscription"
      }
   }
}
CODE