GET rest/siteTemplates?global={global}

Gets all site templates for a partner or global templates if the global parameter is set..

Request Information

URI Parameters

NameDescriptionTypeAdditional information
global

If true, global templates are returned instead of partner specific.

boolean

Default value is False

Body Parameters

None.

Response Information

Resource Description

Collection of 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": "596bfd0e-0240-475a-982e-da3fe2f1fdd9",
    "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"
  },
  {
    "id": "596bfd0e-0240-475a-982e-da3fe2f1fdd9",
    "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:
<ArrayOfSiteTemplate xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.linkmobility.com/common/coupons">
  <SiteTemplate>
    <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:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>sample string 1</d3p1:Key>
        <d3p1:Value>sample string 2</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>sample string 3</d3p1:Key>
        <d3p1:Value>sample string 4</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </Properties>
    <Version>64</Version>
    <id>596bfd0e-0240-475a-982e-da3fe2f1fdd9</id>
  </SiteTemplate>
  <SiteTemplate>
    <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:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>sample string 1</d3p1:Key>
        <d3p1:Value>sample string 2</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>sample string 3</d3p1:Key>
        <d3p1:Value>sample string 4</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </Properties>
    <Version>64</Version>
    <id>596bfd0e-0240-475a-982e-da3fe2f1fdd9</id>
  </SiteTemplate>
</ArrayOfSiteTemplate>