Request Details
Method
|
Controller
|
Resource
|
Parameters
|
POST |
product |
add |
outlet_id / barcode : product_name : product_desc : image : price : discount : qty : reorder_level : delivery_type : weight : shipping_cost : availability : promo_price : promo_start_date : promo_end_date : ebay_cat_id |
Parameters Guide
Parameter
|
Accepts
|
outlet_id |
int outlet id as provided by BeepXtra |
barcode |
string barcode of product |
product_name |
string Product name in alphanumeric latin characters only (Regex [a-zA-Z0-9_] ) |
product_desc |
string Product description in alphanumeric latin characters only (Regex [a-zA-Z0-9_] ) |
image |
string default value of "image" required |
price |
double Sale Price of product |
discount |
double Discount percentage for Beep Cashback (0 for no discount or minimum 2.50) |
qty |
int current quantity in stock |
reorder_level |
int The minimum stock level to trigger a reminder to the outlet |
delivery_type |
string pickup shiplocal shipintl |
weight |
double weight of product or 0 to disable |
shipping_cost |
double Cost amount for shipping or 0 to disable |
availability |
tinyint 0 for N/A or 1 for Available |
promo_price |
double Price override if special promo enabled (See dates below) |
promo_start_date |
date Starting Date of special pricing override |
promo_end_date |
date Ending Date of special pricing override |
ebay_cat_id |
int the ebay category id as listed by BeepXtra (ebay version 97 - See "Get Sub-Categories") |
Example Request Format
Direct Url
|
https://api.beepxtra.com/product/add/391/12345678:dog shoes:doggy shoes, size 53:image:100.05:2.5:10:2:pickup:0:1:1:0:0:0:77664 |
Curl
|
CURL -A "YOURAPPNAME|1.0|AppID|AppKEY|product" -X POST https://api.beepxtra.com/product/add/391/12345678:dog shoes:doggy shoes, size 53:image:100.05:2.5:10:2:pickup:0:1:1:0:0:0:77664 |
PHP SDK
|
$beepapi->request('post', 'product', 'add/391/12345678:dog shoes:doggy shoes, size 53:image:100.05:2.5:10:2:pickup:0:1:1:0:0:0:77664'); |
Sample Response
Success
{
"success":true,
"request":{
"method":"POST",
"controller":"product",
"resource":"add",
"parameters":"\/product\/add\/391\/12345678:dog+shoes:doggy+shoes,+size+53:image:100_05:2_5:10:2:pickup:0:1:1:0:0:0:77664",
"url_elements":[
"product",
"add",
"391",
"12345678:dog shoes:doggy shoes, size 53:image:100.05:2.5:10:2:pickup:0:1:1:0:0:0:77664"
]
},
"error":{
"errorid":0,
"message":0
},
"data":{
"success":"true",
"product_id":1275
}
}
Error
{
"success":false,
"request":{
"method":"POST",
"controller":"product",
"resource":"add",
"parameters":"\/product\/add\/391\/12345678:dog+shoes:doggy+shoes,+size+53:image::2_5:10:2:pickup:0:1:1:0:0:0:77664",
"url_elements":[
"product",
"add",
"391",
"12345678:dog shoes:doggy shoes, size 53:image::2.5:10:2:pickup:0:1:1:0:0:0:77664"
]
},
"error":{
"message":"Price is mandatory",
"errorid":1000
},
"data":{
"error":"Price is mandatory",
"errorid":1000,
"errormsg":"Price is mandatory"
}
}
Response Guide
Parameter
|
Type
|
Details
|
error |
String |
Returns Error Object with errorid and errormsg |
success |
boolean |
Returns true if successful |
product_id |
int |
Returns the new product id |