> For the complete documentation index, see [llms.txt](https://docs.fieldmotion.com/fieldmotion-api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fieldmotion.com/fieldmotion-api-docs/invoices/_getdt.md).

# \_getDT

Returns Invoice details

### Parameters

#### dateFrom

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

#### dateTo

The date to retrieve 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

a DataTables value used to solve race conditions. what is sent to the server will be returned in the reply.

#### invoice\_no

string. filter for invoice numbers. can be the exact invoice number being searched for, or a range such as "abc1234-abc4567" (hyphen-separated)

#### invoice\_id

integer. filter for a specific invoice

#### customer

string. filter for a customer by string snippet

#### nominal

integer. filter for invoices with a specific nominal code

#### status

integer. filter for invoices of a specific status

#### order\_no

string. filter for invoices matching an order\_no string snippet

#### form\_id

integer. filter for invoices using a specific form.

### Example

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

#### On Success

```
{"draw":1,"recordsTotal":"14","totals":{"total":"6281.5","paid":"2213","ids":"13"},"recordsFiltered":"13","data":[["11|126|8","2018-11-07","1","24",0,"1",null,"0","2018-11-21 16:56:21"],["12|127|9","2018-11-07","1","90",0,"1",null,"1","2018-11-22 09:36:58"],["13|130|10","2018-11-09","1","3",0.5,"2",null,"0","2018-11-12 16:53:40"],["15|132|12","2018-11-12","3","2.5",0,"1",null,"0","2018-11-16 09:36:24"],["16|133|","2018-11-13","6","2400",2400,"1",null,"0","2018-11-22 09:50:00"],["17|99|10","2018-11-22","2",""...
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.fieldmotion.com/fieldmotion-api-docs/invoices/_getdt.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
