Table of Contents

Get Subscription Information

This API returns information for a given Subscription ID.

  • API Route: https://api.enablex.io/ucaas/v1/subscriptions/{{$SUBSCRIPTION_ID}}
  • HTTP Request: GET
  • Role Based Accessibility:
    • Reseller Admin: Accesses Subscription of any Customer under Reseller
    • EnableX Admin: Accesses Subscription of any Customer under EnableX

Headers Explanation:

  • Content-Type: To have application/json to notify that the body content is in JSON.

Response Example:

{
  "result": 1,
  "subscription": {
    "subscription_id": "String",
    "customer_id": "String",
    "plan_id": "String",
    "app_const": "String",
    "plan_name": "String",
    "settings": {
      "recording": "Boolean",
      "audio_only": "Boolean",
      "audio_video": "Boolean",
      "participants": "Integer",
      "duration": "Integer",
      "stream_qlty": "String",
      "record_qlty": "String"
    },
    "subscription": {
      "base": "String",
      "base_ex": "String",
      "trial": "Boolean",
      "allow_meeting_overlap": "Boolean",
      "prepaid": "Boolean",
      "postpaid": "Boolean",
      "subsxn_date": "Date",
      "expiry_date": "String",
      "currency": "String",
      "status": "String",
      "status_ex": "String"
    },
    "features": {
      "screenshare": "Boolean",
      "whiteboard": "Boolean",
      "livestreaming": "Boolean"
    },
    "user_license": {
      "qty": "Number",
      "unit_price": {
        "currency": "Float"
      },
      "total_price": {
        "currency": "Float"
      }
    },
    "connect": {
      "price": {
        "currency": "Float"
      }
    },
    "records": {
      "data_unit": "Integer",
      "price": {
        "currency": "Float"
      }
    },
    "download": {
      "data_unit": "Integer",
      "price": {
        "currency": "Float"
      }
    },
    "storage": {
      "data_unit": "Integer",
      "price": {
        "currency": "Float"
      }
    }
  }
}

Get Subscription Listing

This API is used to get listing of all Subscriptions.

  • API Route: https://api.enablex.io/ucaas/v1/subscriptions?page={{$PAGE_NUM}}
  • HTTP Request: GET
  • Role Based Accessibility:
    • Reseller Admin: Accesses Subscription of any Customer under Reseller
    • EnableX Admin: Accesses Subscription of any Customer under EnableX
    • Reseller Customer, EnableX Direct Customer: Access own Subscription Information only

Headers Explanation:

  • Content-Type: To have application/json to notify that the body content is in JSON.

Raw Body JSON Payload Explanation:

Object/KeyData TypeRequiredDescription
pageNumberOptionalData return requested for the Page
page_lengthNumberOptionalTotal Records to include in a page
from_subxn_dtDateOptionalSubscription Start Date Filter
to_subxn_dtDateOptionalJoin Subscription Date Filter
from_expiry_dtDateOptionalSubscription Expiry Start Date Filter
to_expiry_dtDateOptionalJoin Subscription Expiry Date Filter
search_byStringOptionalRequired if “search_string” is used.
Use any of the enumerated values:
o customer_id
o app: Application Constants.
Enum: wb, vc (wb=Webinar, VC=Meeting)
o plan_id
o status: Status codes A, X (A=Active, X=Expired)
o base: Selling Base,
Code: UL, UB (UL=User License, UB=Usage)
search_stringStringOptionalRequired with search_by.
order_byStringOptionalDatabase field names.
order_qualifyStringOptionalDefault “asc”. Enumerated values: asc, desc.

Response Example:

{
  "result": 1,
  "search": {
    "page": "Number",
    "page_length": "Number",
    "customer_id": "Number",
    "from_subxn_dt": "Date",
    "to_subxn_dt": "Date",
    "from_ex[oru_dt": "Date",
    "to_expiry_dt": "Date",
    "search_by": "String",
    "search_string": "String",
    "order_by": "String",
    "order_qualify": "String"
  },
  "subscriptions": [
    {
      "subscription_id": "String",
      "customer_id": "String",
      "plan_id": "String",
      "app_const": "String",
      "plan_name": "String",
      "settings": {
        "recording": "Boolean",
        "audio_only": "Boolean",
        "audio_video": "Boolean",
        "participants": "Integer",
        "duration": "Integer",
        "stream_qlty": "String",
        "record_qlty": "String"
      },
      "subscription": {
        "base": "String",
        "base_ex": "String",
        "trial": "Boolean",
        "allow_meeting_overlap": "Boolean",
        "prepaid": "Boolean",
        "postpaid": "Boolean",
        "subsxn_date": "Date",
        "expiry_date": "String",
        "currency": "String",
        "status": "String",
        "status_ex": "String"
      },
      "features": {
        "screenshare": "Boolean",
        "whiteboard": "Boolean",
        "livestreaming": "Boolean"
      },
      "user_license": {
        "qty": "Number",
        "unit_price": {
          "currency": "Float"
        },
        "total_price": {
          "currency": "Float"
        }
      },
      "connect": {
        "price": {
          "currency": "Float"
        }
      },
      "records": {
        "data_unit": "Integer",
        "price": {
          "currency": "Float"
        }
      },
      "download": {
        "data_unit": "Integer",
        "price": {
          "currency": "Float"
        }
      },
      "storage": {
        "data_unit": "Integer",
        "price": {
          "currency": "Float"
        }
      }
    }
  ]
} 

Add New Subscription

This API is used to add a new Customer.

  • API Route: https://api.enablex.io/ucaas/v1/subscriptions
  • HTTP Request: POST
  • Role Based Accessibility:
    • EnableX Admin: Accesses Subscription of any Customer under EnableX

Request Example:

{
  "customer_id": "String",
  "plan_id": "String",
  "room_type": "String",
  "title": "String",
  "subscription": {
    "unit_price": "float",
    "no_of_license": "Number",
    "allow_meeting_overlap": "Boolean",
    "payment_cycle": "String",
    "payment_mode": "String",
    "po": "String",
    "prepaid": "Boolean",
    "subsxn_date": "Date"
  }
}

Headers Explanation:

  • Content-Type: To have application/json to notify that the body content is in JSON.

Raw Body JSON Payload Explanation:

Object/KeyData TypeRequiredDescription
customer_idStringRequiredCustomer ID
plan_idStringRequiredPlan ID
subscriptionObjectRequiredTo define Subscription Settings
allow_meeting_overlapBooleanOptionalTo allow schedule overlapped meeting
Payment_modeStringOptionalF for offline O for online (default Value F)
subxn_dateStringRequiredFormat: YYYY-MM-DD
No_of_licenseNumberRequiredNo. of user-license purchased
unit_priceFloatOptionalUnit User License Price
poStringOptionalPurchase Order

Response Example:

{
  "result": 1,
  "msg": "#customer_name has subscribed to Plan: #plan_name (For #app). User License: #qty",
  "subscription": {
    "subscription_id": "String",
    "customer_id": "String",
    "customer_name": "String",
    "plan_id": "String",
    "plan_name": "String",
    "qty": "Number"
  }
}

Update Subscription

This API is used to update Plan Subscription Information. All Keys in JSON payload are optional. Use only the one which you want to edit.

  • API Route: https://api.enablex.io/ucaas/v1/subscriptions/{{$SUBSCRIPTION_ID}}
  • HTTP Request: PATCH
  • Role Based Accessibility:
    • EnableX Admin: Accesses Subscription of any Customer under EnableX

Request Example:

{
      “subscription”: {
“status”: “String”
      }
}

Headers Explanation:

  • Content-Type: To have application/json to notify that the body content is in JSON.

Raw Body JSON Payload Explanation:

Object/KeyData TypeRequiredDescription
subscriptionObjectOptionalTo define Subscription Settings
statusStringOptionalEnum: A, X, S (A=Active, X=Expired, S=Suspended)

Response Example:

{
"result": 1,
"msg": "Subscription Information for #customer_name has updated for Plan: #plan_name (For #app)",
"subscription": {
"subscription_id": "String",
"customer_id": "String",
"customer_name": "String",
"plan_id": "String",
"plan_name": "String",
"qty": "Number"
}
}

Error Codes

Error CodeDescription
1201Customer ID is required
1202Customer ID must be a valid string
1211Plan ID is required
1212Plan ID must be a valid string
1220Invalid Subscription ID used, use a valid ID
1221The subscription field is required
1228Allow meeting to be overlapped with other meetings : Bool True or False
1229The subscription must be an array
1230Subscription status must be a valid string
1231Subscription status invalid
1232Prepaid is a boolean (True: Prepaid Subscription)
1234Customer ID invalid, use a valid customer ID
1254Number of user licenses must be an integer
1256User license price must be stated. Minimum: 1, Maximum: 100000
1260License is not assigned, please assign license
1261License already assigned
1325Plan ID is invalid, use a valid plan id
1326Room type is required
1329The subscription date must be in future