Get a list of lock types
Content
Resource URL
https://apps.ticketmatic.com/api/1/{accountname}/settings/ticketsales/locktypes
Example
Request
1use Ticketmatic\Endpoints\Settings\Ticketsales\Locktypes;
2
3$result = Locktypes::getlist($client, array(
4 "filter" => "SELECT id FROM tm.locktype WHERE ishardlock='t'",
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 = Locktypes::getlist($client);
Response
1object(Ticketmatic\Endpoints\Settings\Ticketsales\LocktypesList) (1) {
2 ["data"]=>
3 array(1) {
4 [0]=>
5 object(\Ticketmatic\Model\LockType) (8) {
6 ["id"]=>
7 int(0)
8 ["name"]=>
9 string(3) "VIP"
10 ["color"]=>
11 string(7) "#AE77FB"
12 ["hideseats"]=>
13 bool(true)
14 ["ishardlock"]=>
15 bool(true)
16 ["isarchived"]=>
17 bool(false)
18 ["createdts"]=>
19 object(\DateTime) (3) {
20 ["date"]=>
21 string(26) "2014-09-26 15:24:36.000000"
22 ["timezone_type"]=>
23 int(3)
24 ["timezone"]=>
25 string(3) "UTC"
26 }
27 ["lastupdatets"]=>
28 object(\DateTime) (3) {
29 ["date"]=>
30 string(26) "2014-09-26 15:24:36.000000"
31 ["timezone_type"]=>
32 int(3)
33 ["timezone"]=>
34 string(3) "UTC"
35 }
36 }
37 }
38}
Request
1import (
2 "github.com/ticketmatic/tm-go/ticketmatic"
3 "github.com/ticketmatic/tm-go/ticketmatic/settings/ticketsales/locktypes"
4)
5
6result, err := locktypes.Getlist(client, &ticketmatic.LockTypeQuery{
7 Filter: "SELECT id FROM tm.locktype WHERE ishardlock='t'",
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 := locktypes.Getlist(client, nil)
Response
1result := locktypes.&List{
2 Data: []*ticketmatic.LockType{
3 &ticketmatic.LockType{
4 Id: 123,
5 Name: "VIP",
6 Color: "#AE77FB",
7 Hideseats: true,
8 Ishardlock: true,
9 Isarchived: false,
10 Createdts: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
11 Lastupdatets: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
12 },
13 },
14}
Request
1GET /api/1/{accountname}/settings/ticketsales/locktypes HTTP/1.1
Response
1HTTP/1.1 200 OK
2Content-Type: application/json
3
4{
5 "data": [
6 {
7 "id": 123,
8 "name": "VIP",
9 "color": "#AE77FB",
10 "hideseats": true,
11 "ishardlock": true,
12 "isarchived": false,
13 "createdts": "2014-09-26 15:24:36",
14 "lastupdatets": "2014-09-26 15:24:36"
15 }
16 ]
17}
Parameters
Field | Description |
---|---|
filter
|
Type reference: LockTypeQuery
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 | Name for the lock type Example value:"VIP" |
color string | The color of the lock type Example value:"#AE77FB" |
hideseats bool | Hides seats in online sales if this is true Example value:true |
ishardlock bool | Indicates whether this lock is a hard lock (meaning that it normally never will be released and does not count for the inventory) or a soft lock Example value:true |
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: LockType[]