URLs & Barcodes

Our API allows you to perform a number of key tasks to assist with your processes.

Shorten URL

Details of how you can submit a URL to be shortened in the parcelLab system are described below.

POST Shorten URL

You can submit any URL to be shortened. The result will contain a short code, which can be used as a suffix to our domain for a custom link (that is: for a short code abcde, the URL would be http://prcl.io/abcde). To use this API, you need your parcelLab user_id and API token for authentication.

The details of the Shorten URL API are described in the following section.

API Details

POST http://prcl.io/

Name
Type
Description

user

number

parcelLab user ID

token

string

parcelLab API token

Request Body

Name
Type
Description

url

string

The URL to submit for shortening (for example: https://parcellab.com).

An example request is displayed below to show the format for shortening a URL.

curl --location 'http://prcl.io’ \
  --header 'user: 100' \
  --header 'token: parcelLabAPItoken-30characters' \
  --data ‘{
       “url”: “https://parcellab.com”
}’

Responses

  • 200 - accepted

Generate Barcode

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

GET Generate Barcode

You can generate a barcode with the barcode endpoint.

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

API Details

GET 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.

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

Responses

  • 200 - accepted

Last updated

Was this helpful?