Create a new ticket layout
Content
Resource URL
https://apps.ticketmatic.com/api/1/{accountname}/settings/communicationanddesign/ticketlayouts
Example
Request
1use Ticketmatic\Endpoints\Settings\Communicationanddesign\Ticketlayouts;
2
3$result = Ticketlayouts::create($client, array(
4 "typeid" => 1,
5 "name" => "Festival",
6));
Response
1object(\Ticketmatic\Model\TicketLayout) (6) {
2 ["id"]=>
3 int(0)
4 ["typeid"]=>
5 int(0)
6 ["name"]=>
7 string(8) "Festival"
8 ["isarchived"]=>
9 bool(false)
10 ["createdts"]=>
11 object(\DateTime) (3) {
12 ["date"]=>
13 string(26) "2014-09-26 15:24:36.000000"
14 ["timezone_type"]=>
15 int(3)
16 ["timezone"]=>
17 string(3) "UTC"
18 }
19 ["lastupdatets"]=>
20 object(\DateTime) (3) {
21 ["date"]=>
22 string(26) "2014-09-26 15:24:36.000000"
23 ["timezone_type"]=>
24 int(3)
25 ["timezone"]=>
26 string(3) "UTC"
27 }
28}
Request
1import (
2 "github.com/ticketmatic/tm-go/ticketmatic"
3 "github.com/ticketmatic/tm-go/ticketmatic/settings/communicationanddesign/ticketlayouts"
4)
5
6result, err := ticketlayouts.Create(client, &ticketmatic.TicketLayout{
7 Typeid: 1,
8 Name: "Festival",
9})
Response
1result := &ticketmatic.TicketLayout{
2 Id: 123,
3 Typeid: 1,
4 Name: "Festival",
5 Isarchived: false,
6 Createdts: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
7 Lastupdatets: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
8}
Request
1POST /api/1/{accountname}/settings/communicationanddesign/ticketlayouts HTTP/1.1
2Content-Type: application/json
3
4{
5 "typeid": 1,
6 "name": "Festival"
7}
Response
1HTTP/1.1 200 OK
2Content-Type: application/json
3
4{
5 "id": 123,
6 "typeid": 1,
7 "name": "Festival",
8 "isarchived": false,
9 "createdts": "2014-09-26 15:24:36",
10 "lastupdatets": "2014-09-26 15:24:36"
11}
Request body fields
Field | Description |
---|---|
typeid int (required) | Type ID Example value:1 |
name string (required) | Name for the ticket layout Example value:"Festival" |
Type reference: TicketLayout
Result fields
Field | Description |
---|---|
id int | Unique ID Example value:123 |
typeid int | Type ID Example value:1 |
name string | Name for the ticket layout Example value:"Festival" |
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: TicketLayout