Using the NPS API

The NPS API is the primary way to get data in and out of the NP Tracker platform. It's a low-level HTTP-based API that you can use to query data, post new lookouts, upload photos and a variety of other tasks that an app might need to do.

Make your first NPS API request

Now you're ready to make your first NPS API request, we'll start with a 'demo' request.

http://api.nptracker.co.za/API/json.cgi?cmd=demo

and the API will return

{"version":"01.00","id":"","result":"true","desc":"Hello World!"}

Do a NPS lookup through the API

For this request you have to register and use a access token obtained here then replace the {TEST} with your access token.

http://api.nptracker.co.za/API/json.cgi?cmd=nps&str=abc123gp&tkn={TEST}

and the API will return

{"version":"01.00","id":"","result":"true","desc":"The following lookouts was received via API:\n * 2014-12-19 07:25:12 - LOOKOUT: This is a example of a numberplate report.\n"}

What now?

Now that you have the basics of the API have a look at the Parameters section for a list and explanation on the usage of the different parameters.