Get a list of ticketsalesflows

Content

Resource URL

https://apps.ticketmatic.com/api/1/{accountname}/settings/system/ticketsalesflows

Example

Request

1use Ticketmatic\Endpoints\Settings\System\Ticketsalesflows;
2
3$result = Ticketsalesflows::getlist($client, array(
4    "filter" => "SELECT id FROM conf.ticketsalesflow WHERE code='default'",
5    "lastupdatesince" => "2014-09-26 15:24:36",
6));
7
8// The parameters array is optional, it can be omitted when empty.
9$result = Ticketsalesflows::getlist($client);

Response

 1object(Ticketmatic\Endpoints\Settings\System\TicketsalesflowsList) (1) {
 2  ["data"]=>
 3  array(1) {
 4    [0]=>
 5    object(\Ticketmatic\Model\Ticketsalesflow) (10) {
 6      ["id"]=>
 7      int(0)
 8      ["name"]=>
 9      string(17) "Season start 2018"
10      ["availabilityfielddefinition"]=>
11      string(7) "theatre"
12      ["code"]=>
13      string(10) "season2018"
14      ["config"]=>
15      array(2) {
16        [0]=>
17        object(\Ticketmatic\Model\TicketsalesFlowConfig) (4) {
18          ["from"]=>
19          object(\DateTime) (3) {
20            ["date"]=>
21            string(26) "2016-01-01 00:00:00.000000"
22            ["timezone_type"]=>
23            int(3)
24            ["timezone"]=>
25            string(3) "UTC"
26          }
27          ["until"]=>
28          object(\DateTime) (3) {
29            ["date"]=>
30            string(26) "2016-06-15 00:00:00.000000"
31            ["timezone_type"]=>
32            int(3)
33            ["timezone"]=>
34            string(3) "UTC"
35          }
36          ["widget"]=>
37          string(10) "addtickets"
38          ["widgetparams"]=>
39          array(1) {
40            ["flow"]=>
41            string(18) "basketwithcheckout"
42          }
43        }
44        [1]=>
45        object(\Ticketmatic\Model\TicketsalesFlowConfig) (4) {
46          ["from"]=>
47          object(\DateTime) (3) {
48            ["date"]=>
49            string(26) "2016-06-15 00:00:00.000000"
50            ["timezone_type"]=>
51            int(3)
52            ["timezone"]=>
53            string(3) "UTC"
54          }
55          ["until"]=>
56          object(\DateTime) (3) {
57            ["date"]=>
58            string(26) "2017-06-15 00:00:00.000000"
59            ["timezone_type"]=>
60            int(3)
61            ["timezone"]=>
62            string(3) "UTC"
63          }
64          ["widget"]=>
65          string(10) "addtickets"
66          ["widgetparams"]=>
67          array(1) {
68            ["flow"]=>
69            string(6) "return"
70          }
71        }
72      }
73      ["description"]=>
74      string(43) "Sales flow for the start of the season 2018"
75      ["productavailability"]=>
76      array(2) {
77        [0]=>
78        int(0)
79        [1]=>
80        int(0)
81      }
82      ["supportedparameters"]=>
83      array(2) {
84        [0]=>
85        string(5) "event"
86        [1]=>
87        string(7) "product"
88      }
89      ["testmode"]=>
90      bool(false)
91      ["ticketsalessetupid"]=>
92      int(0)
93    }
94  }
95}

Request

 1import (
 2    "github.com/ticketmatic/tm-go/ticketmatic"
 3    "github.com/ticketmatic/tm-go/ticketmatic/settings/system/ticketsalesflows"
 4)
 5
 6result, err := ticketsalesflows.Getlist(client, &ticketmatic.TicketsalesflowQuery{
 7    Filter: "SELECT id FROM conf.ticketsalesflow WHERE code='default'",
 8    Lastupdatesince: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
 9})
10
11// The query object is optional, it can be omitted when empty.
12result, err := ticketsalesflows.Getlist(client, nil)

Response

 1result := ticketsalesflows.&List{
 2    Data: []*ticketmatic.Ticketsalesflow{
 3        &ticketmatic.Ticketsalesflow{
 4            Id: 123,
 5            Name: "Season start 2018",
 6            Availabilityfielddefinition: "theatre",
 7            Code: "season2018",
 8            Config: []*ticketmatic.TicketsalesFlowConfig{
 9                &ticketmatic.TicketsalesFlowConfig{
10                    From: ticketmatic.NewTime(ticketmatic.MustParseTime("2016-01-01 00:00:00")),
11                    Until: ticketmatic.NewTime(ticketmatic.MustParseTime("2016-06-15 00:00:00")),
12                    Widget: "addtickets",
13                    Widgetparams: map[string]string{
14                        "flow": "basketwithcheckout",
15                    },
16                },
17                &ticketmatic.TicketsalesFlowConfig{
18                    From: ticketmatic.NewTime(ticketmatic.MustParseTime("2016-06-15 00:00:00")),
19                    Until: ticketmatic.NewTime(ticketmatic.MustParseTime("2017-06-15 00:00:00")),
20                    Widget: "addtickets",
21                    Widgetparams: map[string]string{
22                        "flow": "return",
23                    },
24                },
25            },
26            Description: "Sales flow for the start of the season 2018",
27            Productavailability: []int64{
28                26001,
29                26002,
30            },
31            Supportedparameters: []string{
32                "event",
33                "product",
34            },
35            Testmode: false,
36            Ticketsalessetupid: 1,
37        },
38    },
39}

Request

1GET /api/1/{accountname}/settings/system/ticketsalesflows HTTP/1.1

Response

 1HTTP/1.1 200 OK
 2Content-Type: application/json
 3
 4{
 5    "data": [
 6        {
 7            "id": 123,
 8            "name": "Season start 2018",
 9            "availabilityfielddefinition": "theatre",
10            "code": "season2018",
11            "config": [
12                {
13                    "from": "2016-01-01 00:00:00",
14                    "until": "2016-06-15 00:00:00",
15                    "widget": "addtickets",
16                    "widgetparams": {
17                        "flow": "basketwithcheckout"
18                    }
19                },
20                {
21                    "from": "2016-06-15 00:00:00",
22                    "until": "2017-06-15 00:00:00",
23                    "widget": "addtickets",
24                    "widgetparams": {
25                        "flow": "return"
26                    }
27                }
28            ],
29            "description": "Sales flow for the start of the season 2018",
30            "productavailability": [ 26001, 26002 ],
31            "supportedparameters": [
32                "event",
33                "product"
34            ],
35            "testmode": false,
36            "ticketsalessetupid": 1
37        }
38    ]
39}

Parameters

FieldDescription
filter
        </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 conf.ticketsalesflow WHERE code=&#39;default&#39;&#34;</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: TicketsalesflowQuery

Result fields

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

FieldDescription
id
int

Unique ID

Example value:123
name
string

Name

Example value:"Season start 2018"
availabilityfielddefinition
string

Fielddefinition used to define the availability of events for this flow

Example value:"theatre"
code
string

Unique code used for the flow. Should only contain lower case letters and digits

Example value:"season2018"
config

Config for the flow

Example value:[ { "from": "2016-01-01 00:00:00", "until": "2016-06-15 00:00:00", "widget": "addtickets", "widgetparams": { "flow": "basketwithcheckout" } }, { "from": "2016-06-15 00:00:00", "until": "2017-06-15 00:00:00", "widget": "addtickets", "widgetparams": { "flow": "return" } } ]
description
string

Description

Example value:"Sales flow for the start of the season 2018"
productavailability
int[]

For flows with supported parameter ‘product’: the set of ProductTypes for which this flow is available

Example value:[ 26001, 26002 ]
supportedparameters
string[]

Supported parameters for the flow

Example value:[ "event", "product" ]
testmode
bool

Whether or not the flow is in test mode

ticketsalessetupid
int

Ticket sales setup this flow belongs to

Example value:1

Type reference: Ticketsalesflow[]