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 "zip" => "AA3000",
13));
Response
1object(\Ticketmatic\Model\EventLocation) (15) {
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 ["zip"]=>
25 string(6) "AA3000"
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/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 Zip: "AA3000",
16})
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 Zip: "AA3000",
14 Isarchived: false,
15 Createdts: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
16 Lastupdatets: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
17}
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 "zip": "AA3000"
14}
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 "zip": "AA3000",
17 "isarchived": false,
18 "createdts": "2014-09-26 15:24:36",
19 "lastupdatets": "2014-09-26 15:24:36"
20}
Request body fields
Field | Description |
---|---|
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.
|
Type reference: EventLocation
Result fields
Field | Description |
---|---|
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" |
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