Modify an existing seat rank

Content

Resource URL

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

Example

Request

1use Ticketmatic\Endpoints\Settings\Seatingplans\Seatranks;
2
3$result = Seatranks::update($client, $id, array(
4    "name" => "Rank A",
5    "color" => "#AE77FB",
6    "priority" => 3,
7));

Response

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

Request

 1import (
 2    "github.com/ticketmatic/tm-go/ticketmatic"
 3    "github.com/ticketmatic/tm-go/ticketmatic/settings/seatingplans/seatranks"
 4)
 5
 6result, err := seatranks.Update(client, id, &ticketmatic.SeatRank{
 7    Name: "Rank A",
 8    Color: "#AE77FB",
 9    Priority: 3,
10})

Response

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

Request

1PUT /api/1/{accountname}/settings/seatingplans/seatranks/{id} HTTP/1.1
2Content-Type: application/json
3
4{
5    "name": "Rank A",
6    "color": "#AE77FB",
7    "priority": 3
8}

Response

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

Request body fields

FieldDescription
name
mlstring 
(required)

Name for the seat rank

Example value:"Rank A"
color
string 
(required)

The color of the seat rank

Example value:"#AE77FB"
priority
int 
(required)

Priority of the seat rank

Example value:3

Type reference: SeatRank

Result fields

FieldDescription
id
int

Unique ID

Example value:123
name

Name for the seat rank

Example value:"Rank A"
color
string

The color of the seat rank

Example value:"#AE77FB"
priority
int

Priority of the seat rank

Example value: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: SeatRank