Get a list of ticket layout templates
Content
Resource URL
https://apps.ticketmatic.com/api/1/{accountname}/settings/communicationanddesign/ticketlayouttemplates
Example
Request
1use Ticketmatic\Endpoints\Settings\Communicationanddesign\Ticketlayouttemplates;
2
3$result = Ticketlayouttemplates::getlist($client, array(
4 "typeid" => 1,
5 "filter" => "SELECT id FROM tm.ticketlayouttemplate WHERE createdts > (now() - INTERVAL '1 year')",
6 "includearchived" => true,
7 "lastupdatesince" => "2014-09-26 15:24:36",
8));
9
10// The parameters array is optional, it can be omitted when empty.
11$result = Ticketlayouttemplates::getlist($client);
Response
1object(Ticketmatic\Endpoints\Settings\Communicationanddesign\TicketlayouttemplatesList) (1) {
2 ["data"]=>
3 array(1) {
4 [0]=>
5 object(\Ticketmatic\Model\TicketLayoutTemplate) (8) {
6 ["id"]=>
7 int(0)
8 ["typeid"]=>
9 int(0)
10 ["name"]=>
11 string(13) "Print at home"
12 ["deliveryscenarios"]=>
13 array(3) {
14 [0]=>
15 int(0)
16 [1]=>
17 int(0)
18 [2]=>
19 int(0)
20 }
21 ["ticketsperpage"]=>
22 int(0)
23 ["isarchived"]=>
24 bool(false)
25 ["createdts"]=>
26 object(\DateTime) (3) {
27 ["date"]=>
28 string(26) "2014-09-26 15:24:36.000000"
29 ["timezone_type"]=>
30 int(3)
31 ["timezone"]=>
32 string(3) "UTC"
33 }
34 ["lastupdatets"]=>
35 object(\DateTime) (3) {
36 ["date"]=>
37 string(26) "2014-09-26 15:24:36.000000"
38 ["timezone_type"]=>
39 int(3)
40 ["timezone"]=>
41 string(3) "UTC"
42 }
43 }
44 }
45}
Request
1import (
2 "github.com/ticketmatic/tm-go/ticketmatic"
3 "github.com/ticketmatic/tm-go/ticketmatic/settings/communicationanddesign/ticketlayouttemplates"
4)
5
6result, err := ticketlayouttemplates.Getlist(client, &ticketmatic.TicketLayoutTemplateQuery{
7 Typeid: 1,
8 Filter: "SELECT id FROM tm.ticketlayouttemplate WHERE createdts > (now() - INTERVAL '1 year')",
9 Includearchived: true,
10 Lastupdatesince: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
11})
12
13// The query object is optional, it can be omitted when empty.
14result, err := ticketlayouttemplates.Getlist(client, nil)
Response
1result := ticketlayouttemplates.&List{
2 Data: []*ticketmatic.TicketLayoutTemplate{
3 &ticketmatic.TicketLayoutTemplate{
4 Id: 123,
5 Typeid: 1,
6 Name: "Print at home",
7 Deliveryscenarios: []int64{
8 1,
9 2,
10 3,
11 },
12 Ticketsperpage: 1,
13 Isarchived: false,
14 Createdts: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
15 Lastupdatets: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
16 },
17 },
18}
Request
1GET /api/1/{accountname}/settings/communicationanddesign/ticketlayouttemplates HTTP/1.1
Response
1HTTP/1.1 200 OK
2Content-Type: application/json
3
4{
5 "data": [
6 {
7 "id": 123,
8 "typeid": 1,
9 "name": "Print at home",
10 "deliveryscenarios": [ 1, 2, 3 ],
11 "ticketsperpage": 1,
12 "isarchived": false,
13 "createdts": "2014-09-26 15:24:36",
14 "lastupdatets": "2014-09-26 15:24:36"
15 }
16 ]
17}
Parameters
Field | Description |
---|---|
typeid
|
Type reference: TicketLayoutTemplateQuery
Result fields
This call returns an object with an array of objects in the data
field.
Field | Description |
---|---|
id int | Unique ID Example value:123 |
typeid int | Type ID Example value:1 |
name string | Name for the ticket layout template Example value:"Print at home" |
deliveryscenarios int[] | Deliveryscenario’s for which this ticket layout template will be used Example value:[ 1, 2, 3 ] |
ticketsperpage int | Number of tickets to be printed per page Example value:1 |
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: TicketLayoutTemplate[]