This API allows third party/external applications to make event requests using a RESTful API over HTTPS to the IMIconnect platform.

Prerequisites

Following are the prerequisites to use this API.

Service KeyA service must be created in IMIconnect to get a service key. Click here to create a service.
EventCreate an event in a service.
RuleCreate a rule within the event.
ActionsCreate actions within the rule.

Request

The event request is specified as follows:

URIhttps://api.imiconnect.com/resources/v1/events/externalevent/ 
Note: If your IMIconnect web access URL is on a .io TLD, then you should use the API end point with .io. For example, if your domain is mycompany.imiconnect.com then your API base URL will be api.imiconnect.com. But, if your domain is mycompany.imiconnect.io then your API base URL will be api.imiconnect.io.
MethodPOST

Request Headers

The following table describes the request headers:

Request HeaderDescription
keyService Key
content-typeapplication/json
##Request Examples
{
    "expiry":"<expiry time in UTC format>",
    "notifyurl":"<Notification URL>",
    "events":[
        {
            "evtid":"<Event ID>",
            "correlationid":"<Unique transaction ID from the client end>",
            "parameters":
             {
                "param1":"value1",
                "param2":"value2"
                
             }
        }
      ]
}
{
    "expiry":"<expiry time in UTC format>",
    "notifyurl":"<Notification URL>",
    "events":[
        {
            "evtid":"<Event ID>",
            "correlationid":"<Correlation ID>",
            "parameters":
             {
                "param1":"value1",
                "param2":"value2"
              
             }
        },
        {
            "evtid":"<Event ID>",
            "correlationid":"<Correlation ID>",
            "parameters":
             {
                "param1":"value1",
                "param2":"value2"
               
             }
        }
    ]
}

Request Body

The following table describes the elements in the request body:

Parameter

Type

Mandatory

Description

expiry

String

No

Expiry time is in UTC format, after which no action is taken. For example,

{"expiry":"2015-04-12T18:51:19"//expiry time in utc format}

notifyurl

String

No

Specifies a URL that receives notifications. This URL overrides the service's Notify URL. For example,

{"notifyurl":"<Notification URL>"}

events

Array of Strings

Yes

Specifies the events in an array. The parameters are:

  • evtid: Mandatory {String} - Specifies the event id that is generated by IMIconnect.
  • correlationid: Optional {String} - Specifies a unique transaction ID up to 50 bytes used by service providers to match requests with responses.
  • parameters: Optional {JSONObject} - Specifies the parameters block that may contain multiple name/value pairs if required to pass additional information to the event/trigger handler.

For example,

{"events":[    {        "evtid":"<Event ID>",        "correlationid":"<Correlation ID>",        "parameters":         {            "param1":"value1",            "param2":"value2",             ...         }    }  ]    }

📘

If a mandatory parameter is missing, then the API will execute with default values. If the default values are not defined then the API request will be rejected.

If an optional parameter is missing, then the API will execute with default values. The API request is accepted even if the default values are not defined.

##Response Example
{
  "response":{
           "code":"<Status code>",
            "description" : "<Description of status code>",
            "transid":"< Transaction ID generated by IMIconnect >",
            "correlationid":"<Correlation ID>",       
           
     }
   }

Response / return codes

This API may return the following response codes:

Response 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.
7004Invalid parameters/valuesReturns when any invalid value is given for any parameter in request body.
7005Internal error occurredReturned when there is an issue with IMIconnect.
7020You have reached maximum transaction limitReturned when you have reached the transaction limit.
7025Mandatory custom parameters missingReturns when any mandatory custom event parameter is missing, where these custom parameters are created in custom event creation screen.
7027Invalid XMLReturned when an invalid XML request is sent.
Language
Credentials
Header
Copyright © 2000 - 2021 IMImobile Limited | All Rights Reserved