Get a single ticketsalesflow

Content

Resource URL

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

Example

Request

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

Response

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

Request

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

Response

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

Request

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

Response

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

Result fields

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