PUT api/v1/sms/templates/{templateID}

This method updates an existing notification template with the new information provided in the request. All fields must be present as all fields will be updated even if they have not been changed.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
templateID

The id of the template that will be modified.

string

Required

Body Parameters

Either xml or json request.

TwoSms.CustomerPortalRole.API.Admin.SMS.Template
NameDescriptionTypeAdditional information
TemplateID

The unique identifier for the template.

globally unique identifier

Required

Name

The name of the template

string

Required

Type

Determines if the template is used for the Sms, EMAiL or SMSPLUS messages.

TwoSms.Platform.Database.CustomerPortal.Tables.General.TemplateType

Required

TemplateText

The actual template.

string

Required

DateCreated

The actual date the template was created.

string

Required

DateModified

The date the template was last modified.

string

Required

Request Formats

application/json, text/json

Sample:
{
  "TemplateID": "e6186bf2-0982-491c-81ec-d24d256ef156",
  "Name": "sample string 2",
  "Type": 0,
  "TemplateText": "sample string 3",
  "DateCreated": "sample string 4",
  "DateModified": "sample string 5"
}

application/xml, text/xml

Sample:
<Template xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <ID>e6186bf2-0982-491c-81ec-d24d256ef156</ID>
  <Name>sample string 2</Name>
  <Type>RECIPIENT_CODE</Type>
  <TemplateText>sample string 3</TemplateText>
  <DateCreated>sample string 4</DateCreated>
  <DateModified>sample string 5</DateModified>
</Template>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'System.Web.Http.ModelBinding.JQueryMvcFormUrlEncodedFormatter' to write type 'TwoSms.CustomerPortalRole.API.Admin.SMS.Template'.

Response Information

Resource Description

The template details that have been modified.

TwoSms.CustomerPortalRole.API.Misc.ResponseOfTwoSms.CustomerPortalRole.API.Admin.SMS.Template
NameDescriptionTypeAdditional information
Error

TwoSms.CustomerPortalRole.API.Misc.Error

None.

ResponseData

TwoSms.CustomerPortalRole.API.Misc.ResponseDataOfTwoSms.CustomerPortalRole.API.Admin.SMS.Template

None.

Response Formats

application/json, text/json

Sample:
{
  "Error": {
    "ErrorCode": "sample string 1",
    "ErrorReason": "sample string 2"
  },
  "ResponseData": {
    "Identification": {
      "UserId": "sample string 1"
    },
    "Result": "sample string 1",
    "Detail": {
      "TemplateID": "0b2db8fb-20ec-43b4-9821-e235b28cbd7f",
      "Name": "sample string 2",
      "Type": 0,
      "TemplateText": "sample string 3",
      "DateCreated": "sample string 4",
      "DateModified": "sample string 5"
    }
  }
}

application/xml, text/xml

Sample:
<ResponseOfTemplate xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Error>
    <ErrorCode>sample string 1</ErrorCode>
    <ErrorReason>sample string 2</ErrorReason>
  </Error>
  <ResponseData>
    <Result>sample string 1</Result>
    <Identification>
      <UserId>sample string 1</UserId>
    </Identification>
    <Detail>
      <ID>0b2db8fb-20ec-43b4-9821-e235b28cbd7f</ID>
      <Name>sample string 2</Name>
      <Type>RECIPIENT_CODE</Type>
      <TemplateText>sample string 3</TemplateText>
      <DateCreated>sample string 4</DateCreated>
      <DateModified>sample string 5</DateModified>
    </Detail>
  </ResponseData>
</ResponseOfTemplate>