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

# Documents

Documents are all the invoices, quotes, contracts, and other files you have stored in your Lancerkit account. Use the documents API to list, create or update contacts within your Lancerkit account.&#x20;

## API endpoints

## List documents

<mark style="color:blue;">`GET`</mark> `https://api.lancerkit.com/documents`

List all the documents on your account

#### Query Parameters

| Name   | Type   | Description                          |
| ------ | ------ | ------------------------------------ |
| search | String | A query to filter the documents list |
| page   | Number |                                      |

{% tabs %}
{% tab title="200: OK All the documents matching your search " %}

```javascript
{
    // Response

}
```

{% endtab %}
{% endtabs %}

## Get a document

<mark style="color:blue;">`GET`</mark> `https://api.lancerkit.com/documents/:id`

Get a specific document from your account

#### Path Parameters

| Name | Type   | Description            |
| ---- | ------ | ---------------------- |
| id   | String | The id of the document |

{% tabs %}
{% tab title="200: OK The specified document" %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

## Delete documents

<mark style="color:red;">`DELETE`</mark> `https://api.lancerkit.com/documents`

Delete some documents from your account

#### Request Body

| Name | Type   | Description                        |
| ---- | ------ | ---------------------------------- |
| ids  | String | The ids of the documents to delete |

{% tabs %}
{% tab title="200: OK The number of documents deleted" %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

## Edit a document

<mark style="color:green;">`POST`</mark> `https://api.lancerkit.com/documents/:id`

Edit an existing document

#### Path Parameters

| Name | Type   | Description            |
| ---- | ------ | ---------------------- |
| id   | String | The id of the document |

#### Request Body

| Name      | Type   | Description                      |
| --------- | ------ | -------------------------------- |
| type      | String | Invoice / Quote / Charge / Other |
| reference | String |                                  |
| date      | String |                                  |
| currency  | String |                                  |
| amount    | String |                                  |
| contact   | String | The ID of the contact            |

{% tabs %}
{% tab title="200: OK The edited document" %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

## Create a document

<mark style="color:green;">`POST`</mark> `https://api.lancerkit.com/documents/new`

Create a new document

#### Path Parameters

| Name | Type   | Description            |
| ---- | ------ | ---------------------- |
| id   | String | The id of the document |

#### Request Body

| Name      | Type   | Description                      |
| --------- | ------ | -------------------------------- |
| type      | String | Invoice / Quote / Charge / Other |
| reference | String |                                  |
| date      | String |                                  |
| currency  | String |                                  |
| amount    | String |                                  |
| contact   | String | The ID of the contact            |

{% tabs %}
{% tab title="200: OK The created document" %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}


---

# 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://apidoc.lancerkit.com/reference/api-reference/documents.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.
