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 the respective documentation within the system interface in the Integration/CoreAPI Docs section for full format of the structure.

Event IDPayload Sample

Clients Management

clients.create

The client has been created

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

  }
}

clients.update

The client's 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.archive

The client has been archived

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

clients.delete

The 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": {}
}

clients.balance_zero

The client has been 


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>
    }
  },
  "event":
  {
    "dt": "2022-01-24T15:44:47.216756+00:00",
    "events_id": "email_rates_manager.import",
    "object_id": "77798" 
  }
}

email_rates_manager.rate_tables_no_match

The client has been created

{
  "data":
  {
    "credentials":
    {
      "login": "[email protected]",
      "host": "imap.gmail.com"
    },
    "message":
    {
      "from": "Sender <[email protected]>",
      "id": "77798",
      "subject": "Subject of the message"
    }
  },
  "event":
  {
    "dt": "2022-01-24T15:44:47.216756+00:00",
    "events_id": "email_rates_manager.rate_tables_no_match",
    "object_id": "77798"
  }
}

email_rates_manager.no_attachments

The client has been created

{
  "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"
  }
}

email_rates_manager.file_processing_error

The client has been created

{
  "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 Management

importd.process_success

The client has been created


importd.process_failed

The client has been created




Panel
borderColor#ccffcc
bgColor#ccffcc
borderWidth2px
borderStylesolid

Tip

  • For more information about configuring and monitoring the hooks for Provisioning API, visit our respective article User Guide > System > Provisioning API.
  • If you need to process some of the actions that are not listed here, contact our support for a feature request.