API Guide

Welcome to the myJoli Developer API. This document explains how to get started writing your own scripts in order to interface with your myJoli account. Read the following sections carefully in order to successfully developer your first scripts. The SOAP api can be reached at: https://api.myjoli.de/soap.

Required Information

In order to get connected, our API requires the following information:

  • Account Name
  • User Email Address
  • API Token
  • User Account
  • Password or API Pin

The following sections describes how to access this information.

Account Name

This is the subdomain of the URL you use to access your Joli. It should be something like: {subdomain}.myjoli.de If you don't have an account yet, then please go to www.myjoli.de or www.myjoli.com to create a test account.

User Email Address

The email account that you received either a new user or a new account notification is your user account email.

API Token

In order to retrieve your API Token you must have access to the installation page in your myJoli account. Please contact your superior if you do not. The installation page can be accessed by clicking the Joli icon in the upper-left corner and clicking Grundeinstellungen.

Your API-Token can be found in the first tab of the installation page.

User Account Password or API Pin

The API requires either your account password or that you generate an API Pin. If you do not want to reveal your account password to your colleagues, then we recommend generating a pin. Your API Pin must be generated in your account profile. This is found by clicking your Avatar in the upper-right corner and clicking Profile.

At the bottom of your profile page you can generate an API Pin. Click the generate button and take note of your API Pin.

Payload Structure

The Joli API accepts a JSON string with the following structure:

    {
        "content":
            {
                "header":
                    {
                        'token':'API_TOKEN',
                        'email':'USER_EMAIL',
                        'pin':'USER_PIN',
                        'password':'USER_PASSWORD',
                        'account':'ACCOUNT_NAME'
                    }
                "params":
                    {
                        //the params required by the api call
                    }
            }
    }

The Joli API will return a JSON string with the following structure:

{
    "con":"soap",
    "function":"success",
    "content":{
        //your request results
    },
    "initiator":"SOAPAPI::getContacts",
    "initiatorExact":""
} 

PHP Example

The following php snippet can be used to connect to our API. Replace the define blocks with your account information. You can use either pin or password, you are not required to use both.

define("API_TOKEN",     "your_api_token");
define("ACCOUNT_NAME",  "your_account_name");
define("USER_EMAIL",    "your_account_email");
define("USER_PIN",      "your_account_pin");
define("USER_PASSWORD", "your_account_password");

function soapCall($function, $params, $header){
    $client = new SoapClient(null, array(
        'location' => "https://api.myjoli.de/soap",
        'uri' => "https://api.myjoli.de/soap")
    );
    $payload = json_encode(
        array(
            'content' => array(
                'header' => $header,
                'params' => $params
            )
        )
    );

    try{
       $result = $client->$function($payload);
       var_dump($result);
    }
    catch(Exception $e)
    {
       echo "Exception ". $e->getMessage();
    }
}

$params = array(
    'archived'=>'0',
    'deleted' =>'0'
);
$header = array(
    'token'   => API_TOKEN,
    'email'   => USER_EMAIL,
    'pin'     => USER_PIN,
    'password'=> USER_PASSWORD,
    'account' => ACCOUNT_NAME
);

soapCall( 'getContacts', $params, $header );
    

API Setters

API Getters