Wie kann man related models/tables von Customer in API mit query kriegen?

Es gibt in shopware/engine/Shopware/Components/Api/Resource/Customer.php die methode getList();

public function getList($offset = 0, $limit = 25, array $criteria = [], array $orderBy = [])
    {
        $this->checkPrivilege('read');

        $builder = $this->getListQuery();

        $builder->addFilter($criteria);
        $builder->addOrderBy($orderBy);
        $builder->setFirstResult($offset)
                ->setMaxResults($limit);

        $query = $builder->getQuery();

        $query->setHydrationMode($this->getResultMode());

        $paginator = $this->getManager()->createPaginator($query);

        //returns the total count of the query
        $totalResult = $paginator->count();

        //returns the customer data
        $customers = $paginator->getIterator()->getArrayCopy();

        return ['data' => $customers, 'total' => $totalResult];
    }

und die liefert so was zurück:

{
    "success": true,
    "data": {
        "0": [
            {
                "number": "20003",
                "id": 1,
                "paymentId": 5,
                "groupKey": "EKCH",
                "shopId": 8,
                "priceGroupId": null,
                "encoderName": "bcrypt",
                "hashPassword": "$2y$10$c9JSaXCVLok6BYRWSo969ezreAbfcRcFPhOo0vFmM4EWmoG2DQQtK",
                "active": true,
                "email": "ah@webworker.de",
                "firstLogin": "2017-06-01T00:00:00+0200",
                "lastLogin": "2017-08-11T10:54:50+0200",
                "accountMode": 0,
                "confirmationKey": "",
                "sessionId": "82fd98497c443b8041fb1761c6108bcc997e58fad8855cc5dba33773ee23b050",
                "newsletter": 0,
                "validation": "0",
                "affiliate": 0,
                "paymentPreset": 0,
                "languageId": "8",
                "referer": "",
                "internalComment": "",
                "failedLogins": 0,
                "lockedUntil": null,
                "salutation": "mr",
                "title": "",
                "firstname": "Max",
                "lastname": "Power",
                "birthday": null
            },
            {
                "number": "20004",
                "id": 2,
                "paymentId": 5,
                "groupKey": "EK",
                "shopId": 1,
                "priceGroupId": null,
                "encoderName": "bcrypt",
                "hashPassword": "$2y$10$OfY7a2TSs1DmJvekWpYGouN6HmrqXAoSOwPZfb2Y4HRuxWEXWEgUW",
                "active": true,
                "email": "ak@webworker.de",
                "firstLogin": "2017-07-13T00:00:00+0200",
                "lastLogin": "2017-07-18T09:36:53+0200",
                "accountMode": 0,
                "confirmationKey": "",
                "sessionId": "abb89c04d57fe7142bb0ce86588dbb4bd383d9af58eb905f39017d5aa3875e97",
                "newsletter": 0,
                "validation": "0",
                "affiliate": 0,
                "paymentPreset": 5,
                "languageId": "1",
                "referer": "",
                "internalComment": "",
                "failedLogins": 0,
                "lockedUntil": null,
                "salutation": "mr",
                "title": "",
                "firstname": "Max",
                "lastname": "Muster",
                "birthday": "1980-07-13T00:00:00+0200"
            }
        ],
        "total": 2
    }
}

Und ich möchte alle Verknüpfungen mit allen anderen Tabelen bekommen.

Wie kriegt man die?

Entweder einzlen aufrufen mit /api/customers/id oder API erweitern, und zwar so etwa so, wie das in getOne() gemacht ist