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    "jointjs_dump" => null,
 6    "status" => "draft",
 7    "translations" => array(
 8        "Seat description - Defaultnl" => "Rij {{rowname}} stoel {{seatname}}",
 9    ),
10    "useszones" => false,
11));

Response

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

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    JointjsDump: <nil>,
 9    Status: "draft",
10    Translations: map[string]string{
11        "Seat description - Defaultnl": "Rij {{rowname}} stoel {{seatname}}",
12    },
13    Useszones: false,
14})

Response

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

Request

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

Response

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

Request body fields

FieldDescription
name
string 
(required)

The name for the seating plan

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

JointJS seating plan dump

        </td>
    </tr><tr>
        <td class="field">
            <div class="name">status</div>
            <div class="type">string&nbsp;<div class="required">(required)</div></div>
        </td>
        <td class="description">
            <p>The status this seating plan is in</p> 
            <strong>Example value:</strong><code>&#34;draft&#34;</code>
        </td>
    </tr><tr>
        <td class="field">
            <div class="name">translations</div>
            <div class="type">map&lt;string, string&gt;&nbsp;<div class="required">(required)</div></div>
        </td>
        <td class="description">
            <p>Translations for the seat description templates</p> 
            <strong>Example value:</strong><code>{ &#34;Seat description - Defaultnl&#34;: &#34;Rij {{rowname}} stoel {{seatname}}&#34; }</code>
        </td>
    </tr><tr>
        <td class="field">
            <div class="name">useszones</div>
            <div class="type">bool&nbsp;<div class="required">(required)</div></div>
        </td>
        <td class="description">
            <p>When true: treat as a multi-zoned seatingplan</p> 
            
        </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"
jointjs_dump
string

JointJS seating plan dump

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