The Provisioning API provides a mechanism for a real-time integration with 3rd party systems, including softswitches, gateways and CRM systems. The mechanism calls pre-defined handlers on an occurrence of specific events in the system. The handlers are allowed to modify data, allow or forbid the action or simply process given event.
Prior to that, VCS Core API and Management API provide utilities needed to receive requests from external systems. Now, you can configure VCS billing platform to send requests to your 3rd party system.
For example, you can monitor the client's balance status via this functionality. Thus, when the client's balance is below zero, you can configure that the billing will send to an external system a notification in order to avoid any disruptions to your organization current processes.
The full list of Provisioning API parameters matches with CoreAPI and they are available upon an individual request of your current clients.
There are two types of handlers that can be used:
- HTTP scripts, called via POST requests (used in most cases)
- Local server scripts, called locally on the server (used in very specific cases)
The handlers can be called at two different stages of the event:
- After Action - in this case, you simply handle the action. In most cases, if you don't need to modify data, we recommend using handlers with "after" type of event.
- Before Action - in this case, you can modify incoming data and push it back to the VCS or forbid the action.
Best practice example
Here there is an example based on http:// handler usage.
2. Open the Provisioning section and start to create a handler.
- Specify the name, type and status.
- Find "Event" field. Here, select "After" and "Clients Create" event from the drop-down list.
- Find "Task" field in this form. Here, indicate "http://" type and determine the port and method, for example, 188.8.131.52:5000/api.
- Click "Apply".
Find below an example of the http:// handler:
from flask import Flask, request
app = Flask(__name__)
@app.route("/api", methods=['GET', 'POST'])
data = json.loads(request.data)
if __name__ == "__main__":
The Provisioning API supports the following list of events:
- custom fields update
- balance became >=0
- balance became <=0
If you need to process some of the actions that are not listed here, contact our support for a feature request.
For more information about configuring and monitoring of hooks for Provisioning API, visit our User Guide → System →Provisioning API.