Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you. Install composer
The Hiboutik PHP library can be installed with Composer.
php composer.phar require hiboutik/hiboutikapi
<?php
require_once("vendor/autoload.php");
// Set your Hiboutik credentials here
$account = "faq";
$user = "___my_user_email___";
$key = "___my_user_api_key___";
$hiboutik = new \Hiboutik\HiboutikAPI($account, $user, $key);
// To list all active products on your account:
$products = $hiboutik->get("/products/");
if ($hiboutik->request_ok) {
foreach ($products as $product) {
print("<br />".$product['product_model']);
}
} else {
if (isset($products['details']['error_description'])) {
print $products['details']['error_description'];
} else {
print $products['error_description'];
}
}