Getting started

Service container

Instances of all the Manager classes which wrap Service API interactions can (and should) be loaded via the Container class.

To get an instance of the Container, you will need to use the ContainerLoader and provide it with your API key and the URL of the Service API you want to connect to.

<?php

use Jadu\Quantum\ServiceApiClient\ContainerLoader;

$loader = new ContainerLoader();
$container = $loader->load(
    'https://mycxmsite.jadu.net/api/service-api/service-name', 
    $apiKey
);

Making a request

Once you have a Container instance, you can fetch a manager and use it to request information from the Service API.

In this example, we will use the CaseManager to fetch the create form:

<?php

/** @var \Jadu\Quantum\ServiceApiClient\Manager\CaseManager $caseManager */
$caseManager = $container->get('quantum_service_api_client.manager.case');
$createForm = $caseManager->getCreateForm();

results matching ""

    No results matching ""