Create a new contact title

Content

Resource URL

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

Example

Request

1use Ticketmatic\Endpoints\Settings\System\Contacttitles;
2
3$result = Contacttitles::create($client, array(
4    "name" => "Mr.",
5    "isinternal" => false,
6    "languagecode" => "nl",
7    "sex" => "M",
8));

Response

 1object(\Ticketmatic\Model\ContactTitle) (8) {
 2  ["id"]=>
 3  int(0)
 4  ["name"]=>
 5  string(3) "Mr."
 6  ["isinternal"]=>
 7  bool(false)
 8  ["languagecode"]=>
 9  string(2) "nl"
10  ["sex"]=>
11  string(1) "M"
12  ["isarchived"]=>
13  bool(false)
14  ["createdts"]=>
15  object(\DateTime) (3) {
16    ["date"]=>
17    string(26) "2014-09-26 15:24:36.000000"
18    ["timezone_type"]=>
19    int(3)
20    ["timezone"]=>
21    string(3) "UTC"
22  }
23  ["lastupdatets"]=>
24  object(\DateTime) (3) {
25    ["date"]=>
26    string(26) "2014-09-26 15:24:36.000000"
27    ["timezone_type"]=>
28    int(3)
29    ["timezone"]=>
30    string(3) "UTC"
31  }
32}

Request

 1import (
 2    "github.com/ticketmatic/tm-go/ticketmatic"
 3    "github.com/ticketmatic/tm-go/ticketmatic/settings/system/contacttitles"
 4)
 5
 6result, err := contacttitles.Create(client, &ticketmatic.ContactTitle{
 7    Name: "Mr.",
 8    Isinternal: false,
 9    Languagecode: "nl",
10    Sex: "M",
11})

Response

 1result := &ticketmatic.ContactTitle{
 2    Id: 123,
 3    Name: "Mr.",
 4    Isinternal: false,
 5    Languagecode: "nl",
 6    Sex: "M",
 7    Isarchived: false,
 8    Createdts: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
 9    Lastupdatets: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
10}

Request

1POST /api/1/{accountname}/settings/system/contacttitles HTTP/1.1
2Content-Type: application/json
3
4{
5    "name": "Mr.",
6    "isinternal": false,
7    "languagecode": "nl",
8    "sex": "M"
9}

Response

 1HTTP/1.1 200 OK
 2Content-Type: application/json
 3
 4{
 5    "id": 123,
 6    "name": "Mr.",
 7    "isinternal": false,
 8    "languagecode": "nl",
 9    "sex": "M",
10    "isarchived": false,
11    "createdts": "2014-09-26 15:24:36",
12    "lastupdatets": "2014-09-26 15:24:36"
13}

Request body fields

FieldDescription
name
string 
(required)

Title name

Example value:"Mr."
isinternal
bool 
(required)

Restricts this title from showing up on the websales pages

        </td>
    </tr><tr>
        <td class="field">
            <div class="name">languagecode</div>
            <div class="type">string&nbsp;<div class="required">(required)</div></div>
        </td>
        <td class="description">
            <p>Language for this title</p> 
            <strong>Example value:</strong><code>&#34;nl&#34;</code>
        </td>
    </tr><tr>
        <td class="field">
            <div class="name">sex</div>
            <div class="type">string&nbsp;<div class="required">(required)</div></div>
        </td>
        <td class="description">
            <p>Gender associated with this title</p> 
            <strong>Example value:</strong><code>&#34;M&#34;</code>
        </td>
    </tr>
</tbody>

Type reference: ContactTitle

Result fields

FieldDescription
id
int

Unique ID

Example value:123
name
string

Title name

Example value:"Mr."
isinternal
bool

Restricts this title from showing up on the websales pages

languagecode
string

Language for this title

Example value:"nl"
sex
string

Gender associated with this title

Example value:"M"
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: ContactTitle