Get a single order mail template

Content

Resource URL

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

Example

Request

1use Ticketmatic\Endpoints\Settings\Communicationanddesign\Ordermails;
2
3$result = Ordermails::get($client, $id);

Response

 1object(\Ticketmatic\Model\OrderMailTemplate) (9) {
 2  ["id"]=>
 3  int(0)
 4  ["typeid"]=>
 5  int(0)
 6  ["name"]=>
 7  string(18) "Order confirmation"
 8  ["body"]=>
 9  string(22) "<!-- Block of HTML -->"
10  ["subject"]=>
11  string(16) "Your reservation"
12  ["translations"]=>
13  array(1) {
14    ["nl"]=>
15    string(3) "..."
16  }
17  ["isarchived"]=>
18  bool(false)
19  ["createdts"]=>
20  object(\DateTime) (3) {
21    ["date"]=>
22    string(26) "2014-09-26 15:24:36.000000"
23    ["timezone_type"]=>
24    int(3)
25    ["timezone"]=>
26    string(3) "UTC"
27  }
28  ["lastupdatets"]=>
29  object(\DateTime) (3) {
30    ["date"]=>
31    string(26) "2014-09-26 15:24:36.000000"
32    ["timezone_type"]=>
33    int(3)
34    ["timezone"]=>
35    string(3) "UTC"
36  }
37}

Request

1import (
2    "github.com/ticketmatic/tm-go/ticketmatic"
3    "github.com/ticketmatic/tm-go/ticketmatic/settings/communicationanddesign/ordermails"
4)
5
6result, err := ordermails.Get(client, id)

Response

 1result := &ticketmatic.OrderMailTemplate{
 2    Id: 123,
 3    Typeid: 3101,
 4    Name: "Order confirmation",
 5    Body: "<!-- Block of HTML -->",
 6    Subject: "Your reservation",
 7    Translations: map[string]string{
 8        "nl": "...",
 9    },
10    Isarchived: false,
11    Createdts: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
12    Lastupdatets: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
13}

Request

1GET /api/1/{accountname}/settings/communicationanddesign/ordermails/{id} HTTP/1.1

Response

 1HTTP/1.1 200 OK
 2Content-Type: application/json
 3
 4{
 5    "id": 123,
 6    "typeid": 3101,
 7    "name": "Order confirmation",
 8    "body": "<!-- Block of HTML -->",
 9    "subject": "Your reservation",
10    "translations": {
11        "nl": "..."
12    },
13    "isarchived": false,
14    "createdts": "2014-09-26 15:24:36",
15    "lastupdatets": "2014-09-26 15:24:36"
16}

Result fields

FieldDescription
id
int

Unique ID

Example value:123
typeid
int

The type of this order mail template, defines where this template is used. The available values for this field can be found on the order mail template overview page.

Example value:3101
name
string

Name of the order mail template

Example value:"Order confirmation"
body
string

Message body

Example value:"<!-- Block of HTML -->"
subject
string

Subject line for the order mail template

Example value:"Your reservation"
translations
map<string, string>

A map of language codes to gettext .po files. More info can be found on the order mail template overview page.

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

Whether or not this item is archived

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: OrderMailTemplate