Modify an existing seating plan

Content

Resource URL

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

Example

Request

 1use Ticketmatic\Endpoints\Settings\Seatingplans\Seatingplans;
 2
 3$result = Seatingplans::update($client, $id, array(
 4    "name" => "The Opera House",
 5    "status" => "draft",
 6    "translations" => array(
 7        "Seat description - Defaultnl" => "Rij {{rowname}} stoel {{seatname}}",
 8    ),
 9    "useszones" => false,
10));

Response

 1object(\Ticketmatic\Model\SeatingPlan) (9) {
 2  ["id"]=>
 3  int(0)
 4  ["name"]=>
 5  string(15) "The Opera House"
 6  ["status"]=>
 7  string(5) "draft"
 8  ["translations"]=>
 9  array(1) {
10    ["Seat description - Defaultnl"]=>
11    string(34) "Rij {{rowname}} stoel {{seatname}}"
12  }
13  ["useszones"]=>
14  bool(false)
15  ["zones"]=>
16  array(3) {
17    [0]=>
18    int(0)
19    [1]=>
20    int(0)
21    [2]=>
22    int(0)
23  }
24  ["isarchived"]=>
25  bool(false)
26  ["createdts"]=>
27  object(\DateTime) (3) {
28    ["date"]=>
29    string(26) "2014-09-26 15:24:36.000000"
30    ["timezone_type"]=>
31    int(3)
32    ["timezone"]=>
33    string(3) "UTC"
34  }
35  ["lastupdatets"]=>
36  object(\DateTime) (3) {
37    ["date"]=>
38    string(26) "2014-09-26 15:24:36.000000"
39    ["timezone_type"]=>
40    int(3)
41    ["timezone"]=>
42    string(3) "UTC"
43  }
44}

Request

 1import (
 2    "github.com/ticketmatic/tm-go/ticketmatic"
 3    "github.com/ticketmatic/tm-go/ticketmatic/settings/seatingplans/seatingplans"
 4)
 5
 6result, err := seatingplans.Update(client, id, &ticketmatic.SeatingPlan{
 7    Name: "The Opera House",
 8    Status: "draft",
 9    Translations: map[string]string{
10        "Seat description - Defaultnl": "Rij {{rowname}} stoel {{seatname}}",
11    },
12    Useszones: false,
13})

Response

 1result := &ticketmatic.SeatingPlan{
 2    Id: 123,
 3    Name: "The Opera House",
 4    Status: "draft",
 5    Translations: map[string]string{
 6        "Seat description - Defaultnl": "Rij {{rowname}} stoel {{seatname}}",
 7    },
 8    Useszones: false,
 9    Zones: []int64{
10        1,
11        2,
12        3,
13    },
14    Isarchived: false,
15    Createdts: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
16    Lastupdatets: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
17}

Request

 1PUT /api/1/{accountname}/settings/seatingplans/seatingplans/{id} HTTP/1.1
 2Content-Type: application/json
 3
 4{
 5    "name": "The Opera House",
 6    "status": "draft",
 7    "translations": {
 8        "Seat description - Defaultnl": "Rij {{rowname}} stoel {{seatname}}"
 9    },
10    "useszones": false
11}

Response

 1HTTP/1.1 200 OK
 2Content-Type: application/json
 3
 4{
 5    "id": 123,
 6    "name": "The Opera House",
 7    "status": "draft",
 8    "translations": {
 9        "Seat description - Defaultnl": "Rij {{rowname}} stoel {{seatname}}"
10    },
11    "useszones": false,
12    "zones": [ 1, 2, 3 ],
13    "isarchived": false,
14    "createdts": "2014-09-26 15:24:36",
15    "lastupdatets": "2014-09-26 15:24:36"
16}

Request body fields

FieldDescription
name
string 
(required)

The name for the seating plan

Example value:"The Opera House"
status
string 
(required)

The status this seating plan is in

Example value:"draft"
translations
map<string, string> 
(required)

Translations for the seat description templates

Example value:{ "Seat description - Defaultnl": "Rij {{rowname}} stoel {{seatname}}" }
useszones
bool 
(required)

When true: treat as a multi-zoned seatingplan

        </td>
    </tr>
</tbody>

Type reference: SeatingPlan

Result fields

FieldDescription
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"
translations
map<string, string>

Translations for the seat description templates

Example value:{ "Seat description - Defaultnl": "Rij {{rowname}} stoel {{seatname}}" }
useszones
bool

When true: treat as a multi-zoned seatingplan

zones
int[]

IDs of the seat zones defined

Example value:[ 1, 2, 3 ]
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