Create a new web sales skin

Content

Resource URL

https://apps.ticketmatic.com/api/1/{accountname}/settings/communicationanddesign/webskins

Example

Request

 1use Ticketmatic\Endpoints\Settings\Communicationanddesign\Webskins;
 2
 3$result = Webskins::create($client, array(
 4    "name" => "Website theme",
 5    "configuration" => array(
 6        "title" => "{{tm.page.label | translate}} - {{tm.account.name}}",
 7    ),
 8    "css" => "@import \"style\";",
 9    "html" => "<html><body>{{CONTENT}}</body></html>",
10    "translations" => array(
11        "nl" => "...",
12    ),
13));

Response

 1object(\Ticketmatic\Model\WebSalesSkin) (9) {
 2  ["id"]=>
 3  int(0)
 4  ["name"]=>
 5  string(13) "Website theme"
 6  ["asseturl"]=>
 7  string(37) "https://assets.ticketmatic.com/10349/"
 8  ["configuration"]=>
 9  object(\Ticketmatic\Model\WebSalesSkinConfiguration) (1) {
10    ["title"]=>
11    string(51) "{{tm.page.label | translate}} - {{tm.account.name}}"
12  }
13  ["css"]=>
14  string(16) "@import "style";"
15  ["html"]=>
16  string(37) "<html><body>{{CONTENT}}</body></html>"
17  ["translations"]=>
18  array(1) {
19    ["nl"]=>
20    string(3) "..."
21  }
22  ["createdts"]=>
23  object(\DateTime) (3) {
24    ["date"]=>
25    string(26) "2014-09-26 15:24:36.000000"
26    ["timezone_type"]=>
27    int(3)
28    ["timezone"]=>
29    string(3) "UTC"
30  }
31  ["lastupdatets"]=>
32  object(\DateTime) (3) {
33    ["date"]=>
34    string(26) "2014-09-26 15:24:36.000000"
35    ["timezone_type"]=>
36    int(3)
37    ["timezone"]=>
38    string(3) "UTC"
39  }
40}

Request

 1import (
 2    "github.com/ticketmatic/tm-go/ticketmatic"
 3    "github.com/ticketmatic/tm-go/ticketmatic/settings/communicationanddesign/webskins"
 4)
 5
 6result, err := webskins.Create(client, &ticketmatic.WebSalesSkin{
 7    Name: "Website theme",
 8    Configuration: &ticketmatic.WebSalesSkinConfiguration{
 9        Title: "{{tm.page.label | translate}} - {{tm.account.name}}",
10    },
11    Css: "@import \"style\";",
12    Html: "<html><body>{{CONTENT}}</body></html>",
13    Translations: map[string]string{
14        "nl": "...",
15    },
16})

Response

 1result := &ticketmatic.WebSalesSkin{
 2    Id: 123,
 3    Name: "Website theme",
 4    Asseturl: "https://assets.ticketmatic.com/10349/",
 5    Configuration: &ticketmatic.WebSalesSkinConfiguration{
 6        Title: "{{tm.page.label | translate}} - {{tm.account.name}}",
 7    },
 8    Css: "@import \"style\";",
 9    Html: "<html><body>{{CONTENT}}</body></html>",
10    Translations: map[string]string{
11        "nl": "...",
12    },
13    Createdts: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
14    Lastupdatets: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
15}

Request

 1POST /api/1/{accountname}/settings/communicationanddesign/webskins HTTP/1.1
 2Content-Type: application/json
 3
 4{
 5    "name": "Website theme",
 6    "configuration": {
 7        "title": "{{tm.page.label | translate}} - {{tm.account.name}}"
 8    },
 9    "css": "@import "style";",
10    "html": "<html><body>{{CONTENT}}</body></html>",
11    "translations": {
12        "nl": "..."
13    }
14}

Response

 1HTTP/1.1 200 OK
 2Content-Type: application/json
 3
 4{
 5    "id": 123,
 6    "name": "Website theme",
 7    "asseturl": "https://assets.ticketmatic.com/10349/",
 8    "configuration": {
 9        "title": "{{tm.page.label | translate}} - {{tm.account.name}}"
10    },
11    "css": "@import "style";",
12    "html": "<html><body>{{CONTENT}}</body></html>",
13    "translations": {
14        "nl": "..."
15    },
16    "createdts": "2014-09-26 15:24:36",
17    "lastupdatets": "2014-09-26 15:24:36"
18}

Request body fields

FieldDescription
name
string 
(required)

Name of the web sales skin

Example value:"Website theme"
configuration

Skin configuration.

See the WebSalesSkinConfiguration reference for an overview of all possible options.

Example value:{ "title": "{{tm.page.label | translate}} - {{tm.account.name}}" }
css
string 
(required)

CSS style rules. Should always include the style import.

Example value:"@import "style";"
html
string 
(required)

HTML template of the skin. See the web skin setup guide for more information.

Example value:"<html><body>{{CONTENT}}</body></html>"
translations
map<string, string> 
(required)

A map of language codes to gettext .po files. More info can be found on the web skin overview page.

Example value:{ "nl": "..." }

Type reference: WebSalesSkin

Result fields

FieldDescription
id
int

Unique ID

Example value:123
name
string

Name of the web sales skin

Example value:"Website theme"
asseturl
string

The URL where the assets are stored for this webskin. This property is readonly.

Example value:"https://assets.ticketmatic.com/10349/"
configuration

Skin configuration.

See the WebSalesSkinConfiguration reference for an overview of all possible options.

Example value:{ "title": "{{tm.page.label | translate}} - {{tm.account.name}}" }
css
string

CSS style rules. Should always include the style import.

Example value:"@import "style";"
html
string

HTML template of the skin. See the web skin setup guide for more information.

Example value:"<html><body>{{CONTENT}}</body></html>"
translations
map<string, string>

A map of language codes to gettext .po files. More info can be found on the web skin overview page.

Example value:{ "nl": "..." }
createdts
timestamp

Created timestamp

Example value:"2014-09-26 15:24:36"
lastupdatets
timestamp

Last updated timestamp

Example value:"2014-09-26 15:24:36"

Type reference: WebSalesSkin