PHP code example of wienkit / beslist-shopitem-api-php-client
1. Go to this page and download the library: Download wienkit/beslist-shopitem-api-php-client 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/ */
wienkit / beslist-shopitem-api-php-client example snippets
ey = '-- ENTER YOUR SHOPITEM API KEY --';
$this->client = new Wienkit\BeslistShopitemClient\BeslistShopitemClient($apiKey);
$this->client->setTestMode(TRUE);
// Authenticate with the API
$shops = $this->client->authenticate();
var_dump($shops);
// Get a shopitem
$shopId = 12345;
$itemId = '12abcd13';
$shopItem = $this->client->getShopItem($shopId, $itemId);
var_dump($shopItem);
// Update a shopitem
$shopId = 12345;
$itemId = '12abcd13';
$update = [
'price' => 12.00,
'discount_price' => 10.00,
'delivery_cost_nl' => 5.00,
'delivery_cost_be' => 6.00,
'delivery_time_nl' => '24 uur',
'delivery_time_be' => '48 uur',
'stock' => 5
];
$this->client->updateShopItem($shopId, $itemId, $update);