Introduction

JRNI is a customer experience platform used by global enterprise businesses to connect with their customers. The JRNI API assists businesses in building bespoke customer interfaces to meet their business needs and to integrate with internal systems for data synchronisation with JRNI.

The API

The JRNI REST API is a HAL based API that allows you to manage all aspects of the JRNI platform.

Endpoints are documented with the HTTP method for the request and a partial resource identifier.

GET /api/v5/1234/services

Prepend your JRNI URL to the resource identifier to get the full endpoint URL:

https://example.jrni.com/api/v5/1234/services

Curly braces, {}, indicate values you have to replace. Example:

https://{host}.jrni.com/api/v5/{company_id}/services/{id}

The examples provided in the docs are cURL statements. You can run the statements on a command line to try out or use REST API client, such as postman.

Request Format

The JRNI API is a JSON API. You must supply a Content-Type: application/jsonheader in PUT and POST requests. You must set an Accept: application/json header on all requests.

Data Types

The API returns and accepts JSON values, which can be strings in double quotes, numbers, objects, arrays, true or false. Most programming languages have tools to parse this data.

Time stamps

Time stamps use UTC time and are formatted as ISO 8601 strings. Example: '''2016-05-16T09:14:57Z'''.

HAL

The JRNI API is a hypermedia REST API. By including links in the API response, clients can discover related resources. More information can be found on this REST API Tutorial or in a good book on REST.

Hypertext Application Language (HAL) is used as the default format for the responses. It’s a relatively simple format but allows us to benefit from hyperlinks without too much overhead. While the links in the responses can be ignored it’s advisable to use them in your projects to help decouple the implementation from some of the specifics of the API.

Pagination

By default, most list endpoints return a maximum of 30 records per page. You can change the number of records on a per-request basis by passing a per_page parameter in the request URL parameters. Example: per_page=50.

When the response exceeds the per-page maximum, you can paginate through the records by incrementing the page parameter. Example: page=3. List results include next and previousURLs in the response body for easier navigation:

},
  "_links": {
    ...
    },
    "next": {
      "href": "https://example.jrni.com/api/v5/admin/50666/bookings?page=3&per_page=30&locale=en"
    },
    "previous": {
      "href": "https://example.jrni.com/api/v5/admin/50666/bookings?page=1&per_page=30&locale=en"
    }
  }
}

This documentation will cover the main aspects of the API and how you can use it within your application. There are many different features within the API and we will only be covering some of the aspects that you will need to get set up.

For a full list of endpoints and methods see the API Reference