# Barcodes

## Generate Barcode

Details of how the `barcode` endpoint can be used to generate barcodes in the parcelLab system are described below.

<details>

<summary><mark style="color:blue;">GET</mark> Generate Barcode</summary>

You can generate a barcode with the `barcode` endpoint.

The details of the Generate Barcode API are described in the following section.

**API Details**

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

**Query Parameters**

| Name        | Type    | Description                                           |
| ----------- | ------- | ----------------------------------------------------- |
| bcid        | string  | Any type of barcode.                                  |
| text        | string  | The value to be encoded.                              |
| scale       | number  | The size of code as `int`.                            |
| includetext | boolean | If `true`, the encoded value is shown.                |
| textalign   | string  | Where to align the shown value (for example: center). |

An example request is displayed below to show the format for generating a barcode.

{% code overflow="wrap" %}

```bash
curl --location 'https://api.parcellab.com/barcode/?bcid=qrcode&text=some-value&scale=5&includetext=true&textalign=center’
```

{% endcode %}

**Responses**

* 200 - accepted

</details>


---

# 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/utility-services/barcodes.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.
