POST locations/create
Create a location.
URL:
http://mobileroadie.com/api/locations/create
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 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, not required.
-
-
category_id
-
Category ID to assign for this content
-
Usage Example
<?php $data = array( 'secret' => 'your_secret_key', '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://mobileroadie.com/img/default-image.png', 'icon_imgurl' => 'http://mobileroadie.com/img/default-image-icon.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/create/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
2 comments
We need "White-Listed IP Address"... but how can we white list IP ?
Hello Jacques!
The White-Listing of IP Addresses is no longer necessary for connecting to Mobile Roadie’s backend to transfer information via API/PHP!
If you have any questions or need further assistance with your API connection(s), email support@mobileroadie.com and we will assist in any way that we can!
Please sign in to leave a comment.