Update the logical plan for this zone.

Content

Resource URL

https://apps.ticketmatic.com/api/1/{accountname}/settings/seatingplans/seatingplans/{id}/logicalplan/{zoneid}

Description

Updates the logical plan for this zone.

Example

Request

 1use Ticketmatic\Endpoints\Settings\Seatingplans\Seatingplans;
 2
 3$result = Seatingplans::savelogicalplan($client, $id, $zoneid, array(
 4    "id" => 2,
 5    "name" => "Upper Balcony",
 6    "rows" => array(
 7        array(
 8            "name" => "A",
 9            "coord" => 1,
10            "seats" => array(
11                array(
12                    "id" => "s002001001",
13                    "name" => "1",
14                    "center" => array(
15                        312,
16                        834.5,
17                    ),
18                    "coord" => 1,
19                    "priority" => 85,
20                    "rowname" => "A",
21                    "seatrankid" => 1,
22                    "size" => array(
23                        12,
24                        12,
25                    ),
26                ),
27                array(
28                    "id" => "s002001002",
29                    "name" => "2",
30                    "center" => array(
31                        330,
32                        834.5,
33                    ),
34                    "coord" => 1,
35                    "priority" => 85,
36                    "rowname" => "A",
37                    "seatrankid" => 1,
38                    "size" => array(
39                        12,
40                        12,
41                    ),
42                ),
43            ),
44        ),
45        array(
46            "name" => "B",
47            "coord" => 2,
48            "seats" => array(
49                array(
50                    "id" => "s002002001",
51                    "name" => "2",
52                    "center" => array(
53                        312,
54                        854.5,
55                    ),
56                    "coord" => 2,
57                    "priority" => 15,
58                    "rowname" => "B",
59                    "seatrankid" => 3,
60                    "size" => array(
61                        12,
62                        12,
63                    ),
64                ),
65                array(
66                    "id" => "s002001002",
67                    "name" => "2",
68                    "center" => array(
69                        330,
70                        854.5,
71                    ),
72                    "coord" => 2,
73                    "priority" => 15,
74                    "rowname" => "B",
75                    "seatrankid" => 3,
76                    "size" => array(
77                        12,
78                        12,
79                    ),
80                ),
81            ),
82        ),
83    ),
84));

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.Savelogicalplan(client, id, zoneid, &ticketmatic.LogicalPlan{
 7    Id: 2,
 8    Name: "Upper Balcony",
 9    Rows: []*ticketmatic.LogicalPlanRow{
10        &ticketmatic.LogicalPlanRow{
11            Name: "A",
12            Coord: 1,
13            Seats: []*ticketmatic.LogicalPlanSeat{
14                &ticketmatic.LogicalPlanSeat{
15                    Id: "s002001001",
16                    Name: "1",
17                    Center: []float64{
18                        312,
19                        834.5,
20                    },
21                    Coord: 1,
22                    Priority: 85,
23                    Rowname: "A",
24                    Seatrankid: 1,
25                    Size: []float64{
26                        12,
27                        12,
28                    },
29                },
30                &ticketmatic.LogicalPlanSeat{
31                    Id: "s002001002",
32                    Name: "2",
33                    Center: []float64{
34                        330,
35                        834.5,
36                    },
37                    Coord: 1,
38                    Priority: 85,
39                    Rowname: "A",
40                    Seatrankid: 1,
41                    Size: []float64{
42                        12,
43                        12,
44                    },
45                },
46            },
47        },
48        &ticketmatic.LogicalPlanRow{
49            Name: "B",
50            Coord: 2,
51            Seats: []*ticketmatic.LogicalPlanSeat{
52                &ticketmatic.LogicalPlanSeat{
53                    Id: "s002002001",
54                    Name: "2",
55                    Center: []float64{
56                        312,
57                        854.5,
58                    },
59                    Coord: 2,
60                    Priority: 15,
61                    Rowname: "B",
62                    Seatrankid: 3,
63                    Size: []float64{
64                        12,
65                        12,
66                    },
67                },
68                &ticketmatic.LogicalPlanSeat{
69                    Id: "s002001002",
70                    Name: "2",
71                    Center: []float64{
72                        330,
73                        854.5,
74                    },
75                    Coord: 2,
76                    Priority: 15,
77                    Rowname: "B",
78                    Seatrankid: 3,
79                    Size: []float64{
80                        12,
81                        12,
82                    },
83                },
84            },
85        },
86    },
87})

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

 1POST /api/1/{accountname}/settings/seatingplans/seatingplans/{id}/logicalplan/{zoneid} HTTP/1.1
 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}

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}

Request body fields

FieldDescription
id
int 
(required)

The ID of the zone

Example value:2
name
string 
(required)

The name of the zone

Example value:"Upper Balcony"
rows
LogicalPlanRow[] 
(required)

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

Result fields

FieldDescription
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