Docs for all releases
Page History
...
Panel | ||
---|---|---|
| ||
|
The Provisioning API provides provides a mechanism for real-time integration with 3rd party systems, including softswitches, gateways, and CRM systems. The mechanism calls pre-defined handlers on the occurrence of specific events in the system.
While Core API and Management API sub-systems answer requests, Provisioning API pushes data as soon as an event occurs. For For example, you can monitor the client's balance status via this functionality. Thus, when when the client's balance is below zero, you can configure the system to send a notification to an external system to avoid any disruptions to your organization's current processes.
Handlers
A typical handler should be configured as is HTTPS or HTTP with an URL of the script, which will get HTTP POST requests about each event occurrence.
...
Panel | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Best practice example There is an example based on https://hostname/handler-endpoint usage. Open the Provisioning section and start creating a handler.
Find an example of the http://handler below:
|
Event Payload
Structure
Within notification, the handler will be called with a JSON-formatted data payload. The payload has the following structure:
event
dt
- the date-time of the event in the ISO8601 format;events_id
- ID of the event occurred (helpful, when multiple events are handled by the same handler);object_id
- the entity, to which the event happened;
data
- data related to the specific event (check Payload Samples below)
Supported Events
Please note that some Payload Samples below contain reduced payload as they fully replicate the data structures within CoreAPI. Please refer to the respective documentation within the system interface in the Integration/CoreAPI Docs section for full format of the structure.
Event ID | Payload Sample |
---|---|
Clients Management | |
The client has been created |
|
The client's details have been updated |
|
The client has been archived |
|
The client has been completely deleted Not to be confused with archived |
|
The client |
clients.alance_notzero
The client has been
clients.custom_fields.update
The client has been
Accounts Management
clients.accounts.create
The client has been created
clients.accounts.update
The client has been created
clients.accounts.delete
The client has been created
Subscriptions Management
clients.subscriptions.assign
The client has been created
clients.subscriptions.activate
The client has been created
clients.subscriptions.deactivate
The client has been created
clients.subscriptions.renew
The client has been created
clients.subscriptions.close
The client has been created
Email Rates Manager Management
email_rates_manager.import
The client has been created
{
"data":
{
"mailbox":
{
"login": "[email protected]",
"host": "imap.gmail.com"
},
"message":
{
"from": "Sender <[email protected]>",
"id": "77798",
"subject": "Subject of the message"
},
"queue":
{
<IMPORT_QUEUE>
}
's balance became <=0 |
| ||||||||||
The client's balance became > 0 |
| ||||||||||
The client's Custom Field has been updated |
| ||||||||||
Accounts Management | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
The account has been created |
| ||||||||||
The account's details have been updated |
| ||||||||||
The account has been completely deleted |
| ||||||||||
Subscriptions Management | |||||||||||
The subscription has been assigned |
| ||||||||||
The subscription has been activated |
| ||||||||||
The subscription has been deactivated |
| ||||||||||
The subscription has been renewed |
| ||||||||||
The subscription has been closed |
| ||||||||||
Email Rates Manager | |||||||||||
The import file has been prepared for further processing by the task specified in the Provisioning API handler settings, and the import process was stopped | { "data": { "mailbox": { "login": "[email protected]", "host": "imap.gmail.com" }, "message": { "from": "Sender <[email protected]>", "id": "77798", "subject": "Subject of the message" }, "queue": { <IMPORT_QUEUE> (see importd.process_success method for extra details) } }, "event": { "dt": "2022-01-24T15:44:47.216756+00:00", "events_id": "email_rates_manager.import", "object_id": "77798" } } | ||||||||||
No Rate Tables match received email |
| ||||||||||
No attachments have been identified | { "data": { "credentials": { "login": "[email protected]", "host": "imap.gmail.com" }, "message": { "from": "Sender <[email protected]>", "id": "77798", "subject": "Subject of the message" }, "rate_tables": [ { "id": 74, "name": "Rate Table A" }, { "id": 7, "name": "Rate TAble B" } ] }, "event": { "dt": "2022-01-24T15:44:47.216756+00:00", "events_id": "email_rates_manager.no_attachments", "object_id": "77798" } } | ||||||||||
The file processing error | { "data": { "error": { "code": "incorrect-file-ext", "message": "Can't process file: /opt/jerasoft/vcs-data/files/xJv/xJv5aMoqMKoNK1s2hwlJ8ik4bF3aiMVi (test_import_9999.zip). File is not a zip file" }, "credentials": { "login": "[email protected]", "host": "imap.gmail.com" }, "message": { "from": "Sender <[email protected]>", "id": "77798", "subject": "Subject of the message" }, "rate_tables": [ { "id": 74, "name": "Rate Table A" }, { "id": 7, "name": "Rate TAble B" } ] }, "event": { "dt": "2022-01-24T15:44:47.216756+00:00", "events_id": "email_rates_manager.no_attachments", "object_id": "77798" } } | ||||||||||
Import Manager | |||||||||||
The import attempt was successful |
"main": {
"queue": {
| ||||||||||
The import attempt has failed | { "data": { "main": <IMPORT_CONFIG> "queue": <IMPORT_QUEUE> |
}, "event": { "dt": "2022- |
07- |
14T13: |
12: |
02. |
918034+00:00", "events_id": " |
importd.process_failed", "object_id": " |
62" |
} } |
email_rates_manager.rate_tables_no_match
Charges | |
---|---|
The Transaction of Type Charge |
has been created |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
| |
The Transaction of Type Charge has been removed |
|
|
|
|
|
|
|
|
email_rates_manager.no_attachments
The Transaction of Type Charge has been edited |
{ |
"data": " |
id": 2220, |
"c_dt": "2022-07-06 00:00:00+0000", "tags": [], " |
type": " |
charge", "notes": "t_1", " |
taxes": |
null, "amount": 10, ... }, |
" |
event": |
{ |
" |
dt": " |
2022-07-22T11:41:27.298884+00:00", |
"events_id": " |
accounting.charges.update", |
" |
object_id": " |
2220" |
} } |
"rate_tables":
[
{
"id": 74,
"name": "Rate Table A"
},
{
"id": 7,
"name": "Rate TAble B"
}
]
},
"event":
{
Payments | |
---|---|
The Transaction of Type Payment has been created | { "data": "id": 2223, "c_dt": "2022-07-14 00:00:00+0000", "tags": [], "type": "payment", "notes": "test |
", " |
taxes": |
null, "amount": 1, " |
status": " |
approved", |
... } |
email_rates_manager.file_processing_error
The client has been created
{
"data
, "event": |
"dt": "2022-07-22T11:49:41.212852+00:00", |
"code
"events_id": " |
accounting.payments.create", |
" |
object_id": "2223" } } | |
The Transaction of Type Payment has been removed | { "data": [], "event": "dt": "2022-07-22T11:49:53.178009+00:00 |
},
"credentials":
{
"login": "[email protected]
", |
" |
events_id": " |
accounting. |
payments. |
delete" |
}
, " |
object_id": |
{
"from": "Sender <[email protected]>",
"2223" } } | |
The Transaction of Type Payment has been edited | { "data": |
"id": |
2223, |
" |
c_dt": " |
}
2022-07-14 00:00:00+0000", " |
tags": |
[
{
"id": 74
[], |
" |
type": " |
},
{
payment", " |
notes": |
"test", |
" |
taxes": |
null, |
"amount": 10, |
... }, "event": "dt": "2022- |
07- |
22T11: |
49: |
45. |
263719+00:00", "events_id": " |
accounting.payments.update", "object_id": " |
2223" } } |
Import Manager Management
importd.process_success
The client has been created
importd.process_failed
Panel | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Tip
|