# Welcome!

Thank you for visiting the Lancerkit public API documentation!  The Lancerkit API allows you to integrate Lancerkit into your own apps, automating operations and increasing efficiency.

You can quickly manage projects, tasks, clients, bills, and more using the Lancerkit API. The API gives you a safe and dependable means to access your Lancerkit data, allowing you to easily develop complex integrations and unique apps. The Lancerkit API is ideal for developers wishing to enhance Lancerkit's capabilities or businesses looking to streamline their procedures.

This documentation gives an in-depth look into the Lancerkit API, including information on authentication, endpoints, request and response formats, and recommended practices for utilizing the API. If you have any queries or require assistance, please contact our dedicated support staff at <contact@lancerkit.com>


# API Reference

Dive into the specifics of each API endpoint by checking out our complete documentation.

## Pets

All the methods associated with `CRUD`ing some pets. Which isn't as weird as it sounds:

{% content-ref url="/pages/4oX0EfnazXyShcXzWbq2" %}
[Authentication](/reference/api-reference/authentication)
{% endcontent-ref %}

## Users

Everything related to users:

{% content-ref url="/pages/Jah29Irs2LrkEOj0OMBO" %}
[Contacts](/reference/api-reference/contacts)
{% endcontent-ref %}

{% hint style="info" %}
**Good to know:** Using the 'Page Link' block lets you link directly to a page. If this page's name, URL or parent location changes, the reference will be kept up to date. You can also mention a page – like [Authentication](/reference/api-reference/authentication) – if you don't want a block-level link.
{% endhint %}


# Authentication

How to authenticate to the lancer kit API

## Authentication flow

To use the Lancerkit API, you'll need to use an API key. To have an API key, you must first be sure to have created an account on our application: <https://lancerkit.com>&#x20;

> Your API key may be found in the Lancerkit application under the "Settings > Integrations" menu.&#x20;

After you have your API key, you may authenticate to the API by putting it in the HTTP header "Authorization" of your API queries. The Authorization header should look like "Authorization: Bearer \[your-api-key]".&#x20;

This provides a safe and dependable method of accessing your Lancerkit data, guaranteeing that only authorized people may use the API. This article will walk you through the process of authenticating to the Lancerkit API using your API key so you can start developing sophisticated integrations and custom apps with ease This article will walk you through the process of authenticating to the Lancerkit API using your API key so you can start developing sophisticated integrations and custom apps with ease.&#x20;

For instance, you can try the following call:&#x20;

## List all the contacts

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

List all the contacts in the application

#### Headers

| Name          | Type            | Description |
| ------------- | --------------- | ----------- |
| Authorization | Bearer API\_KEY |             |

{% tabs %}
{% tab title="200 Your API key is correct" %}

```javascript
{
    "name"="Wilson",
    "owner": {
        "id": "sha7891bikojbkreuy",
        "name": "Samuel Passet",
    "species": "Dog",}
    "breed": "Golden Retriever",
}
```

{% endtab %}

{% tab title="401 Your API key is not correct" %}

{% endtab %}
{% endtabs %}

{% hint style="info" %}
**Good to know:** If your API key is incorrect, or, if your authorization header is not present, all your requests will fail with a HTTP 401 or 403 status
{% endhint %}


# Contacts

Contacts are all the individual persons or organizations you are doing business with. Use the contacts API to list, create or update contacts within your Lancerkit account.&#x20;

## API endpoints

## List contacts

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

List all the contacts on your account

#### Query Parameters

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

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

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

{% endtab %}
{% endtabs %}

## Get a contact

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

Get a specific contact from your account

#### Path Parameters

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

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

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

{% endtab %}
{% endtabs %}

## Delete contacts

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

Delete some contacts from your account

#### Request Body

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

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

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

{% endtab %}
{% endtabs %}

## Edit a contact

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

Edit an existing contact

#### Path Parameters

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

#### Request Body

| Name      | Type   | Description |
| --------- | ------ | ----------- |
| firstName | String |             |
| lastName  | String |             |
| company   | String |             |
| phone     | String |             |
| email     | String |             |
| vatNumber | String |             |
| country   | String |             |
| city      | String |             |
| zip       | String |             |
| number    | String |             |
| street    | String |             |

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

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

{% endtab %}
{% endtabs %}

## Create a contact

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

Create a new contact&#x20;

#### Request Body

| Name      | Type   | Description |
| --------- | ------ | ----------- |
| firstName | String |             |
| lastName  | String |             |
| company   | String |             |
| phone     | String |             |
| email     | String |             |
| vatNumber | String |             |
| country   | String |             |
| city      | String |             |
| zip       | String |             |
| number    | String |             |
| street    | String |             |

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

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

{% endtab %}
{% endtabs %}


# 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 %}


# Transactions

Transactions are all the deposits and withdrawals from your bank account synced in your Lancerkit account. Use the transactions API to list, create or update contacts within your Lancerkit account.&#x20;

## API endpoints

## List transactions

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

List all the transactions on your account

#### Query Parameters

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

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

```javascript
{
    // Response


}
```

{% endtab %}
{% endtabs %}

## Get a transaction

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

Get a specific transaction from your account

#### Path Parameters

| Name | Type   | Description                             |
| ---- | ------ | --------------------------------------- |
| id   | String | <p></p><p>The id of the transaction</p> |

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

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

{% endtab %}
{% endtabs %}

## Delete transactions

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

Delete some transactions from your account

#### Request Body

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

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

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

{% endtab %}
{% endtabs %}

## Edit a transaction

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

Edit an existing transaction

#### Path Parameters

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

#### Request Body

| Name        | Type   | Description |
| ----------- | ------ | ----------- |
| date        | String |             |
| currency    | String |             |
| amount      | String |             |
| counterpart | String |             |
| description | String |             |

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

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

{% endtab %}
{% endtabs %}

##


