POST locations/update
Update a location
URL:
http://mobileroadie.com/api/locations/update
Formats
XML, JSON, HTML
Requirements
SSL, API Secret, White-Listed IP Address
HTTP Method(s):
POST
URL Parameter(s):
-
key
-
Required
-
POST Parameters:
-
secret
-
Required.
-
-
name
-
Required. Name of location.
-
-
address
-
Required. Street address of location.
-
-
city
-
Required. City of location.
-
-
state
-
State of location, if available.
-
-
postal code
-
Required. Postal code of location.
-
-
country
-
Country of location.
-
-
lon
-
Longitude of location. This must be submitted in conjunction with latitude. If both are present then this will be used as the longitude rather than the results of geocoding the address.
-
-
lat
-
Latitude of location. This must be submitted in conjunction with longitude. If both are present then this will be used as the latitude rather than the results of geocoding the address.
-
-
phone
-
phone
-
Phone number of location.
-
-
url
-
Possible website of location.
-
-
imgurl
-
Url to image of location.
-
-
icon_imgurl
-
Url to image icon of location.
-
-
store_hours
-
Hours of location.
-
-
description
-
Brief description of location.
-
-
open table
-
opentable.com affiliate url.
-
-
category_id
-
Category ID to assign for this content
-
Usage Example
<?php $data = array( 'secret' => 'your_secret_key', 'id' => '12345', 'name' => 'mobile roadie', 'address' => '123 fascination st', 'city' => 'los angeles', 'state' => 'ca', 'postal_code' => '12345', 'country' => 'us', 'phone' => '1231231234', 'url' => 'http://www.mobileroadie.com', 'img_url' => 'http://www.mobileroadie.com/blah.jpg', 'icon_imgurl' => 'http://www.mobileroadie.com/blah.png', 'store_hours' => 'm-f, 9a-5p', 'description' => 'The most powerful mobile app platform in the world', 'opentable' => 'http://www.opentable.com/' 'category_id' => '0' ); $handle = curl_init("https://mobileroadie.com/api/locations/update/key/4d4ba30d73b77f7"); curl_setopt($handle, CURLOPT_HTTPAUTH, CURLAUTH_ANY); curl_setopt($handle, CURLOPT_POST, true); curl_setopt($handle, CURLOPT_POSTFIELDS, $data); $response = curl_exec($handle); curl_close($handle); ?>
Success Response
<xml> <id>1234567890</id> </xml>
Response when Missing Required Fields
<xml> <error>[FieldName1] is required. [FieldNameX] is required.</error> </xml>
Comments
0 comments
Please sign in to leave a comment.