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