In order to make calls to our API, you first need to authorise yourself using your developer API key the API key of the restaurant you wish to use the API against.
The e-Res API uses JWT (Json Web Tokens) to authorise API access. To receive a JWT Token, you must have the following 2 API keys…
- Your developer API key issued by us
- The restaurants e-Res API key
Once you have these 2 keys, you can make a call to the e-Res API authorisation server at the following URL endpoint
The [username] and [password] query parameters should be replaced with your credentials as shown below
[username] – Your developer API key
[password] – The restaurants API key
Once you have inserted the correct values, simply make the HTTP POST call and, if successfull, you will be returned some JSON containing your encrypted token.
The JSON value we need to extract is the first “Token” value. Parse the JSON using the parser available within your development language and extract the “Token” value.
Now, in order to make calls to the e-Res API, we need to insert the Token as an “Authorization” header before making a request.
This is how the HTTP header should be added…