Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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

Data

The data provided within the notification depends on the specific type of event.

Events that represent basic status changes will not contain any additional data as the ID of the related entity is provided within the "event" key. Examples of such events are: clients.accounts.delete, clients.archive, clients.balance_notzero, clients.balance_zero, etc.

For the rest of the events, the structure will match the respective CoreAPI method's structure. Please check the respective documentation within the system interface in the Integration/CoreAPI Docs section .

Supported Events

for full format of the structure.

Event IDPayload Sample

Clients Management

clients.update

Client details have been updated

{
  "event": {
    "dt": "2000-01-01T00:00:00+00:00",
    "events_id": "clients.update",
    "object_id": 12
  },
  "data": {
    "id": 12,        
    "name": "My changed name"
  }
}

clients.delete

Client has been completely deleted

Not to be confused with archived

{
  "event": {
    "dt": "2000-01-01T00:00:00+00:00",
    "events_id": "clients.delete",
    "object_id": 12
  },
  "data": {}
}


REMOVE AFTER FULL MIGRATION - Supported Events

The Provisioning API supports the following list of events:

  • Clients
    • clients.create
    • clients.update
    • clients.archive
    • clients.delete
    • clients.balance_zero
    • clients.balance_notzero
    • clients.custom_fields.update
  • Accounts
    • clients.accounts.create
    • clients.accounts.update
    • clients.accounts.delete
  • Subscriptions
    • clients.subscriptions.assign
    • clients.subscriptions.activate
    • clients.subscriptions.deactivate
    • clients.subscriptions.renew
    • clients.subscriptions.close
  • Email Rates Manager
    • email_rates_manager.import
    • email_rates_manager.rate_tables_no_match
    • email_rates_manager.no_attachments
    • email_rates_manager.file_processing_error
  • Import Manager
    • importd.process_success
    • importd.process_failed

...