PHP code example of sq / laravel-sevdesk-api

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

    

sq / laravel-sevdesk-api example snippets


return [
    /*
     * Api token you from sevdesk. 
     */
    'api_token' => env('SEVDESK_API_TOKEN', ''),
];

$sevdeskApi = SevdeskApi::make();

$sevdeskApi->contact()->createSupplier('Supplier Organisation', $parameters);
$sevdeskApi->contact()->createCustomer('Customer Organisation', $parameters);
$sevdeskApi->contact()->createPartner('Partner Organisation', $parameters);
$sevdeskApi->contact()->createProspectCustomer('Prospect Customer Organisation', $parameters);

$sevdeskApi->contact()->createAccountingContact($contactId);

$sevdeskApi->contact()->createCustom('Custom Organisation', $categoryId, $parameters);

$sevdeskApi->contact()->all();
$sevdeskApi->contact()->allSupplier();
$sevdeskApi->contact()->allCustomer();
$sevdeskApi->contact()->allPartner();
$sevdeskApi->contact()->allProspectCustomer();

$sevdeskApi->contact()->allCustom($categoryId);

$sevdeskApi->contact()->get($contactId);

$sevdeskApi->contact()->update($contactId, $parameters);

$sevdeskApi->contact()->delete($contactId);

$sevdeskApi->contactAddress()->create($contactId, $parameters);

$sevdeskApi->communicationWay()->createPhone($contactId, $phoneNumber);

$sevdeskApi->communicationWay()->createEmail($contactId, $email);

$sevdeskApi->communicationWay()->createWebsite($contactId, $website);

$sevdeskApi->communicationWay()->all();

$sevdeskApi->communicationWay()->get($contactId);

$sevdeskApi->communicationWay()->delete($communicationWayId);

$sevdeskApi->invoice()->all();

$sevdeskApi->invoice()->allDraft();
$sevdeskApi->invoice()->allOpen();
$sevdeskApi->invoice()->allPayed();

$sevdeskApi->invoice()->allByContact($contactId);

$sevdeskApi->invoice()->allAfter($timestamp);
$sevdeskApi->invoice()->allBefore($timestamp);

$sevdeskApi->invoice()->download($invoiceId);

$sevdeskApi->invoice()->sendPerMail($invoiceId, $email, $subject, $text);
bash
php artisan vendor:publish --provider="Exlo89\LaravelSevdeskApi\SevdeskApiServiceProvider" --tag="config"