POST rest/siteTemplates
Creates a new site template or updates an existing. Can also be used to update global templates, but such updates requires special permissions. To update a global template, just omit the PartnerId.
Request Information
URI Parameters
None.
Body Parameters
Coupon site template object.
SiteTemplateName | Description | Type | Additional 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. |
Request Formats
application/json, text/json
{ "id": "744d1127-cccc-44e6-b284-3f429202233b", "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
<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>744d1127-cccc-44e6-b284-3f429202233b</id> </SiteTemplate>
application/x-www-form-urlencoded
Sample not available.
Response Information
Resource Description
None.