Info

Created 03-02-2021 by Lavinia Gheghea

Revision



Description

The API allows you to retrieve individual portal template as well as a list of all portal templates.

Endpoints


GET:  /portaltemplate


Parameters
Headers and Query
 Name
 Description
 Type
 API-key - required
  Authorization Token
 String(64)
 UID - required
 UID -how can be obtained
 String
 DEVICEID - required
  DEVICEID
 String
 offset
 starting record
 Integer
 limit
 how many records displayed on a page
 Integer
 OrderFieldName
 field name to order the recordset
 String
 OrderDirection
 ASC or DESC
 String
 Filter
 filter the recordset
 String
Curl example

curl -X GET "https://smartapi.smarttid.dk/portaltemplate" -H "accept: */*" -H "UID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -H "DEVICEID:demo@smarttid.dk" -H "API-Key: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

Response

200 (OK) :  array of portal templates

Response body

{ "ID": 4, "Module": "Employee2", "Type": "Table,Header", "Template": null }, { "ID": 5, "Module": "Employee2", "Type": "Table,Row", "Template": "<tr><td width=100>{$data.EmployeeCode}<br>{$data.DepartmentCode}</td><td valign=\"top\">{$data.Name}</td></tr><tr><br></tr>" }, { "ID": 3, "Module": "Employee3", "Type": "Table,Header", "Template": "<th class=\"all\">{t}Employee No1{/t}</th>\r\n<th class=\"min-tablet\">{t}Name{/t}</th>\r\n<th class=\"min-tablet\">{t}Email{/t}</th>\r\n<th class=\"min-tablet\">{t}Department{/t}</th>\r\n<th class=\"min-tablet\">{t}Zip Code{/t}</th>\r\n<th class=\"min-tablet\">{t}City{/t}</th>\r\n<th class=\"min-tablet\">{t}Phone{/t}</th>" }, ]

Response headers:

content-encoding: gzip 
 content-length: 238 
 content-type: application/json; charset=utf-8 
 date: Mon, 24 Aug 2020 08:01:23 GMT 
 server: Microsoft-IIS/10.0 
 vary: Accept-Encoding 
 x-pagination: {"totalCount":4,"totalFiltered":4,"Offset":0,"Limit":4,"Returned":4} 
 x-powered-by: ASP.NET 

400 (ERROR) : Error message

Response Body
Error message


GET{id} : /payrolltemplate/{id}  


Parameters
 Name
 Description
 Type
 API-key - required
  Authorization Token 
 String(64)
 UID - required
UID -how can be obtained
 String
 DEVICEID - required
  DEVICEID
 String
 id- required
 ID of portal template
 Integer
Curl example

curl -X GET "https://smartapi.smarttid.dk/portaltemplate/id" -H "accept: */*" -H "UID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" -H "DEVICEID:demo@smarttid.dk" -H "API-Key: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

Response

200 (OK) : the portal template

Response Body
{ "ID": 4, "Module": "Employee2", "Type": "Table,Header", "Template": null } ]

Response Headers
content-encoding: gzip
  content-length: 175
  content-type: application/json; charset=utf-8 
 date: Mon, 24 Aug 2020 08:39:57 GMT 
 server: Microsoft-IIS/10.0 
 vary: Accept-Encoding  x-powered-by: ASP.NET 

400 (ERROR) : Error message

Response Body
Error message