1. Go to this page and download the library: Download mdeschermeier/shiphero library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
Shiphero::setAdditionalCurlOpt(CURLOPT_VERBOSE, true); // - set a custom cURL option for next API request.
Shiphero::preserveAdditionalCurlOpt(true); // - Will remember cURL option settings until turned off
//send some requests
Shiphero::getOrderById(383484); // - cURL options remembered (CURLOPT_VERBOSE = true)
Shiphero::getProducts(); // - cURL options remembered (CURLOPT_VERBOSE = true)
Shiphero::preserveAdditionalCurlOpt(false); //Turn off cURL option rememberance and clear out stored values.
Shiphero::getVendorList(): // - Request ran with default options (CURLOPT_VERBOSE = false)
$prod = array('sku' => 12345);
$response = Shiphero::getProduct($prod) // - Get one item.
$prod = array('page'=>2, 'count'=>150);
$response = Shiphero::getProduct($prod); // - Of all items, return second page, limit 150 items per page.
$response = Shiphero::getProduct(); // - Get all items, no paging (returns the first 50 products).
//Kit Creation Queue Contains: $kit (3 of 'product_1-sku-123, 1 of 'product_2-sku-456')
// $another_kit (10 of 'product_1-sku-123, 3 of 'product_2-sku-456')
Shiphero::createKits(); // - Kits are now created in Shiphero.
//Kit Creation Queue Contains: Nothing (empty)
// Kit 1 (sku 'abc-123') Components (skus): p-123, p-456, p-789
// Kit 2 (sku 'def-456') Components (skus): p-456, p-111, p-222
// - Queue Removal of Item Skus 'p-456' and 'p-789' from Kit 1
Shiphero::addToRemoveKitComponentQueue('abc-123', array('p-456', 'p-789'));
// - Queue Removal of Item Sku 'p-111' from Kit 2
Shiphero::addToRemoveKitComponentQueue('def-456', array('p-111'));
$filter = array('page'=>1, 'from'=>'2016-9-1', 'to'=>'2016-9-28');
//Return all orders matching filter for current store
Shiphero::getOrders($filter)
//return all orders matching filter for ALL stores
Shiphero::getOrders($filter, 1);
//Returns order with ID: 12345
Shiphero::getOrderById('12345');
//Returns order number: 427895-Fri-1
Shiphero::getOrder('427895-Fri-1');
$hist = array(
'order_id' => 123456,
'username' => '[email protected]',
'information' => 'A note on the order history'
);
Shiphero::createOrderHistory($hist);
$vendors = Shiphero::getVendorList();
$vendor = array('vendor_name' => 'Wyld Stallyn Guitars', // - vendor_name is the only fornia'
);
Shiphero::createVendor($vendor);
$po_1 = Shiphero::getPO(1); // - Return information from PO ID: 1
$po_2 = Shiphero::getPO(2); // - Return information from PO ID: 2
$po_3 = Shiphero::getPO(456789); // - Return information from PO ID: 456789
//Get page 1 of all shipments from Sept. 28, 2016
$filter = array('page'=>1, 'from'=>'2016-09-28', 'to'=>'2016-09-28');
$collection1 = Shiphero::getShipments($filter);
//Get page 6 of all shipments from Sept. 28, 2016 to Oct. 2, 2016
$filter = array('page'=>6, 'from'=>'2016-09-28', 'to'=>'2016-10-2');
$collection2 = Shiphero::getShipments($filter);
//register a webhook to post to URL 'http://my.owned.url.for/webhooks/' every time inventory is updated on my bigcommerce store.
$hook_info = array('name'=>'Inventory Update', 'url'=>'http://my.owned.url.for/webhooks/', 'source'=>'bigcommerce');
Shiphero::registerWebhook($hook_info);
$webhook_list = Shiphero::getWebhooks();
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.