getOrganisations

Gibt angelegte Organisationen zurück.

Route /addressbook/getOrganisations[/:key[/:format[/:limit[/:skip]]]]
Erforderliche Parameter
Optionale Parameter format
limit (max:1000)
skip
Rückgabewerte hash
name
website
description
labels
billingStreet
billingPobox
billingCity
billingState
billingPostcode
billingCountry
deliveryStreet
deliveryPobox
deliveryCity
deliverySate
deliveryPostcode
deliveryCountry
email
phone
fax
assignedPersons
Querschnittverbindungen
Hinweise Limit: Das maximale Limit ist 1000. Um mehr Ergebnisse zu erhalten, benutzen Sie den Parameter Skip.
resultCount: Enthält die Anzahl des Ergebnisses ohne Filter. Wird z.B. bei der Paginierung benötigt.

Parameter

Bezeichnung Beschreibung Wertebereich Standardwert
format Legt fest in welchem Format das Ergebnis zurückgeliefert werden soll. json|xml json
limit Legt fest, wie viele Ergebniszeilen zurückgegeben werden sollen. (max:1000) 0-1000 100
skip Legt fest, wie viele Seiten des Ergebnisarrays übersprungen werden sollen. Eine Seite entspricht dem Wert von limit. (0-9)+ 0

Rückgabewerte

Bezeichnung Beschreibung Wertebereich
hash Id der Organisation (a-z0-9){32}
name Name der Organisation string
website Website der Organisation string
description Beschreibung der Organisation string
labels Array mit Labelids, die der Organisation zugeordnet sind. array mit strings
billingStreet Rechnung – Straße string
billingPobox Rechnung – Postfach string
billingCountry Rechnung – Land string
billingCity Rechnung – Stadt string
billingState Rechnung – Bundesland string
billingPostcode Rechnung – Postleitzahl string
deliveryStreet Versand – Straße string
deliveryPobox Versand – Postfach string
deliveryCountry Versand – Land string
deliveryCity Versand – Stadt string
deliveryState Versand – Bundesland string
deliveryPostcode Versand – Postleitzahl string
email E-Mail-Address string
phone Telefonnummer string
fax Fax array
assignedPersons Zugewiesene Personen array

Meldungen

Nachricht Beschreibung
maximum limit exeeded Das maximale Limit wurde überschritten.
no permission Der Schlüssel hat keinen Zugriff auf diese Funktion.
internal error Ein interner Fehler ist aufgetreten.
param missing Ein erforderlicher Parameter wurde nicht übergeben.
param invalid Der Wert eines übergebenen Parameters ist nicht gültig.
result empty Die Bearbeitung der Anfrage war erfolgreich, aber das Ergebnis ist leer.
cost error Der aktuelle Kreditumfang reicht nicht aus, um die Anfrage zu bearbeiten.
0k. Die Bearbeitung der Anfrage war erfolgreich.

Beispielcode

$root = 'https://suite.xovi.net/api/';
$arrayParams = array(
    'service' => 'addressbook',
    'method'  => 'getOrganisations',
    'key'     => 'myPersonalKey',
);
$GETparams = implode('/', $arrayParams);

$requestURL = $root.$GETparams;

if (!function_exists('curl_init')) die('cURL not available');

$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_URL, $requestURL);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

// Download the given URL, and return output
$output = curl_exec($ch);

// Close the cURL resource, and free system resources
curl_close($ch);

echo $output;

Beispielergebnisse

JSON

{
    "apiErrorCode":0,
    "apiErrorMessage":"0k.",
    "apiMeta":{
        "resultCount":1
    },
    "apiResult":[
        {
            "hash": "b4b292d0c16f20eee10a7754539a189c",
            "name": "myOrg",
            "website":"org.com",
            "description":"new org in cologne",
            "labels":{
                "label_0":"kbdnkaaa",
                "label_1":"lbdnkaaa"
            },
            "billingStreet":"orgstreet 2",
            "billingPobox":"987654",
            "billingCity":"Cologne",
            "billingState":"NRW",
            "billingPostcode":"2342334",
            "billingCountry":"DE",
            "deliveryStreet":"orgstreet 2",
            "deliveryPobox":"123456987654",
            "deliveryCity":"Cologne",
            "deliveryState":"NRW",
            "deliveryPostcode":"456321",
            "deliveryCountry":"DE",
            "email":"service@org.de",
            "phone":"123456",
            "fax":"3215640",
            "assignedPersons":{
                "assignedPerson_0":{
                     "hash":"23424lkjlkjwei3242",
                     "firstname":"assPers_firstname",
                     "lastname":"assPers_lastname"
                }
            }
        }
    ]
}

XML

<?xml version="1.0"?>
<result>
    <apiMeta>
        <resultCount>1</resultCount>
    </apiMeta>
    <apiErrorCode>0</apiErrorCode>
    <apiErrorMessage>0k.</apiErrorMessage>
    <apiResult>
        <organisations>
            <organisation>
                <hash>3957d580698c3345c9a962e077c44961</hash>
                <name>myOrg</name>
                <website>some_website</website>
                <description>some_description</description>
                <labels>
                    <label_0>pfgifaaa</label_0>
                <labels/>
                <billingStreet>example street 123</billingStreet>
                <billingPobox>123456</billingPobox>
                <billingCity>Cologne</billingCity>
                <billingState>NRW</billingState>
                <billingPostcode>123456</billingPostcode>
                <billingCountry>DE</billingCountry>
                <deliveryStreet>example street 123</deliveryStreet>
                <deliveryPobox>123456</deliveryPobox>
                <deliveryCity>Cologne</deliveryCity>
                <deliveryState>NRW</deliveryState>
                <deliveryPostcode>123456</deliveryPostcode>
                <deliveryCountry>DE</deliveryCountry>
                <email>example@example.de</email>
                <phone>1234567</phone>
                <fax>1234567</fax>
                <assignedPersons>
                    <assignedPerson_0>
                        <hash>4234fgdert32424</hash>
                        <firstname>person_firstname</firstname>
                        <lastname>person_lastname</lastname>
                    </assignedPerson_0> 
                </assignedPersons>
            </organisation>
        </organisations>
    </apiResult>
</result>