PHP code example of buuyers / buuyers-api-php

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

    

buuyers / buuyers-api-php example snippets


$client = new EmailingCampaign(appId, apiKey);

$client->emailingCampaigns->campaigns([
    'company_id'=>xxx, // Id company
    'email'=>[email protected], // Email
    'type'=>'feedback', // feedback or avis
    'date'=>xxxx-xx-xx, // Date to send
    'time'=>xx, // Time to send
    'name'=>xxxx, // Name (optional parameter)
    'resend'=>xxxx-xx-xx, // Date to send (optional parameter),
    'products'=>[], // Array of Products
]);

$client->companies->getCompany(id);

$client->companies->getCompanyReviews(id);

$client->companies->addReview([
    'company_id'=>xxx, // Id company
    'email'=>[email protected], // Email
    'note'=>xx, // Note Review (1,2,3,4,5)
    'title'=>xxxx, // Title Review (optional parameter)
    'text'=>"Lorem ipsum dolor sit amet.", // Review Text (optional parameter),
]);