6 Home
Skylar Ittner edited this page 2 months ago

Quick Send Barcode Specification

Introduction

The Quick Send format is intended as a simple way to encode address and parcel information into a single barcode. This allows users to present a barcode when sending a package, enabling autofilling in shipping software.

Basic Rules

  • The barcode shall be in QR Code, DataMatrix, or PDF417 format.
  • Data fields shall be delineated with a pipe character (|).
  • Data shall be encoded as ASCII or UTF-8. If the chosen barcode format has a different default/preferred encoding, that encoding may be used instead.
  • Data fields shall not include a newline or horizontal whitespace characters except normal ASCII spaces.
  • The vertical pipe character (|) must not be used in any data field.
  • The = and + characters should not be used in data fields, as they are used as subfield separators.
  • The data must not start or end with a pipe character.
  • Most fields are not strictly required and may be left empty when not needed. Implementations may reject a code with insufficient data.
  • Extra fields at the end are ignored.

Data Header

All barcodes shall start with QSv1 as the first field. The second field shall specify the subtype of the barcode.

Data Fields

Subtype a: To/From Addresses

Basic to/from address data only.

Position Meaning
0 Format header (QSv1)
1 Subtype header (a)
2 Sender/payer account number. See appendix for specification.
3 To name
4 To company/firm/business
5 To street
6 To secondary address line
7 To city
8 To state/province/etc
9 To postal code
10 To country (ISO 2-character country code)
11 To phone
12 To email
13 From name
14 From company/firm/business
15 From street
16 From secondary address line
17 From city
18 From state
19 From postal code
20 From country (ISO 2-character country code)
21 From phone
22 From email
23 Preferences field. See appendix.

Subtype p: Address and Parcel Information

Contains address data, plus parcel information and options.

Position Meaning
0 - 23 See a
24 Weight (U.S. ounces)
25 Item type (see appendix)
26 Length (inches)
27 Width (inches)
28 Height (inches)
29 Non-machinable: 1 if true, otherwise empty
30 Certified Mail: 1 if true, otherwise empty
31 Registered Mail: 1 if true, otherwise empty
32 Registered Mail declared value, USD
33 Return Receipt Requested: 1 for paper, 2 for electronic, 3 for both, otherwise empty
34 Special rate eligibility: M for Media Mail, L for Library Mail, empty if not claiming eligibility
35 Insurance amount, USD
36 Signature services. 1: Signature required, 2: Adult signature required, 3: Restricted delivery signature, 4: Adult restricted signature, 5: Indirect signature.

Subtype ac: Addresses and Customs

Address data plus customs form.

Position Meaning
0 - 23 See tofrom
24 Customs contents type: "documents", "gift", "merchandise", "returned_goods", "sample", "dangerous_goods", "humanitarian_donation", or "other" (this field always required)
25 Customs form signer name (electronically sign the form)
26 Non-delivery option: r or a for return or abandon, respectively. Default if empty is r.
27 Explanation of contents (required if field 24 is "other")
28 Restriction type (empty, "other", "quarantine", or "sanitary_phytosanitary_inspection")
29 Restriction comments (required if field 28 is not empty)
30 EEL/PFC: Use "NOEEI 30.37(a)" for most shipments under $2,500. Otherwise, use the shipment's Automated Export System (AES) Internal Transaction Number (ITN).
31 Customs items. See appendix for format.

Subtype pc: Addresses, Parcel, and Customs

Address data, parcel information, and customs form.

Position Meaning
0 - 23 See a
24-36 See p
37 Customs contents type: "documents", "gift", "merchandise", "returned_goods", "sample", "dangerous_goods", "humanitarian_donation", or "other" (this field always required)
38 Customs form signer name (electronically sign the form)
39 Non-delivery option: r or a for return or abandon, respectively. Default if empty is r.
40 Explanation of contents (required if field 36 is "other")
41 Restriction type (empty, "other", "quarantine", or "sanitary_phytosanitary_inspection")
42 Restriction comments (required if field 40 is not empty)
43 EEL/PFC: Use "NOEEI 30.37(a)" for most shipments under $2,500. Otherwise, use the shipment's Automated Export System (AES) Internal Transaction Number (ITN).
44 Customs items. See appendix for format.

Appendix

Item Types

The following values are allowed for field 24 in a parcel type code:

  • (empty) when a custom size and weight item is being shipped
  • Card
  • Letter
  • Flat
  • Parcel
  • SoftPack (requires length and width set)
  • FlatRateEnvelope
  • FlatRateLegalEnvelope
  • FlatRatePaddedEnvelope
  • SmallFlatRateBox
  • MediumFlatRateBox
  • LargeFlatRateBox
  • LargeFlatRateBoxAPOFPO
  • UPSLetter
  • UPSExpressBox
  • UPS25kgBox
  • Tube (Note: UPS only)
  • Pak (Note: UPS only)
  • SmallExpressBox
  • MediumExpressBox
  • LargeExpressBox
  • FedExEnvelope
  • FedExBox
  • FedExPak
  • FedExTube
  • FedEx10kgBox
  • FedEx25kgBox
  • FedExSmallBox
  • FedExMediumBox
  • FedExLargeBox
  • FedExExtraLargeBox

Customs Items

The customs items field contains multiple rows of data, with several fields per row.

Rows are delineated with =. Fields inside a row are delineated with +.

Following is a chart of the field positions within a customs item row.

All fields are required.

Position Meaning
0 Human readable item description
1 Quantity of item
2 Value of item in USD (quantity * value of a single item)
3 Weight of the item in ounces (quantity * weight of single item)
4 Harmonized Tariff Schedule number
5 Country of origin as two-character ISO country code

Account Number field

This field is intended for a billing account number, to enable automatic payments and other fun things.

Data format is implementation-specific. Any format is allowed as long as the data does not include the | character.

The one rule for this field is to preface the data with a unique identifier for the implementation, to prevent confusion and incompatibility. The identifier shall be followed by a colon (:) to signal the start of the actual data. Software must read until the colon to determine compatibility with the encoded data. If the software is not compatible, the remainder of this field shall be ignored.

To prevent collisions, see this list of implementation/vendor codes that are already in use.

Preferences field

This field allows the user's software to communicate preferences to the shipping software. See "Account Number field" above for the format specification.