# NodeSwaggerApi.TemplatesApi

All URIs are relative to *https://api.supremepay.lk:3011/api/admin*

Method | HTTP request | Description
------------- | ------------- | -------------
[**getTemplates**](TemplatesApi.md#getTemplates) | **GET** /admin/templates | 
[**getTemplatesCategories**](TemplatesApi.md#getTemplatesCategories) | **GET** /admin/templates/categories | 


<a name="getTemplates"></a>
# **getTemplates**
> [MessageTemplate] getTemplates()



get all template details

### Example
```javascript
var NodeSwaggerApi = require('node_swagger_api');
var defaultClient = NodeSwaggerApi.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

var apiInstance = new NodeSwaggerApi.TemplatesApi();

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getTemplates(callback);
```

### Parameters
This endpoint does not need any parameter.

### Return type

[**[MessageTemplate]**](MessageTemplate.md)

### Authorization

[api_key](../README.md#api_key)

### HTTP request headers

 - **Content-Type**: application/json, application/xml
 - **Accept**: application/json, application/xml

<a name="getTemplatesCategories"></a>
# **getTemplatesCategories**
> [MessageTemplateCategory] getTemplatesCategories()



get all template categories details

### Example
```javascript
var NodeSwaggerApi = require('node_swagger_api');
var defaultClient = NodeSwaggerApi.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix = 'Token';

var apiInstance = new NodeSwaggerApi.TemplatesApi();

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getTemplatesCategories(callback);
```

### Parameters
This endpoint does not need any parameter.

### Return type

[**[MessageTemplateCategory]**](MessageTemplateCategory.md)

### Authorization

[api_key](../README.md#api_key)

### HTTP request headers

 - **Content-Type**: application/json, application/xml
 - **Accept**: application/json, application/xml

