Versions Compared

Key

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

...

Events

The Provisioning API supports the following list of events:


TitleActionStructure
Clients
  • create


Code Block
{
  "event": {
    "dt": "2000-01-01T00:00:00+00:00",
    "events_id": "clients.updatecreate",
    "object_id": 12
  },
  "data": {
    "id": 12,
    "name": "Customer "fieldA",
    "companies_id": "some-value" 
  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,         
    "fieldname": "some-value" 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": "somecustom-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
  • create


Code Block
{
  "event": {
    "dt": "2000-01-01T00:00:00+00:00",
    "events_id": "clients.accounts.updatecreate",
    "object_id": 12
  },
  "data": {
    "id": 12,
    "clients_id": 7,
    "fieldname": "My "some-value" 
  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,
     "fieldname": "some-value" My changed account"
   }
}


  • delete


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


Clients Packages
  • assign


Code Block
{
  "event": {
    "dt": "2000-01-01T00:00:00+00:00",
    "events_id": "clients.subscriptions.updateassign",
    "object_id": 12
  },
  "data": {
    "id": 12,
    "clients_id": 34,
    "packages_id": 56,
    "fieldstop_dt": "some-value" 
  2023-01-01T00:00:00+00:00",
    ...
  }
}


  • activate


Code Block
{
  "event": {
    "dt": "2000-01-01T00:00:00+00:00",
    "events_id": "clients.subscriptions.updateactivate",
    "object_id": 12
  },
  "data": {
    "id": 12,
    "clients_id":  "field34,
    "packages_id": 56,
    "stop_dt": "some-value" 
  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.updatedeactivate",
    "object_id": 12
  },
  "data": {
    "id": 12,
    "clients_id": 34,
    "packages_id": 56,
    "fieldstop_dt": "some-value" 
  2023-01-01T00:00:00+00:00",
    "condition": "deactivated",
    ...
  }
}


  • renew


Code Block
{
  "event": {
    "dt": "2000-01-01T00:00:00+00:00",
    "events_id": "clients.updatesubscriptions.renew",
    "object_id": 12
  },
  "data": {
    "id": 12,
    "clients_id": 34,
    "field"packages_id": 56,
    "stop_dt": "some-value" 
  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.updateclose",
    "object_id": 12
  },
  "data": {
    "id": 12,
    "clients_id":  "field34,
    "packages_id": 56,
    "stop_dt": "some-value" 2021-01-01T00:00:00+00:00",
    ...
  }
}




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.