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!

Finding Assets

An Asset refers to a facility, resource or branding area. Rather than browsing through the assets at a predetermined Venue, you can find Assets at any Venue, that perhaps fit your requirements. To do this, we use the endpoint found under Assets > Assets - List in the API Reference. However, we are going to narrow down the JSON response with the use of Filters.

The Almighty Filters

As the name itself suggests, we use filters to filter the data so that the JSON response to our request would be more focused on our specific requirements with the added bonus of faster response time. All filters that are available for a certain endpoint are listed in the API Reference under that particular endpoint For instance, suppose you want to get a list of a) facilities (sub class of Assets) which are currently b) active and are c) available to book online, hence three filters.

  • assetClassId=1 for facilities in Assets class

  • activeStatus=1 for currently active Assets

  • salesChannelId=5 for Assets available to book online

Multiple filters are separated by ampersands in our API request.

GET ../api/V4.1/assets?filters.assetClassId=1&filters.salesChannelId=5&filters.activeStatus=1

Sample JSON response:

Sort

We may also sort the results in the response by different fields. Again, sortable fields are listed under the particular endpoint in the API Reference. Let's sort our response by the Venue Id.

GET ../api/V4.1/assets?filters.assetClassId=1&filters.salesChannelId=5&filters.activeStatus=1&sort=venue.id

Note that information on the Venue of the Asset is actually found in the relationships in the JSON response and you would find that now the response is in the ascending order of the Venue Id.

< Previous Next >