HomeGuidesAPI ReferenceChangelogDiscussions
GuidesiMIS ProfessionaliMIS EnterpriseClient SupportLog In
API Reference

iMIS REST API

📘

Endpoint responses could be invalid or unresponsive during a database restore. Database restore takes place at 6:00 AM and 6:00 PM GMT and takes approximately 5 minutes to run.

🚧

To run Try It examples from this site a valid Bearer access_token is required.

Create Token

The iMIS REST API is an HTTP-based web API that allows developers to send a request to a simple URL instead of using XML. The iMIS REST API uses JSON objects to send the data in smaller payloads between the client and the server. A lazy-loaded pattern allows asynchronous handling when objects are loaded on a page, which also improves performance.

All requests should be made over SSL. All request and response bodies, including errors, are encoded in JSON.

When using a client tool or developing in JavaScript, you will need a token to make a request to the API. If you are using the iMIS web application pass-through method, the browser or application will also need access to the login cookie of the user you are logged in as.

🚧

PUT and POST Operations

Due to the complexity of some objects, PUT and POST operations are not currently interactive.

🚧

DELETE Operations

In order to preserve and accurately present the data, DELETE operations are not currently interactive.

Simple REST examples

Using jQuery Ajax and JavaScript to authenticate and request a resource

jQuery.ajax("https://testapi.imis.com/sdkdemo/api/party/101", {
  type: "GET",
  contentType: "application/json",
  headers: {
    RequestVerificationToken: document.getElementById(
      "__RequestVerificationToken"
    ).value
  },
  success: function(data) {
    console.log(data);
  }
});
var request = new XMLHttpRequest();

var promise = new Promise(function (resolve, reject) {
  // open and send
  request.open('get', 'https://testapi.imis.com/sdkdemo/api/party/101');

  // attach RequestVerificationToken header to request object
  request.setRequestHeader("RequestVerificationToken",
    document.getElementById("__RequestVerificationToken").value);

  // add listener to request object
  request.onload = function () {
    // This is called even on 404s, etc.
    // so check the status
    if (request.status === 404) {
      reject(Error(request.statusText));
    } else {
      // Resolve the promise with the response text
      resolve(request.response);
    }
  };

  // Handle network errors
  request.onerror = function () {
    reject(Error("Network Error"));
  };

  request.send();
});
jQuery.ajax("https://testapi.imis.com/sdkdemo/api/party?UniformId=87EAD15E-B188-42E8-AE48-E9B8C2B24C94", {
  type: "GET",
  contentType: "application/json",
  headers: {
    RequestVerificationToken: document.getElementById(
      "__RequestVerificationToken"
    ).value
  },
  success: function(data) {
    console.log(data);
  }
});
jQuery.ajax("https://testapi.imis.com/sdkdemo/api/party?lastname=contains:smith", {
  type: "GET",
  contentType: "application/json",
  headers: {
    RequestVerificationToken: document.getElementById(
      "__RequestVerificationToken"
    ).value
  },
  success: function(data) {
    console.log(data);
  }
});
jQuery.ajax("https://testapi.imis.com/sdkdemo/api/country", {
  type: "GET",
  contentType: "application/json",
  headers: {
    RequestVerificationToken: document.getElementById(
      "__RequestVerificationToken"
    ).value
  },
  success: function(data) {
    console.log(data);
  }
});
jQuery.ajax("https://testapi.imis.com/sdkdemo/api/country?countryname=contains:united", {
  type: "GET",
  contentType: "application/json",
  headers: {
    RequestVerificationToken: document.getElementById(
      "__RequestVerificationToken"
    ).value
  },
  success: function(data) {
    console.log(data);
  }
});

Status codes

Our API returns standard HTTP success or error status codes. For errors, we will also include extra information about what went wrong encoded in the response as JSON. The various HTTP status codes we might return are listed below.

CodeTitleDescription
200OKThe request was successful.
201CreatedThe resource was successfully created.
202Async createdThe resource was asynchronously created
400Bad requestBad request
401UnauthorizedYour RequestVerificationToken is invalid.
404Not foundThe resource does not exist.
422Validation errorA validation error occurred.
50XInternal Server ErrorAn error occurred with our API.

Advanced query operations

The REST web API supports a number of advanced querying commands

  • Between, between
  • Contains, contains
  • EndsWith, endsWith
  • Equal, eq,==
  • GreaterThan, gt,>
  • GreaterThanOrEqual, ge,>=
  • In, in
  • IsEmpty, isEmpty,empty
  • IsFalse, isFalse,false
  • IsTrue, isTrue,true
  • LessThan, lt,<
  • LessThanOrEqual, le,<=
  • NotContain, notContain,!contain
  • NotEmpty, notEmpty,!empty
  • NotEqual, ne,!=
  • StartsWith, startsWith