Get the logical plan for a specific zone
Content
Resource URL
https://apps.ticketmatic.com/api/1/{accountname}/settings/seatingplans/seatingplans/{id}/logicalplan/{zoneid}
Description
Returns the logical plan for this specific zone.
Example
Request
1use Ticketmatic\Endpoints\Settings\Seatingplans\Seatingplans;
2
3$result = Seatingplans::getlogicalplan($client, $id, $zoneid);
Response
1object(\Ticketmatic\Model\LogicalPlan) (3) {
2 ["id"]=>
3 int(0)
4 ["name"]=>
5 string(13) "Upper Balcony"
6 ["rows"]=>
7 array(2) {
8 [0]=>
9 object(\Ticketmatic\Model\LogicalPlanRow) (3) {
10 ["name"]=>
11 string(1) "A"
12 ["coord"]=>
13 int(0)
14 ["seats"]=>
15 array(2) {
16 [0]=>
17 object(\Ticketmatic\Model\LogicalPlanSeat) (8) {
18 ["id"]=>
19 string(10) "s002001001"
20 ["name"]=>
21 string(1) "1"
22 ["center"]=>
23 array(2) {
24 [0]=>
25 float(312.000000)
26 [1]=>
27 float(834.500000)
28 }
29 ["coord"]=>
30 int(0)
31 ["priority"]=>
32 int(0)
33 ["rowname"]=>
34 string(1) "A"
35 ["seatrankid"]=>
36 int(0)
37 ["size"]=>
38 array(2) {
39 [0]=>
40 float(12.000000)
41 [1]=>
42 float(12.000000)
43 }
44 }
45 [1]=>
46 object(\Ticketmatic\Model\LogicalPlanSeat) (8) {
47 ["id"]=>
48 string(10) "s002001002"
49 ["name"]=>
50 string(1) "2"
51 ["center"]=>
52 array(2) {
53 [0]=>
54 float(330.000000)
55 [1]=>
56 float(834.500000)
57 }
58 ["coord"]=>
59 int(0)
60 ["priority"]=>
61 int(0)
62 ["rowname"]=>
63 string(1) "A"
64 ["seatrankid"]=>
65 int(0)
66 ["size"]=>
67 array(2) {
68 [0]=>
69 float(12.000000)
70 [1]=>
71 float(12.000000)
72 }
73 }
74 }
75 }
76 [1]=>
77 object(\Ticketmatic\Model\LogicalPlanRow) (3) {
78 ["name"]=>
79 string(1) "B"
80 ["coord"]=>
81 int(0)
82 ["seats"]=>
83 array(2) {
84 [0]=>
85 object(\Ticketmatic\Model\LogicalPlanSeat) (8) {
86 ["id"]=>
87 string(10) "s002002001"
88 ["name"]=>
89 string(1) "2"
90 ["center"]=>
91 array(2) {
92 [0]=>
93 float(312.000000)
94 [1]=>
95 float(854.500000)
96 }
97 ["coord"]=>
98 int(0)
99 ["priority"]=>
100 int(0)
101 ["rowname"]=>
102 string(1) "B"
103 ["seatrankid"]=>
104 int(0)
105 ["size"]=>
106 array(2) {
107 [0]=>
108 float(12.000000)
109 [1]=>
110 float(12.000000)
111 }
112 }
113 [1]=>
114 object(\Ticketmatic\Model\LogicalPlanSeat) (8) {
115 ["id"]=>
116 string(10) "s002001002"
117 ["name"]=>
118 string(1) "2"
119 ["center"]=>
120 array(2) {
121 [0]=>
122 float(330.000000)
123 [1]=>
124 float(854.500000)
125 }
126 ["coord"]=>
127 int(0)
128 ["priority"]=>
129 int(0)
130 ["rowname"]=>
131 string(1) "B"
132 ["seatrankid"]=>
133 int(0)
134 ["size"]=>
135 array(2) {
136 [0]=>
137 float(12.000000)
138 [1]=>
139 float(12.000000)
140 }
141 }
142 }
143 }
144 }
145}
Request
1import (
2 "github.com/ticketmatic/tm-go/ticketmatic"
3 "github.com/ticketmatic/tm-go/ticketmatic/settings/seatingplans/seatingplans"
4)
5
6result, err := seatingplans.Getlogicalplan(client, id, zoneid)
Response
1result := &ticketmatic.LogicalPlan{
2 Id: 2,
3 Name: "Upper Balcony",
4 Rows: []*ticketmatic.LogicalPlanRow{
5 &ticketmatic.LogicalPlanRow{
6 Name: "A",
7 Coord: 1,
8 Seats: []*ticketmatic.LogicalPlanSeat{
9 &ticketmatic.LogicalPlanSeat{
10 Id: "s002001001",
11 Name: "1",
12 Center: []float64{
13 312,
14 834.5,
15 },
16 Coord: 1,
17 Priority: 85,
18 Rowname: "A",
19 Seatrankid: 1,
20 Size: []float64{
21 12,
22 12,
23 },
24 },
25 &ticketmatic.LogicalPlanSeat{
26 Id: "s002001002",
27 Name: "2",
28 Center: []float64{
29 330,
30 834.5,
31 },
32 Coord: 1,
33 Priority: 85,
34 Rowname: "A",
35 Seatrankid: 1,
36 Size: []float64{
37 12,
38 12,
39 },
40 },
41 },
42 },
43 &ticketmatic.LogicalPlanRow{
44 Name: "B",
45 Coord: 2,
46 Seats: []*ticketmatic.LogicalPlanSeat{
47 &ticketmatic.LogicalPlanSeat{
48 Id: "s002002001",
49 Name: "2",
50 Center: []float64{
51 312,
52 854.5,
53 },
54 Coord: 2,
55 Priority: 15,
56 Rowname: "B",
57 Seatrankid: 3,
58 Size: []float64{
59 12,
60 12,
61 },
62 },
63 &ticketmatic.LogicalPlanSeat{
64 Id: "s002001002",
65 Name: "2",
66 Center: []float64{
67 330,
68 854.5,
69 },
70 Coord: 2,
71 Priority: 15,
72 Rowname: "B",
73 Seatrankid: 3,
74 Size: []float64{
75 12,
76 12,
77 },
78 },
79 },
80 },
81 },
82}
Request
1GET /api/1/{accountname}/settings/seatingplans/seatingplans/{id}/logicalplan/{zoneid} HTTP/1.1
Response
1HTTP/1.1 200 OK
2Content-Type: application/json
3
4{
5 "id": 2,
6 "name": "Upper Balcony",
7 "rows": [
8 {
9 "name": "A",
10 "coord": 1,
11 "seats": [
12 {
13 "id": "s002001001",
14 "name": "1",
15 "center": [ 312.000000, 834.500000 ],
16 "coord": 1,
17 "priority": 85,
18 "rowname": "A",
19 "seatrankid": 1,
20 "size": [ 12.000000, 12.000000 ]
21 },
22 {
23 "id": "s002001002",
24 "name": "2",
25 "center": [ 330.000000, 834.500000 ],
26 "coord": 1,
27 "priority": 85,
28 "rowname": "A",
29 "seatrankid": 1,
30 "size": [ 12.000000, 12.000000 ]
31 }
32 ]
33 },
34 {
35 "name": "B",
36 "coord": 2,
37 "seats": [
38 {
39 "id": "s002002001",
40 "name": "2",
41 "center": [ 312.000000, 854.500000 ],
42 "coord": 2,
43 "priority": 15,
44 "rowname": "B",
45 "seatrankid": 3,
46 "size": [ 12.000000, 12.000000 ]
47 },
48 {
49 "id": "s002001002",
50 "name": "2",
51 "center": [ 330.000000, 854.500000 ],
52 "coord": 2,
53 "priority": 15,
54 "rowname": "B",
55 "seatrankid": 3,
56 "size": [ 12.000000, 12.000000 ]
57 }
58 ]
59 }
60 ]
61}
Result fields
Field | Description |
---|---|
id int | The ID of the zone Example value:2 |
name string | The name of the zone Example value:"Upper Balcony" |
rows | The rows layout Example value:[ { "name": "A", "coord": 1, "seats": [ { "id": "s002001001", "name": "1", "center": [ 312.000000, 834.500000 ], "coord": 1, "priority": 85, "rowname": "A", "seatrankid": 1, "size": [ 12.000000, 12.000000 ] }, { "id": "s002001002", "name": "2", "center": [ 330.000000, 834.500000 ], "coord": 1, "priority": 85, "rowname": "A", "seatrankid": 1, "size": [ 12.000000, 12.000000 ] } ] }, { "name": "B", "coord": 2, "seats": [ { "id": "s002002001", "name": "2", "center": [ 312.000000, 854.500000 ], "coord": 2, "priority": 15, "rowname": "B", "seatrankid": 3, "size": [ 12.000000, 12.000000 ] }, { "id": "s002001002", "name": "2", "center": [ 330.000000, 854.500000 ], "coord": 2, "priority": 15, "rowname": "B", "seatrankid": 3, "size": [ 12.000000, 12.000000 ] } ] } ] |
Type reference: LogicalPlan