# \_documentLink

Fetches the PDF or Word document version of a Quote. User settings determine which one is returned.

### Parameters

#### id

The ID of the Quote.

### Example

```
FM_api('Quotes_documentLink', ['id' => '1']);
```

### Result

#### On Success

These examples assume that the User has an ID of 123.

For a PDF file:

```
{'type':'pdf','link':'\/userfiles\/123\/quotes\/1.pdf'}
```

For a Word document file:

```
{'type':'word','link':'\/userfiles\/123\/quotes\/1.doc'}
```

#### On Failure

If the User is not logged in:

```
{'error':'no logged in'}
```

If the specified Quote does not exist:

```
{'error':'quote does not exist'}
```

If an internal error occurs:

```
{'error':'error on database insert, please try again'}
```


---

# 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/quote/_documentlink.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.
