API reference


Installing the JMServices API Libary is currently only supposed using NPM or Yarn.

Installing the Libary

Using NPM

npm install jmservices

Using Yarn

yarn add jmservices

Setting up the client

API Keys

You can find your API Key in the System Settings. To access the Jobs API you'll need the Jobs API Key, for all administration related endpoints (Updating Customers, Access Codes, Inventory management) you'll need the Admin API Key. Once you have copied the required key you can setup the client:

const jmservices = require('jmservices');
const client = jmservices.Client({
  token: 'jmsec_live_...',
  apiURL: 'https://api.uk.jmservices.pro'

Verifying the connection

You can test the connection with the server and your API Key by using the built-in method:

const connection = await client.testConn();

This should reply with { valid: true } and the status will be 200 OK if the API Key is valid, if the API Key is invalid you should see a responce like this { valid: false, message: 'The API Key is not valid' }. If there is an Internal Error there should be an error message with the responce stating the exact error.

Creating additional users