Table of Contents
- Get Subscription Information
- Get Subscription Listing
- Add New Subscription
- Update Subscription
- Error Codes
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 haveapplication/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 haveapplication/json
to notify that the body content is in JSON.
Raw Body JSON Payload Explanation:
Object/Key | Data Type | Required | Description |
page | Number | Optional | Data return requested for the Page |
page_length | Number | Optional | Total Records to include in a page |
from_subxn_dt | Date | Optional | Subscription Start Date Filter |
to_subxn_dt | Date | Optional | Join Subscription Date Filter |
from_expiry_dt | Date | Optional | Subscription Expiry Start Date Filter |
to_expiry_dt | Date | Optional | Join Subscription Expiry Date Filter |
search_by | String | Optional | Required 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_string | String | Optional | Required with search_by. |
order_by | String | Optional | Database field names. |
order_qualify | String | Optional | Default “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 haveapplication/json
to notify that the body content is in JSON.
Raw Body JSON Payload Explanation:
Object/Key | Data Type | Required | Description |
customer_id | String | Required | Customer ID |
plan_id | String | Required | Plan ID |
subscription | Object | Required | To define Subscription Settings |
allow_meeting_overlap | Boolean | Optional | To allow schedule overlapped meeting |
Payment_mode | String | Optional | F for offline O for online (default Value F) |
subxn_date | String | Required | Format: YYYY-MM-DD |
No_of_license | Number | Required | No. of user-license purchased |
unit_price | Float | Optional | Unit User License Price |
po | String | Optional |
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 haveapplication/json
to notify that the body content is in JSON.
Raw Body JSON Payload Explanation:
Object/Key | Data Type | Required | Description |
subscription | Object | Optional | To define Subscription Settings |
status | String | Optional | Enum: 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 Code | Description |
---|---|
1201 | Customer ID is required |
1202 | Customer ID must be a valid string |
1211 | Plan ID is required |
1212 | Plan ID must be a valid string |
1220 | Invalid Subscription ID used, use a valid ID |
1221 | The subscription field is required |
1228 | Allow meeting to be overlapped with other meetings : Bool True or False |
1229 | The subscription must be an array |
1230 | Subscription status must be a valid string |
1231 | Subscription status invalid |
1232 | Prepaid is a boolean (True: Prepaid Subscription) |
1234 | Customer ID invalid, use a valid customer ID |
1254 | Number of user licenses must be an integer |
1256 | User license price must be stated. Minimum: 1, Maximum: 100000 |
1260 | License is not assigned, please assign license |
1261 | License already assigned |
1325 | Plan ID is invalid, use a valid plan id |
1326 | Room type is required |
1329 | The subscription date must be in future |