GET rest/siteTemplates/{siteTemplateId}

Gets a site template.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
siteTemplateId

Site template id.

globally unique identifier

Required

Body Parameters

None.

Response Information

Resource Description

SiteTemplate
NameDescriptionTypeAdditional information
id

Id of site template, must be unique.

globally unique identifier

None.

Version

Coupon version. Default is 0. Use version 2 for the new html template engine.

byte

None.

PartnerId

Id of Link partner from Partner API. If not set, this template is regarded as a "global template" that can be used for coupons for any partner.

integer

None.

Name

Name of site template.

string

None.

Properties

[Version 1] Properties of template.

Dictionary of string [key] and string [value]

None.

Pages

[Version 1] Pages in template.

Collection of SiteTemplatePage

None.

HtmlTemplate

[Version 2] Html template.

string

None.

BookletHtmlTemplate

[Version 2] Booklet html template.

string

None.

Response Formats

application/json, text/json

Sample:
{
  "id": "33283377-b530-40b9-a805-088938ee3074",
  "version": 64,
  "partnerId": 1,
  "name": "sample string 2",
  "properties": {
    "sample string 1": "sample string 2",
    "sample string 3": "sample string 4"
  },
  "pages": [
    {
      "name": "sample string 2",
      "type": "sample string 3",
      "content": "sample string 4",
      "partial": true
    },
    {
      "name": "sample string 2",
      "type": "sample string 3",
      "content": "sample string 4",
      "partial": true
    }
  ],
  "htmlTemplate": "sample string 3",
  "bookletHtmlTemplate": "sample string 4"
}

application/xml, text/xml

Sample:
<SiteTemplate xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.linkmobility.com/common/coupons">
  <BookletHtmlTemplate>sample string 4</BookletHtmlTemplate>
  <HtmlTemplate>sample string 3</HtmlTemplate>
  <Name>sample string 2</Name>
  <Pages>
    <SiteTemplatePage>
      <Content>sample string 4</Content>
      <Name>sample string 2</Name>
      <Partial>true</Partial>
      <Type>sample string 3</Type>
    </SiteTemplatePage>
    <SiteTemplatePage>
      <Content>sample string 4</Content>
      <Name>sample string 2</Name>
      <Partial>true</Partial>
      <Type>sample string 3</Type>
    </SiteTemplatePage>
  </Pages>
  <PartnerId>1</PartnerId>
  <Properties xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>sample string 1</d2p1:Key>
      <d2p1:Value>sample string 2</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
    <d2p1:KeyValueOfstringstring>
      <d2p1:Key>sample string 3</d2p1:Key>
      <d2p1:Value>sample string 4</d2p1:Value>
    </d2p1:KeyValueOfstringstring>
  </Properties>
  <Version>64</Version>
  <id>33283377-b530-40b9-a805-088938ee3074</id>
</SiteTemplate>