products/insertProduct
insert a product into your codebookie account
| Parameter | Type | Description | Required |
|---|---|---|---|
| api_token | string | api token | YES |
| sku | string | unique SKU or product ID | YES |
| product_name | string | name of the product | YES |
| description | string | short description of product | NO |
| website_id | integer | your website ID for the product | YES |
|
1 2 3 4 5 6 7 8 9 |
require "codeBookie.php"; $codeBookie = new CodeBookie(); $couponCode = 'TESTCOUPON'; $productCode = 'PRODUCTCODE'; $price = 29.99; $result = $codeBookie->getCoupon($couponCode,$productCode,$price); print_r($result); |
Output:
| Variable | Type | Description |
|---|---|---|
| status | string | OK or Error |
| update | boolean | if true, the product was updated if false then the product has been inserted |
| message | string | message of API result |