# \_getChildrenDT

Gathers the details of a Parent Customer's "Child" Customers.

### Parameters

#### start

The number of Child Customers which will be skipped before the data of any others are returned.

#### length

The number of Child Customers which this function will attempt to return.

#### customer\_id

The ID of the Parent Customer being checked for Child Customer data

#### \[order] \[0] \[dir]

Affects the order that Child Customers can be picked by this function, can be "asc" or "desc".

#### draw

An integer value, used to determine which function use is the most recent, based on which has the highest "draw" value.

### Example

```
FM_api('Customer_getChildrenDT',[
    'start' => '0',
    'length' => '10',
    'customer_id' => '862657',
    'order' => [['dir'=>'asc']],
    'draw' => '10'
    ]
);
```

### Results

#### On Success

```
{"draw":1,"recordsTotal":"1","recordsFiltered":"1","data":[["862658","Test Child Customer",["test_address1","test_address2","test_county","A12 B345"],"1",""]]}
```

#### On Failure

If the "start" parameter is not set:

```
{"error":"missing or invalid parameter: start"}
```

If the "length" parameter is not set:

```
{"error":"missing or invalid parameter: length"}
```

If the "customer\_id" parameter is not set:

```
{"error":"missing or invalid parameter: customer_id"}
```

If the "\[order] \[0] \[dir]" parameter is not set:

```
{"error":"missing or invalid parameter: [order] [0] [dir]"}
```

If the "draw" parameter is not set:

```
{"error":"missing or invalid parameter: draw"}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fieldmotion.com/fieldmotion-api-docs/customer/_getchildrendt.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
