Modify an existing event location

Content

Resource URL

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

Example

Request

 1use Ticketmatic\Endpoints\Settings\Events\Eventlocations;
 2
 3$result = Eventlocations::update($client, $id, array(
 4    "name" => "Main concert hall",
 5    "city" => "Leuven",
 6    "countrycode" => "US",
 7    "geostatus" => 0,
 8    "info" => "This location is easily reached by train.",
 9    "state" => "Texas",
10    "street1" => "Main street",
11    "street2" => "1 box 4",
12    "street3" => "",
13    "street4" => "",
14    "zip" => "AA3000",
15));

Response

 1object(\Ticketmatic\Model\EventLocation) (17) {
 2  ["id"]=>
 3  int(0)
 4  ["name"]=>
 5  string(17) "Main concert hall"
 6  ["city"]=>
 7  string(6) "Leuven"
 8  ["countrycode"]=>
 9  string(2) "US"
10  ["geostatus"]=>
11  int(0)
12  ["info"]=>
13  string(41) "This location is easily reached by train."
14  ["lat"]=>
15  float(50.868141)
16  ["long"]=>
17  float(4.712266)
18  ["state"]=>
19  string(5) "Texas"
20  ["street1"]=>
21  string(11) "Main street"
22  ["street2"]=>
23  string(7) "1 box 4"
24  ["street3"]=>
25  string(0) ""
26  ["street4"]=>
27  string(0) ""
28  ["zip"]=>
29  string(6) "AA3000"
30  ["isarchived"]=>
31  bool(false)
32  ["createdts"]=>
33  object(\DateTime) (3) {
34    ["date"]=>
35    string(26) "2014-09-26 15:24:36.000000"
36    ["timezone_type"]=>
37    int(3)
38    ["timezone"]=>
39    string(3) "UTC"
40  }
41  ["lastupdatets"]=>
42  object(\DateTime) (3) {
43    ["date"]=>
44    string(26) "2014-09-26 15:24:36.000000"
45    ["timezone_type"]=>
46    int(3)
47    ["timezone"]=>
48    string(3) "UTC"
49  }
50}

Request

 1import (
 2    "github.com/ticketmatic/tm-go/ticketmatic"
 3    "github.com/ticketmatic/tm-go/ticketmatic/settings/events/eventlocations"
 4)
 5
 6result, err := eventlocations.Update(client, id, &ticketmatic.EventLocation{
 7    Name: "Main concert hall",
 8    City: "Leuven",
 9    Countrycode: "US",
10    Geostatus: 0,
11    Info: "This location is easily reached by train.",
12    State: "Texas",
13    Street1: "Main street",
14    Street2: "1 box 4",
15    Street3: "",
16    Street4: "",
17    Zip: "AA3000",
18})

Response

 1result := &ticketmatic.EventLocation{
 2    Id: 123,
 3    Name: "Main concert hall",
 4    City: "Leuven",
 5    Countrycode: "US",
 6    Geostatus: 0,
 7    Info: "This location is easily reached by train.",
 8    Lat: 50.86814117,
 9    Long: 4.71226645,
10    State: "Texas",
11    Street1: "Main street",
12    Street2: "1 box 4",
13    Street3: "",
14    Street4: "",
15    Zip: "AA3000",
16    Isarchived: false,
17    Createdts: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
18    Lastupdatets: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
19}

Request

 1PUT /api/1/{accountname}/settings/events/eventlocations/{id} HTTP/1.1
 2Content-Type: application/json
 3
 4{
 5    "name": "Main concert hall",
 6    "city": "Leuven",
 7    "countrycode": "US",
 8    "geostatus": 0,
 9    "info": "This location is easily reached by train.",
10    "state": "Texas",
11    "street1": "Main street",
12    "street2": "1 box 4",
13    "street3": "",
14    "street4": "",
15    "zip": "AA3000"
16}

Response

 1HTTP/1.1 200 OK
 2Content-Type: application/json
 3
 4{
 5    "id": 123,
 6    "name": "Main concert hall",
 7    "city": "Leuven",
 8    "countrycode": "US",
 9    "geostatus": 0,
10    "info": "This location is easily reached by train.",
11    "lat": 50.868141,
12    "long": 4.712266,
13    "state": "Texas",
14    "street1": "Main street",
15    "street2": "1 box 4",
16    "street3": "",
17    "street4": "",
18    "zip": "AA3000",
19    "isarchived": false,
20    "createdts": "2014-09-26 15:24:36",
21    "lastupdatets": "2014-09-26 15:24:36"
22}

Request body fields

FieldDescription
name
mlstring 
(required)

Name of the location

Example value:"Main concert hall"
city
string 
(required)

City

Example value:"Leuven"
countrycode
string 
(required)

Country code. Should be an ISO 3166-1 alpha-2 two-letter code.

Example value:"US"
geostatus
int 
(required)

Geocode status for the address of this location.

        </td>
    </tr><tr>
        <td class="field">
            <div class="name">info</div>
            <div class="type"><a href="api/coreconcepts/translations">mlstring</a>&nbsp;<div class="required">(required)</div></div>
        </td>
        <td class="description">
            <p>Practical info on the event location (route description, public transport, parking,&hellip;).</p> 
            <strong>Example value:</strong><code>&#34;This location is easily reached by train.&#34;</code>
        </td>
    </tr><tr>
        <td class="field">
            <div class="name">state</div>
            <div class="type">string&nbsp;<div class="required">(required)</div></div>
        </td>
        <td class="description">
            <p>State</p> 
            <strong>Example value:</strong><code>&#34;Texas&#34;</code>
        </td>
    </tr><tr>
        <td class="field">
            <div class="name">street1</div>
            <div class="type">string&nbsp;<div class="required">(required)</div></div>
        </td>
        <td class="description">
            <p>Street name</p> 
            <strong>Example value:</strong><code>&#34;Main street&#34;</code>
        </td>
    </tr><tr>
        <td class="field">
            <div class="name">street2</div>
            <div class="type">string&nbsp;<div class="required">(required)</div></div>
        </td>
        <td class="description">
            <p>Nr. + Box</p> 
            <strong>Example value:</strong><code>&#34;1 box 4&#34;</code>
        </td>
    </tr><tr>
        <td class="field">
            <div class="name">street3</div>
            <div class="type">string&nbsp;<div class="required">(required)</div></div>
        </td>
        <td class="description">
            
            
        </td>
    </tr><tr>
        <td class="field">
            <div class="name">street4</div>
            <div class="type">string&nbsp;<div class="required">(required)</div></div>
        </td>
        <td class="description">
            
            
        </td>
    </tr><tr>
        <td class="field">
            <div class="name">zip</div>
            <div class="type">string&nbsp;<div class="required">(required)</div></div>
        </td>
        <td class="description">
            <p>Zipcode</p> 
            <strong>Example value:</strong><code>&#34;AA3000&#34;</code>
        </td>
    </tr>
</tbody>

Type reference: EventLocation

Result fields

FieldDescription
id
int

Unique ID

Example value:123
name

Name of the location

Example value:"Main concert hall"
city
string

City

Example value:"Leuven"
countrycode
string

Country code. Should be an ISO 3166-1 alpha-2 two-letter code.

Example value:"US"
geostatus
int

Geocode status for the address of this location.

info

Practical info on the event location (route description, public transport, parking,…).

Example value:"This location is easily reached by train."
lat
decimal

Lat coordinate for the event location

Example value:50.868141
long
decimal

Long coordinate for the event location

Example value:4.712266
state
string

State

Example value:"Texas"
street1
string

Street name

Example value:"Main street"
street2
string

Nr. + Box

Example value:"1 box 4"
street3
string
street4
string
zip
string

Zipcode

Example value:"AA3000"
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: EventLocation