1) Get Template List
https://secure.xwireless.net/api/v2/Template?ApiKey={ApiKey}&ClientId={ClientId}
Parameters :
Parameter Name | Description | Type |
---|---|---|
ApiKey | ApiKey used for authentication purpose and pass this parameter in URL encoded format. |
String |
ClientId | ClientId used for authentication purpose and pass this parameter in URL encoded format. |
String |
HEADERS : |
---|
Content-Type: application/json or application/xml |
Type: json or xml |
Jquery Api Call : |
---|
<script> $(function () { $.ajax({ type: "GET", url: "https://secure.xwireless.net/api/v2/Template?ApiKey={ApiKey}&ClientId={ClientId}", contentType: "application/json", dataType: 'json', success: function (response) { } }); }); </script> |
Json Response | Xml Response |
---|---|
{ "ErrorCode": 0, "ErrorDescription": "Success", "Data": [ { "TemplateId": 138, "CompanyId": 121, "TemplateName": "test", "MessageTemplate": "test ##Field##", "IsApproved": false, "IsActive": true, "CreatededDate": "Mar 19, 2018", "ApprovedDate": "Mar 19, 2018", } ] } |
<ResponseModelOfListOfTemplate> <ErrorCode>0</ErrorCode> <ErrorDescription>Success</ErrorDescription> <Data> <Template> <TemplateId>138</TemplateId> <CompanyId>121</CompanyId> <TemplateName>test</TemplateName> <MessageTemplate>test ##Field##</MessageTemplate> <IsApproved>false</IsApproved> <IsActive>true</IsActive> <CreateDate>Mar 19, 2018</CreateDate> <ApprovedDate>Mar 19, 2018</ApprovedDate> </Template> </Data> </ResponseModelOfListOfTemplate> |
2) Create New Template
https://secure.xwireless.net/api/v2/Template
Request Body :
JSON | XML |
---|---|
{ "TemplateName": "string", "MessageTemplate": "string", "ApiKey": "string", "ClientId": "string" } |
<?xml version="1.0"?> <TemplateAPIModel> <TemplateName>string</TemplateName> <MessageTemplate>string</MessageTemplate> <ApiKey>string</ApiKey> <ClientId>string</ClientId> </TemplateAPIModel> |
Parameter Name | Description | Type |
---|---|---|
ApiKey | ApiKey used for authentication purpose. |
String |
ClientId | ClientId used for authentication purpose. |
String |
TemplateName | Name of template | String |
MessageTemplate | Template text. | string |
HEADERS : |
---|
Content-Type: application/json or application/xml |
Type: json or xml |
Jquery Api Call : |
---|
<script> $(function () { var Jsondata = { 'TemplateName': 'hello', 'MessageTemplate': 'promotional', 'ApiKey': 'ApiKey', 'ClientId': 'ClientId' }; $.ajax({ type: "POST", url: "https://secure.xwireless.net/api/v2/Template", contentType: "application/json", dataType: 'json', data: JSON.stringify(Jsondata), success: function (response) { } }); }); </script> |
Json Response | Xml Response |
---|---|
{ "ErrorCode": 0, "ErrorDescription": "Success", "Data": "Template Added successfully." } |
<ResponseModelOfString> <ErrorCode>0</ErrorCode> <ErrorDescription>Success</ErrorDescription> <Data>Template Added successfully.</Data> </ResponseModelOfString> |
3) Update Template
https://secure.xwireless.net/api/v2/Template?id={id}
Request Body :
JSON | XML |
---|---|
{ "TemplateName": "string", "MessageTemplate": "string", "ApiKey": "string", "ClientId": "string" } |
<?xml version="1.0"?> <TemplateAPIModel> <TemplateName>string</TemplateName> <MessageTemplate>string</MessageTemplate> <ApiKey>string</ApiKey> <ClientId>string</ClientId> </TemplateAPIModel> |
Parameter Name | Description | Type |
---|---|---|
ApiKey | ApiKey used for authentication purpose. |
String |
ClientId | ClientId used for authentication purpose. |
String |
TemplateName | Name of template | String |
MessageTemplate | Template text. | string |
id | id of template |
integer |
HEADERS : |
---|
Content-Type: application/json or application/xml |
Type: json or xml |
Jquery Api Call : |
---|
<script> $(function () { var Jsondata = { 'TemplateName': 'hello', 'MessageTemplate': 'promotional', 'ApiKey': 'ApiKey', 'ClientId': 'ClientId' }; $.ajax({ type: "PUT", url: "https://secure.xwireless.net/api/v2/Template?id={Id}", contentType: "application/json", dataType: 'json', data: JSON.stringify(Jsondata), success: function (response) { } }); }); </script> |
Json Response | Xml Response |
---|---|
{ "ErrorCode": 0, "ErrorDescription": "Success", "Data": "Template updated Successfully." } |
<ResponseModelOfString> <ErrorCode>0</ErrorCode> <ErrorDescription>Success</ErrorDescription> <Data>Template updated Successfully.</Data> </ResponseModelOfString> |
4) Delete Template
https://secure.xwireless.net/api/v2/Template?ApiKey={ApiKey}&ClientId={ClientId}&id={Id}
Parameters :
Parameter Name | Description | Type |
---|---|---|
ApiKey | ApiKey used for authentication purpose. |
String |
ClientId | ClientId used for authentication purpose. |
String |
id | Id of template. | integer |
HEADERS : |
---|
Content-Type: application/json or application/xml |
Type: json or xml |
Jquery Api Call : |
---|
<script> $(function () { $.ajax({ type: "DELETE", url: "https://secure.xwireless.net/api/v2/Template?ApiKey={ApiKey}&ClientId={ClientId}&id={id}'", contentType: "application/json", dataType: 'json', data: JSON.stringify(Jsondata), success: function (response) { } }); }); </script> |
Json Response | Xml Response |
---|---|
{ "ErrorCode": 0, "ErrorDescription": "Success", "Data": "Template deleted Successfully." } |
<ResponseModelOfString> <ErrorCode>0</ErrorCode> <ErrorDescription>Success</ErrorDescription> <Data>Template deleted Successfully.</Data> </ResponseModelOfString> |