Spedmo REST API

Looking to use some of Spedmo's features in your own application? Then you've come to the right place.

The Spedmo REST API allows external applications and websites the ability to integrate with Spedmo data and services. The API is free to use and a full definition of services provided can be found in our Swagger UI API specification interface which also provides a useful test harness for testing and troubleshooting features of the API.

Getting started

1. Obtain an API key (SPEDMO-API-KEY)

Before using the API for your application an API key must be generated which will provide the mechanism for identifying your calls to the API from other applications. To get started, simply log in to Spedmo with your account and your API key can be generated from the API Management console.

Your API key will be a UUID and is called the "SPEDMO-API-KEY" when being used for transactions with the service.

2. Test that the key is functional with the API

The Spedmo REST Swagger UI API specification interface allows for quick and easy web testing of the API without the need to configure custom software and is available for you to use as a quick and easy debugging tool for any potential integration issues that may occur with your application.

With your API key you should be able to test the News.api and check that your key allows you to get a response from the system. Simply enter your key into the harness and hit the "Try it out!" button. If your test was successful with content returned, you're ready to integrate features into your app.

Alternatively the API can be hit using an application such as CURL as shown in the example below.

curl -X GET --header 'Accept: application/json' --header 'SPEDMO-API-KEY: YOUR-KEY-HERE' 'https://www.spedmo.com/api/v1.0/news.api'

If your key does not return a result, check that you have followed the instructions above correctly.

3. Obtaining a User key to obtain personal data (SPEDMO-ACCESS-KEY)

For the main features of the REST API a user key will be required to read personal data such as user contact details and user contributions (flights, livetracks etc.). This key is obtained by requesting a user allow access to your application, the key once obtained is valid indefinitely so there is no need to constantly re-request this key from a user once your application has received it, it should be stored somewhere within your app or service.

To present the user with the request, simply display/frame the following URL within your application https://www.spedmo.com/apiAuthorise.pg and present your "SPEDMO-API-KEY" in the request header. If you would like to remove Spedmo navigation from the experience, simply add 'whitelabel=true' as a request parameter.

curl -X GET --header 'Accept: application/json' --header 'SPEDMO-API-KEY: YOUR-KEY-HERE' 'https://www.spedmo.com/apiAuthorise.pg?whitelabel=true'

The response will return as HTML and should be presented directly to use user, an example of expected output is shown in the diagram below.

phone-api

Spedmo will take care of processing the users inputs, your application should monitor the page response header and look for the "SPEDMO-ACCESS-KEY". This key in combination with your "SPEDMO-API-KEY" will allow your application to use the full features of the Spedmo REST API.

4. Test that a user key is functional with the API

With your user key obtain user member information using the Member.api.

curl -X GET --header 'Accept: application/json' --header 'SPEDMO-ACCESS-KEY: USER-KEY-HERE' --header 'SPEDMO-API-KEY: YOUR-KEY-HERE' 'https://www.spedmo.com/api/v1.0/member.api'

For documentation on all the other REST API features please consult the Swagger UI API specification.