Get a list of seating plans
Content
Resource URL
https://apps.ticketmatic.com/api/1/{accountname}/settings/seatingplans/seatingplans
Example
Request
1use Ticketmatic\Endpoints\Settings\Seatingplans\Seatingplans;
2
3$result = Seatingplans::getlist($client, array(
4 "filter" => "select id from tm.seatingplan where status = 'draft'",
5 "includearchived" => true,
6 "lastupdatesince" => "2014-09-26 15:24:36",
7));
8
9// The parameters array is optional, it can be omitted when empty.
10$result = Seatingplans::getlist($client);
Response
1object(Ticketmatic\Endpoints\Settings\Seatingplans\SeatingplansList) (1) {
2 ["data"]=>
3 array(1) {
4 [0]=>
5 object(\Ticketmatic\Model\SeatingPlan) (7) {
6 ["id"]=>
7 int(0)
8 ["name"]=>
9 string(15) "The Opera House"
10 ["status"]=>
11 string(5) "draft"
12 ["useszones"]=>
13 bool(false)
14 ["isarchived"]=>
15 bool(false)
16 ["createdts"]=>
17 object(\DateTime) (3) {
18 ["date"]=>
19 string(26) "2014-09-26 15:24:36.000000"
20 ["timezone_type"]=>
21 int(3)
22 ["timezone"]=>
23 string(3) "UTC"
24 }
25 ["lastupdatets"]=>
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 }
35 }
36}
Request
1import (
2 "github.com/ticketmatic/tm-go/ticketmatic"
3 "github.com/ticketmatic/tm-go/ticketmatic/settings/seatingplans/seatingplans"
4)
5
6result, err := seatingplans.Getlist(client, &ticketmatic.SeatingPlanQuery{
7 Filter: "select id from tm.seatingplan where status = 'draft'",
8 Includearchived: true,
9 Lastupdatesince: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
10})
11
12// The query object is optional, it can be omitted when empty.
13result, err := seatingplans.Getlist(client, nil)
Response
1result := seatingplans.&List{
2 Data: []*ticketmatic.SeatingPlan{
3 &ticketmatic.SeatingPlan{
4 Id: 123,
5 Name: "The Opera House",
6 Status: "draft",
7 Useszones: false,
8 Isarchived: false,
9 Createdts: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
10 Lastupdatets: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
11 },
12 },
13}
Request
1GET /api/1/{accountname}/settings/seatingplans/seatingplans HTTP/1.1
Response
1HTTP/1.1 200 OK
2Content-Type: application/json
3
4{
5 "data": [
6 {
7 "id": 123,
8 "name": "The Opera House",
9 "status": "draft",
10 "useszones": false,
11 "isarchived": false,
12 "createdts": "2014-09-26 15:24:36",
13 "lastupdatets": "2014-09-26 15:24:36"
14 }
15 ]
16}
Parameters
Field | Description |
---|---|
filter
|
Type reference: SeatingPlanQuery
Result fields
This call returns an object with an array of objects in the data
field.
Field | Description |
---|---|
id int | Unique ID Example value:123 |
name string | The name for the seating plan Example value:"The Opera House" |
status string | The status this seating plan is in Example value:"draft" |
useszones bool | When true: treat as a multi-zoned seatingplan |
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: SeatingPlan[]