Modify an existing relation type

Content

Resource URL

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

Example

Request

1use Ticketmatic\Endpoints\Settings\System\Relationtypes;
2
3$result = Relationtypes::update($client, $id, array(
4    "name" => "Sponsor",
5    "parentid" => 2,
6));

Response

 1object(\Ticketmatic\Model\RelationType) (6) {
 2  ["id"]=>
 3  int(0)
 4  ["name"]=>
 5  string(7) "Sponsor"
 6  ["parentid"]=>
 7  int(0)
 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 body fields

FieldDescription
name
mlstring 
(required)

Name of the relation type

Example value:"Sponsor"
parentid
int 
(required)

ID of the parent relation type.

Example value:2

Type reference: RelationType

Result fields

FieldDescription
id
int

Unique ID

Example value:123
name

Name of the relation type

Example value:"Sponsor"
parentid
int

ID of the parent relation type.

Example value:2
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: RelationType