Create a new lock type

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::create($client, array(
4    "name" => "VIP",
5    "color" => "#AE77FB",
6    "hideseats" => true,
7    "ishardlock" => true,
8));

Response

 1object(\Ticketmatic\Model\LockType) (8) {
 2  ["id"]=>
 3  int(0)
 4  ["name"]=>
 5  string(3) "VIP"
 6  ["color"]=>
 7  string(7) "#AE77FB"
 8  ["hideseats"]=>
 9  bool(true)
10  ["ishardlock"]=>
11  bool(true)
12  ["isarchived"]=>
13  bool(false)
14  ["createdts"]=>
15  object(\DateTime) (3) {
16    ["date"]=>
17    string(26) "2014-09-26 15:24:36.000000"
18    ["timezone_type"]=>
19    int(3)
20    ["timezone"]=>
21    string(3) "UTC"
22  }
23  ["lastupdatets"]=>
24  object(\DateTime) (3) {
25    ["date"]=>
26    string(26) "2014-09-26 15:24:36.000000"
27    ["timezone_type"]=>
28    int(3)
29    ["timezone"]=>
30    string(3) "UTC"
31  }
32}

Request

 1import (
 2    "github.com/ticketmatic/tm-go/ticketmatic"
 3    "github.com/ticketmatic/tm-go/ticketmatic/settings/ticketsales/locktypes"
 4)
 5
 6result, err := locktypes.Create(client, &ticketmatic.LockType{
 7    Name: "VIP",
 8    Color: "#AE77FB",
 9    Hideseats: true,
10    Ishardlock: true,
11})

Response

 1result := &ticketmatic.LockType{
 2    Id: 123,
 3    Name: "VIP",
 4    Color: "#AE77FB",
 5    Hideseats: true,
 6    Ishardlock: true,
 7    Isarchived: false,
 8    Createdts: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
 9    Lastupdatets: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
10}

Request

1POST /api/1/{accountname}/settings/ticketsales/locktypes HTTP/1.1
2Content-Type: application/json
3
4{
5    "name": "VIP",
6    "color": "#AE77FB",
7    "hideseats": true,
8    "ishardlock": true
9}

Response

 1HTTP/1.1 200 OK
 2Content-Type: application/json
 3
 4{
 5    "id": 123,
 6    "name": "VIP",
 7    "color": "#AE77FB",
 8    "hideseats": true,
 9    "ishardlock": true,
10    "isarchived": false,
11    "createdts": "2014-09-26 15:24:36",
12    "lastupdatets": "2014-09-26 15:24:36"
13}

Request body fields

FieldDescription
name
mlstring 
(required)

Name for the lock type

Example value:"VIP"
color
string 
(required)

The color of the lock type

Example value:"#AE77FB"
hideseats
bool 
(required)

Hides seats in online sales if this is true

Example value:true
ishardlock
bool 
(required)

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

Type reference: LockType

Result fields

FieldDescription
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