Getting Started

This is where you start appreciating the OPTIMO APIs and we have set up a nice guide for you on how to do it properly. As you spend more time with our APIS, you will feel like you cannot get enough of our APIs which is fair; there is no limit to what you can create using our APIs as a developer. So, hop on!

OPTIMO APIs

If you are not a big fan of the OPTIMO user interfaces and fancy simulating the experience in your own environment or if you are looking to integrate all or part of the OPTIMO services into another application, then you are at the right place! This is the gateway to the OPTIMO API reference, your guide to using the OPTIMO APIs.  

The OPTIMO V4 API follows the open-source standard json:api and offers comprehensive access to the motherlode of data within an OPTIMO client system. The developers at OPTIMO use these APIs as the primary data access methods for OPTIMO V4 applications, which means that any operation achievable through OPTIMO applications can also be replicated using the OPTIMO V4 APIs; quite a generous deal!

For Dummies

When interacting with the OPTIMO APIs, you use HTTP messages known as requests. If you are new to this, it is helpful to understand four key components of an API request: endpoints, methods, headers, and parameters. Familiarizing yourself with these basics will ensure we are on the same page as we move forward.

Endpoints

An API endpoint is a specific path that uniquely identifies a resource in OPTIMO, such as a booking or user account. The exact path of the endpoint varies based on the resource type and the OPTIMO system you are using.

For instance, the following endpoint returns a list of booking records in the system.

https://onlocation.optimo.training/PLAY/restapi/api/V4.1/bookings
  • https://onlocation.optimo.training/PLAY/restapirefers to the OPTIMO system you are using (our PLAY system in this case) and we call it the base URL.

  • /api/V4.1/bookings is the exact path, that you find in the OPTIMO API Reference, to the type of the resource which should be appended to the base URL.

HTTP Methods

An HTTP method defines the type of action to be performed on the resource identified by your endpoint. For instance, the GET method retrieves data associated with the endpoint, the POST method creates a new resource of that type, the DELETE method removes a specific resource, and so forth. The table below sheds light on these methods.

Method

Description

GET

Retrieves the JSON format representation of a particular resource.

POST

Adds a new resource to a collection. It typically requires additional parameters to be provided.

PUT

Either replaces a resource with a new one or associates one resource with another.

PATCH

Updates a resource with the new representation provided in the request body.

DELETE

Removes a resource or dissociates it from another resource.

You will find examples along the way of using these methods.

Headers

Alright, do not get excited. We are dealing with only the Authorization header here, which allows you to provide the required credentials for accessing the OPTIMO data. Find more at Authentication.

Parameters

Parameters are values that vary to differentiate resources of a specific type or to modify the scope or behavior of an API request. These parameters can be found in the endpoint path, in a query string at the end of the endpoint itself, or in the request body. The placement of the parameter value relies on the method and the function of the parameter, among other considerations, as listed below.

Method

Placement of Parameters

GET

path, query

POST

path, body

PUT

path, body

PATCH

path, body

DELETE

path, body

Testing APIs

Now, these APIs are language-agnostic which means you can call the APIs using different programming languages on different platforms. But we need to find a common ground for the sake of presenting you with examples that you can actually test. For that purpose, we suggest using Postman API Platform for testing our examples; at least that is what we are going to use here. See our short instructional video on how to use Postman for our purpose.

Next >