The Event API is a single API that allows third party/external applications to make event requests using a RESTful API over HTTPS to the IMIconnect platform.

External application can raise one or more events in a single request. Each event can be attached with a set of parameters representing event specific information. These parameters will be passed along as context parameters to the actions defined in the rules on these events.

Clients can create custom events and configure rules that are executed when the event API request is received on the IMIconnect platform. Events are defined in the services section by defining parameter blocks that consist of variable names and types. These will then be passed when the event is invoked.

📘

A Service Key must be passed with every API request.

Prerequisites:

  • A [Service Key](doc:setup-service). The Service Key is obtained by [creating a service](doc:setup-service).
    
  • An event associated with the Service.
    
  • At least one Rule associated with the Event.
    
  • Properly defined actions for the Rule in order to complete the expected flow.
    

API parameters

📘

For data privacy and security reasons, the REST API is served over encrypted HTTPS. Standard HTTP is not supported.

ParameterMandatoryUseDescription
keyYesPassed in the header.The service key authenticates event API requests and must be passed with every request.
eventsYesPassed in the request body.An array containing a list of events.
notifyurlNoPassed in the request body.A notification is sent to the specified notifyurl after an event is executed.
expiryNoPassed in the request body.Expiry time of event in UTC format.

Response / Error Codes

CodeMessageDescription
1002QueuedReturned when the request is accepted by IMIconnect.
7000Invalid JSONReturned when an invalid JSON request is sent.
7001Authentication failedReturned when an invalid service key or profile key is provided in the request.
7003Mandatory parameters missingReturns when any mandatory parameter is missing in request body.
7004Invalid parameters/valuesReturns when any invalid value is given for any parameter in request body.
7005Internal error occurredReturned when an internal error occurs.
7025Mandatory custom parameters missingReturns when any mandatory custom event parameter is missing, where these custom parameters are created in custom event creation screen.
Copyright © 2000 - 2021 IMImobile Limited | All Rights Reserved