Request Details
Method
|
Controller
|
Resource
|
Parameters
|
POST |
product |
use |
outlet_id /product_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 |
product_id |
int The existing product id you wish to use for this outlet |
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/use/391/123: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/use/391/123: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', 'use/391/123:12345678:dog shoes:doggy shoes for small dogs: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":"use",
- "parameters":"\/product\/use\/391\/1:12345678:dog+shoes:doggy+shoes,+size+53:image:1_00:2_5:10:2:pickup:0:1:1:0:0:0:77664",
- "url_elements":[
- "product",
- "use",
- "391",
- "1:12345678:dog shoes:doggy shoes, size 53:image:1.00:2.5:10:2:pickup:0:1:1:0:0:0:77664"
- ]
- },
- "error":{
- "errorid":0,
- "message":0
- },
- "data":{
- "success":"true"
- }
- }
Error
- {
- "success":false,
- "request":{
- "method":"POST",
- "controller":"product",
- "resource":"use",
- "parameters":"\/product\/use\/391\/10:12345678:dog+shoes:doggy+shoes,+size+53:image:1_00:1_5:10:2:pickup:0:1:1:0:0:0:77664",
- "url_elements":[
- "product",
- "use",
- "391",
- "10:12345678:dog shoes:doggy shoes, size 53:image:1.00:1.5:10:2:pickup:0:1:1:0:0:0:77664"
- ]
- },
- "error":{
- "message":"Discount cannot be less than 2.5%. Please use 0 or a higher value",
- "errorid":1000
- },
- "data":{
- "error":"Discount cannot be less than 2.5%. Please use 0 or a higher value",
- "errorid":1000,
- "errormsg":"Discount cannot be less than 2.5%. Please use 0 or a higher value"
- }
- }
Response Guide
Parameter
|
Type
|
Details
|
error |
String |
Returns Error Object with errorid and errormsg |
success |
boolean |
Returns true if successful |