Rest API v1

Taliad API documentation v1

Introduction

In order to access API you must supply a token as authentication with the HTTP request.
This token is named 'apiKey'.
For GET requests 'apiKey' token can be included in the query instead of HTTP header.
This to simplify GET calls.
Example: https://api.taliad.se/v1/file/getWebFile.php?fileId=4&apiKey=234c33b437173639f815a6cfd918

This apiKey is obtained from Taliad application.
In order to access endpoints in API, the api key must be granted access to these endpoints.
Please contact support to receive your api key and to get access to the endpoints you need.

API base URL:
https://api.taliad.se/v1

API can only be reached by HTTPS. Trying to connect by HTTP will result in a 404 response.

HTTP response status codes are always included in HTTP header in accordance with the HTTP/1.1 standard.

Response from API is always a JSON object with folloing structure:
{ "status": "", "message": "", "errorMessage": "" }

"status" - HTTP/1.1 status code
"message" - If request is successful, data from endpoint
"errorMessage" - Error message from API or Taliad application.

Files - Get file contents

Description:
Get file contents by file ID. Returns JSON object with web file data

Endpoint URI:
file/getWebFile.php

HTTP request method:
GET

Parameters:
fileId - File ID

Retured JSON message object:
fileName - Name of file
type - Type of file. Example: 'application/pdf', 'image/png', 'image/jpeg' etc..
size - File size in bytes
data - File contents base64 encoded


https://api.taliad.se/v1/file/getWebFile.php?fileId=4&apiKey=234c33b437173639f815a6cfd918

{ "status": "200",
  "message": { "fileName":"photo.jpg",
               "type":"image/jpeg",
               "size":15467,
               "data":"iVBORw0KGgoAA" },
  "errorMessage": "" }
                        
API key has wrong format or is empty.

{ "status": "401",
  "message": "",
  "errorMessage": "Invalid api key" }
                        
No file exists for supplied 'fileId'.

{ "status": "200",
  "message": "",
  "errorMessage": "No file exists for parameter 'fileId' value" }
                        
No access to this endpoint.

{ "status": "403",
  "message": "",
  "errorMessage": "Access denied" }
                        

Location - Get city name

Description:
Get city name by country code and zip code. Returned city name is capitalised.

End point URI:
location/getCity.php

HTTP request method:
GET

Parameters:
countryCode - ITU-T numeric country code
zipCode - Zip code without any spaces

Retured JSON message object:
Capitalised city name


https://api.taliad.se/v1/location/getcity.php?countryCode=46&zipCode=13331&apiKey=234c33b437173639f815a6cfd918

{ "status": "200",
  "message": "Nacka",
  "errorMessage": "" }
                        
API key has wrong format or is empty.

{ "status": "401",
  "message": "",
  "errorMessage": "Invalid api key" }
                        

{ "status": "200",
  "message": "",
  "errorMessage": "No zip codes for parameter 'countryCode' value" }
                        
No access to this endpoint.

{ "status": "403",
  "message": "",
  "errorMessage": "Access denied" }