Skip to main content
POST
/
labels
Create Label
curl --request POST \
  --url https://api.loopreturns.com/api/v1/labels \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "label_request_id": 67329889100573,
  "tracking_number": "9400136105440512280610",
  "carrier": "USPS",
  "label_url": "https://s3.amazonaws.com/example-bucket/label.pdf",
  "rate": [
    {
      "amount": 50000,
      "currency_code": "USD"
    },
    {
      "amount": 25000,
      "currency_code": "CAD"
    },
    {
      "amount": 1500,
      "currency_code": "EUR"
    }
  ],
  "tracking_url": "https://tools.usps.com/go/TrackConfirmAction_input?strOrigTrackNum=9400136105440512280610",
  "qrcode_url": "https://s3.amazonaws.com/example-bucket/qrcode.pdf"
}
'
{
  "id": 67329889100573,
  "tracking_number": "9400136105440512280610",
  "tracking_url": "https://tools.usps.com/go/TrackConfirmAction_input?strOrigTrackNum=9400136105440512280610",
  "carrier": "USPS",
  "label_url": "https://s3.amazonaws.com/example-bucket/label.pdf",
  "qrcode_url": "https://s3.amazonaws.com/example-bucket/qrcode.pdf",
  "rate": [
    {
      "amount": 50000,
      "currency_code": "USD"
    },
    {
      "amount": 25000,
      "currency_code": "CAD"
    },
    {
      "amount": 1500,
      "currency_code": "EUR"
    }
  ],
  "status": "new",
  "created_at": "2023-04-25T13:25:00-05:00"
}

Documentation Index

Fetch the complete documentation index at: https://docs.loopreturns.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json
label_request_id
integer
required

The label request id this label applies to.

Example:

67329889100573

tracking_number
string
required

The tracking number associated with the label.

Maximum string length: 256
Example:

"9400136105440512280610"

carrier
string
required

The carrier associated with the label.

Maximum string length: 32
Example:

"USPS"

label_url
string
required

The URL containing the printable PDF of the labels.

Maximum string length: 2048
Example:

"https://s3.amazonaws.com/example-bucket/label.pdf"

rate
object
required
Example:
[
{ "amount": 50000, "currency_code": "USD" },
{ "amount": 25000, "currency_code": "CAD" },
{ "amount": 1500, "currency_code": "EUR" }
]
tracking_url
string | null

The tracking URL associated with the label.

Maximum string length: 2048
Example:

"https://tools.usps.com/go/TrackConfirmAction_input?strOrigTrackNum=9400136105440512280610"

qrcode_url
string

The QR Code URL containing the printable PDF of the labels.

Maximum string length: 512
Example:

"https://s3.amazonaws.com/example-bucket/qrcode.pdf"

Response

OK

id
integer<int64>

The id of the label you created.

Example:

67329889100573

tracking_number
string

The tracking number associated with the label.

Example:

"9400136105440512280610"

tracking_url
string

The tracking URL associated with the label.

Example:

"https://tools.usps.com/go/TrackConfirmAction_input?strOrigTrackNum=9400136105440512280610"

carrier
string

The carrier associated with the label.

Example:

"USPS"

label_url
string

The URL containing the printable PDF of the labels.

Example:

"https://s3.amazonaws.com/example-bucket/label.pdf"

qrcode_url
string

The QR Code URL containing the printable PDF of the labels.

Example:

"https://s3.amazonaws.com/example-bucket/qrcode.pdf"

rate
object
Example:
[
{ "amount": 50000, "currency_code": "USD" },
{ "amount": 25000, "currency_code": "CAD" },
{ "amount": 1500, "currency_code": "EUR" }
]
status
string

The status of the label.

Example:

"new"

created_at
string<date-time>

The date the label was created.

Example:

"2023-04-25T13:25:00-05:00"