Docs for all releases
Page History
...
Panel | ||
---|---|---|
| ||
|
The Provisioning API provides a provides a mechanism for real-time integration with 3rd with 3rd party systems, including softswitches, gateways, and CRM systems. The The mechanism calls pre-defined handlers on an the 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, While JeraSoft Billing Core API and Management API provide utilities needed answer to receive requests from external systems. Now, you can configure the JeraSoft Billing platform to send requests to your 3rd party system.
, Provisioning API pushes data as soon as an event occurs. 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 to avoid any disruptions to your organization's current processes.
...
...
The full list of Provisioning API parameters matches with CoreAPI and they are available upon individual request of your current clients.
Handlers
...
Handlers
A typical handler is HTTPS or HTTP (called via POST requests
...
)
...
. Local server scripts
...
(called locally on the server
...
) are extremely rare cases used mainly by the JeraSoft team.
Panel | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Best practice example Here There is an example based on http https://hostname/handler-endpoint usage. 1.Open the Provisioning section and start creating a handler.
Find an example of the http://handler below:
|
Supported Events
The Provisioning API supports the following list of events:
- clients.create
- clients.update
- clients.delete
- clients.archive
- clients.custom_fields.update
- clients.balance_notzero
- clients.balance_zero
- clients.accounts.create
- clients.accounts.update
- clients.accounts.delete
- clients.subscriptions.assign
- clients.subscriptions.activate
- clients.subscriptions.deactivate
- clients.subscriptions.renew
- clients.subscriptions.close
Payload Structure
The "event" value contains the following data:
dt
: the date-time of the event in the ISO8601 format;events_id
: the event, which happened per se;object_id
: the entity, to which the event happened.
Code Block |
---|
{
"event": {
"dt": "2000-01-01T00:00:00+00:00",
"events_id": "clients.update",
"object_id": 12
},
"data": {
"id": 12,
"field": "some-value"
}
} |
The clients.accounts.delete
, clients.archive
, clients.balance_notzero
, clients.balance_zero
, and clients.delete
events send empty data: {} (as we send the event info, there is no need to duplicate it in data).
Info | ||
---|---|---|
| ||
The |
Payload Details
Clients
Actions:
- create
Code Block |
---|
{
"event": {
"dt": "2000-01-01T00:00:00+00:00",
"events_id": "clients.create",
"object_id": 12
},
"data": {
"id": 12,
"name": "Customer A",
"companies_id": 67,
"currencies_id": 10,
...
}
} |
- update
Code Block |
---|
...
{
"event": {
"dt": "2000-01-01T00:00:00+00:00",
"events_id": "clients.update",
"object_id": 12
},
"data": {
"id": 12,
"name": "My changed name"
}
} |
- delete
Code Block |
---|
{
"event": {
"dt": "2000-01-01T00:00:00+00:00",
"events_id": "clients.delete",
"object_id": 12
},
"data": {}
} |
- archive
Code Block |
---|
{
"event": {
"dt": "2000-01-01T00:00:00+00:00",
"events_id": "clients.archive",
"object_id": 12
},
"data": {}
} |
- custom fields update
Code Block |
---|
{
"event": {
"dt": "2000-01-01T00:00:00+00:00",
"events_id": "clients.custom_fields.update",
"object_id": 12
},
"data": {
"id": 12,
"custom-field-name": "custom-field-value"
}
} |
- balance became >=0
Code Block |
---|
{
"event": {
"dt": "2000-01-01T00:00:00+00:00",
"events_id": "clients.balance_notzero",
"object_id": 12
},
"data": {}
} |
- balance became <=0
Code Block |
---|
{
"event": {
"dt": "2000-01-01T00:00:00+00:00",
"events_id": "clients.balance_zero",
"object_id": 12
},
"data": {}
} |
Accounts
Actions:
- create
Code Block |
---|
{
"event": {
"dt": "2000-01-01T00:00:00+00:00",
"events_id": "clients.accounts.create",
"object_id": 12
},
"data": {
"id": 12,
"clients_id": 7,
"name": "My account",
"auth_type": "name",
...
}
} |
- update
Code Block |
---|
{
"event": {
"dt": "2000-01-01T00:00:00+00:00",
"events_id": "clients.accounts.update",
"object_id": 12
},
"data": {
"id": 12,
"name": "My changed account"
}
} |
- delete
Code Block |
---|
{
"event": {
"dt": "2000-01-01T00:00:00+00:00",
"events_id": "clients.accounts.delete",
"object_id": 12
},
"data": {}
} |
Subscriptions
Actions:
- assign
Code Block |
---|
{
"event": {
"dt": "2000-01-01T00:00:00+00:00",
"events_id": "clients.subscriptions.assign",
"object_id": 12
},
"data": {
"id": 12,
"clients_id": 34,
"packages_id": 56,
"stop_dt": "2023-01-01T00:00:00+00:00",
...
}
} |
- activate
Code Block |
---|
{
"event": {
"dt": "2000-01-01T00:00:00+00:00",
"events_id": "clients.subscriptions.activate",
"object_id": 12
},
"data": {
"id": 12,
"clients_id": 34,
"packages_id": 56,
"stop_dt": "2023-01-01T00:00:00+00:00",
"condition": "activated",
...
}
} |
- deactivate
Code Block |
---|
{
"event": {
"dt": "2000-01-01T00:00:00+00:00",
"events_id": "clients.subscriptions.deactivate",
"object_id": 12
},
"data": {
"id": 12,
"clients_id": 34,
"packages_id": 56,
"stop_dt": "2023-01-01T00:00:00+00:00",
"condition": "deactivated",
...
}
} |
- renew
Code Block |
---|
{
"event": {
"dt": "2000-01-01T00:00:00+00:00",
"events_id": "clients.subscriptions.renew",
"object_id": 12
},
"data": {
"id": 12,
"clients_id": 34,
"packages_id": 56,
"stop_dt": "2023-01-01T00:00:00+00:00",
"renew_count": 1,
...
}
} |
- close
Code Block |
---|
{
"event": {
"dt": "2000-01-01T00:00:00+00:00",
"events_id": "clients.subscriptions.close",
"object_id": 12
},
"data": {
"id": 12,
"clients_id": 34,
"packages_id": 56,
"stop_dt": "2000-01-01T00:00:00+00:00",
...
}
} |
Panel | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Tip
|