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}

Parameters

FieldDescription
typeid
        </td>
        <td class="description">
            <p>Only return items with the given typeid.</p> 
            <strong>Example value:</strong><code>1</code>
        </td>
    </tr><tr>
        <td class="field">
            <div class="name">filter</div>
            
        </td>
        <td class="description">
            <p>Filter the returned items by specifying a query on the public datamodel that returns the ids.</p> 
            <strong>Example value:</strong><code>&#34;SELECT id FROM tm.ticketlayouttemplate WHERE createdts &gt; (now() - INTERVAL &#39;1 year&#39;)&#34;</code>
        </td>
    </tr><tr>
        <td class="field">
            <div class="name">includearchived</div>
            
        </td>
        <td class="description">
            <p>If this parameter is true, archived items will be returned as well.</p> 
            <strong>Example value:</strong><code>true</code>
        </td>
    </tr><tr>
        <td class="field">
            <div class="name">lastupdatesince</div>
            
        </td>
        <td class="description">
            <p>All items that were updated since this timestamp will be returned. Timestamp should be passed in <code>YYYY-MM-DD hh:mm:ss</code> format.</p> 
            <strong>Example value:</strong><code>&#34;2014-09-26 15:24:36&#34;</code>
        </td>
    </tr>
</tbody>

Type reference: TicketLayoutTemplateQuery

Result fields

This call returns an object with an array of objects in the data field.

FieldDescription
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[]