> ## Documentation Index
> Fetch the complete documentation index at: https://docs.slm.m1amdocs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Account.fetchFamily

The `fetchFamily` method returns the children of the given `Account`.

See the input parameters for the ways in which to specify the payment methods. Use this method to conduct searches for all the accounts that have a familial relationship, that is, parent-to-child, donor-to-recipient, or sibling-to-sibling.

* For a parent account, get all the children (and return the parent and those children).
* For a child account, get the parent and all the siblings.

## Input

*srd*: sparse response description, a SOAP string (which must be a JSON object), in which you specify the elements you want returned.This parameter enables the calling system to constrain a `method` call to return only components you specify. This gives you greater control over returned content, and improves response time within the Vindicia platform by reducing the processing needed for the call.

Some fields are required, either practically or in the WSDL, and will be returned regardless of the *srd*. A null *srd* returns the complete response.

*account*: the `Account` for which you wish to find the parent and/or sibling `Accounts`.

## Output

*return*: an object of type `Return` that indicates the success or failure of the call.

*parent*: the parent `Account` for this family.

*child*: the child or children `Accounts` in this family.

## Returns

This method returns the codes listed in [The Return Object](The_Return_Object).

## Example

```

$soapCaller = new Account();
$childAcct1 = new Account();
 
// to fetch the family of this child
$childAcct1->setMerchantAccountId('son-101);
 
$response = $childAcct1->fetchFamily();
 
if ($response['returnCode'] == 200) {
    $fetchedParent = $response['parent'];
    print “Parent account id: “;
    print $fetchedParent->getMerchantAccountId() . “\n”;
 
    $fetchedChildren = $response['child'];
 
    if ($fetchedChildren != null) {
       foreach($fetchedChildren as $fetchedChild) {
       print “Child account id: “;
       print $fetchedChild->getMerchantAccountId() . “\n”;
    } 
}
else {
   // Error while fetching the family
   print $response['returnString'] . "\n";
}
```

**Parent topic:**[Account Methods](../topics/Account_Methods)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.