# GetInvoice

Use this function to retrieve a specific invoice.

## Properties

#### Authentication

Authentication values used to connect to the Xero server.

#### Invoice id / number

The InvoiceID or Number for the invoice to retrieve.

#### Return options

Select how the data is to be returned.

Possible values are:

* JSON
* PDF

Note: If set to JSON, the item is returned. If set to PDF, the item is downloaded as a PDF file and file path is returned. The file is saved in the default temporary folder of the user.

## Output

#### Return type of Invoice

#### Details of the invoice as determined by the selected [Return option](https://github.com/linx-software/linx-docs/blob/v6-Main/reference/plugins/xero/content/invoices/getattachments.md#return-options).

## Links

[Xero Developer: Invoices (GET)](https://developer.xero.com/documentation/api/invoices#get)


---

# 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.linx.software/reference/plugins/xero/content/invoices/getinvoice.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.
