PHP code example of xqueue / maileon-partner-api-client

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

    

xqueue / maileon-partner-api-client example snippets


$service = new AccountService(['API_KEY' => 'Your API key'])

$response = $service->getNewsletterAccounts();

if(!$response->getResponse()->isSuccess()){
    // handle error
}

$newsletterAccounts = $response->getData();

$service = new JobService(['API_KEY' => 'Your API key'])

$response = $this->jobService->createAccountJob(
            $locale,
            $type,
            $author,
            $customerAccountName,
            $newsletterAccountName,
            $customDomain ?? null,
            $providedDomain ?? null,
            $subdomain ?? null,
            $customDns ?? null,
            $accountTemplateId ?? null,
            $users ?? null,
            $customerAccountId ?? null,
            $domainAsLogin ?? null
        );

if(!$response->getResponse()->isSuccess()){
    // handle error
}

$data = $response->getData();
$jobId = $data['jobId'];