# Quickstart Guide

## parcelLab API <a href="#gitbook-api" id="gitbook-api"></a>

The parcelLab API can be used from outside the parcelLab platform, and can be accessed via its RESTful endpoints using the `https://api.parcellab.com/` URL.

The API processes requests and responses in JSON format and adheres to common HTTP methods and response codes. All interactions with the API must occur through HTTPS for security.

Check out the full list of endpoints in the parcelLab API v2 LTS.

{% content-ref url="/pages/cp62v9Dyn4pKa7RRHTv2" %}
[API Reference](/docs/developers/v2/getting-started/api-reference.md)
{% endcontent-ref %}

## Access Token <a href="#personal-access-token" id="personal-access-token"></a>

In order to use the parcelLab platform, you'll need an access token to make calls to the API.

When you are onboarded with parcelLab, we will send you the API credentials and inform you which fields should be used so you can transmit and display the data correctly.

{% hint style="info" %}
Access tokens can also be created in your [account settings in the parcelLab App](https://app.parcellab.com/service/account/apitoken/).
{% endhint %}

Once you have your personal access token, you're able to start making your first API call. To authorize your API requests, include your `API token` in the request header.

```python
Authorization: Parcellab-API-Token <your-base64-encoded-api-key>
```

## Making Requests

When making an API call, the client interacts with the server by sending requests to access or update the data it holds. An API request consists of:

* HTTP verb - defines the type of operation (for example: GET, POST, PUT, and DELETE)
* Header - contains authorization and request information
* Path - identifies the resource being interacted with
* Message body - optional content used when sending data (for example: creating or updating resources)

### HTTP Verbs

The following HTTP verbs are generally used to interact with resources in the parcelLab API:

* GET — retrieve a specific resource or a collection of resources
* POST — create a new resource
* PUT — update an existing resource
* PATCH - partially modify an existing resource
* DELETE — remove a resource

### Best Practices for API Requests

When making API calls, it’s important to consider the following:

* Always include the mandatory request fields in your API call and handle the required fields in the response
* Avoid using spaces in field names
* Store and reuse values using variables (for example: your parcelLab user ID)

## API Versions

The parcelLab API is used to interact with the parcelLab platform. As changes are made as part of API development, versioning ensures that these changes are rolled out successfully to keep the API secure and high performing.

At parcelLab, we have the API v4 Enhanced for new integrations, which is the recommended and standard integration path, allowing for more enhanced and standardized interaction with our platform.

{% hint style="warning" %}
We also have the API v2 LTS for existing integrations only, which is stable and will continue to be maintained, providing flexible and robust integrations with our platform.
{% endhint %}


---

# 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.parcellab.com/docs/developers/v2/getting-started/quickstart-guide.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.
