# \_getDT

Returns Customer Invoice details

### Parameters

#### cid

Customer ID

#### dateFrom

The date to retrieve customer invoice details from in format YYYY/MM/DD

#### dateTo

The date to retrieve customer invoice details to in format YYYY/MM/DD

#### start

where to start from e.g, by default, page 2 should be set to 10

#### length

number of results

#### order

order to display the results in, asc or desc.

#### draw

### Example

```
FM_api('CustomerInvoices_getDT', ['cid' => '1','dateFrom' => '2018-01-01', 'dateTo' => '2019-01-02', 'start' => '0','order' => '', 'draw' => '1', 'length' => '10'])
```

#### On Success

```
{"sql":"select id, appointment_id, num, cdate, total, paid, status from user82878_invoices as i where customer_id=1 and i.cdate>=\"2018-01-01\" and i.cdate<=\"2019-01-02 23:59:59\" and status>-2 order by num asc limit 0,10","draw":1,"recordsTotal":"10","recordsFiltered":"10","data":[["3|106|3","2018-10-19","2.5",2.5,"1",false,0]]}
```


---

# 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/customerinvoices/_getdt.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.
