POST categories/create
Create a category
URL:
http://mobileroadie.com/api/categories/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. Display name of the category.
-
-
parent_id
-
row_image
-
Image for the row.
-
-
featured_image
-
Featured image.
-
-
bg_image
-
Background image.
-
-
location
-
Choose from either 'none','sub','main', or 'both'.
-
-
url
-
Must be a valid URL.
-
Usage Example
<?php $data = array( 'secret' => 'your_secret_key', 'name' => 'My Official Category', 'parent_id' => 0, 'row_image' => 'http://www.mobileroadie.com', 'featured_image' => 'http://www.mobileroadie.com', 'bg_image' => 'http://www.mobileroadie.com', 'location' => 'sub', 'url' => 'http://mobileroadie.com' ); $handle = curl_init("https://mobileroadie.com/api/categories/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
0 comments
Please sign in to leave a comment.