PHP code example of picqer / api-client

1. Go to this page and download the library: Download picqer/api-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/ */

    

picqer / api-client example snippets




omain = 'jansens-webwinkels';
$apiKey = '1023ihs0edfh';

$apiClient = new Picqer\Api\Client($subDomain, $apiKey);
$apiClient->enableRetryOnRateLimitHit();
$apiClient->setUseragent('My amazing app ([email protected])');

$orders = $apiClient->getOrders();
var_dump($orders);



omain = 'jansens-webwinkels';
$apiKey = '1023ihs0edfh';

$apiClient = new Picqer\Api\Client($subDomain, $apiKey);
$apiClient->enableRetryOnRateLimitHit();
$apiClient->setUseragent('My amazing app ([email protected])');

foreach ($apiClient->getResultGenerator('order') as $order) {
    var_dump($order);
}



ook = Picqer\Api\PicqerWebhook::retrieve();

echo 'Hook received: ' . $webhook->getName() . ' that was triggered at ' . $webhook->getEventTriggeredAt() . PHP_EOL;
echo $webhook->getData();



ook = Picqer\Api\PicqerWebhook::retrieveWithSecret('your-secret');