QR codes
QR codes can be used by merchants to print labels at in-store locations. This is a useful feature for merchants who do not have access to printing facilities. Merchants bring their prepackaged shipment to a supported location and redeem their shipping label by scanning a digital QR code on their mobile device.
Currently, Shippo supports QR code generation for USPS, Sendle (in Australia only), and Evri.
USPS compliance
To comply with USPS requirements, QR codes should be generated on behalf of merchants and sellers who intend to use them. Ideally merchants or sellers will be able to “opt-in” to automatically receive QR codes when creating labels. This approach will 1) ensure a high adoption rate (with QR codes being scanned for in-store label printing) and 2) help reduce costs and maintenance related to QR code generation within USPS label broker systems.
All Shippo API users and third party integrators are subject to the Label Broker terms and conditions below: https://www.usps.com/terms-conditions/label-broker.htm
Create a QR code
To create a QR code for printerless shipping, you will need to
- make sure the merchant requests it and
-
specify
qr_code_requested
as the Shipment extra field
curl https://api.goshippo.com/shipments/ \
-H "Authorization: ShippoToken shippo_test_831a7a042784f523b95db65444e6e084b636764b" \
-d address_from="d799c2679e644279b59fe661ac8fa488" \
-d address_to="42236bcf36214f62bcc6d7f12f02a849" \
-d parcels=["defeb0a3a84949d390c94159ceb39bc6"] \
-d extra='{"qr_code_requested": true}' \
-d async=false
In the response you’ll get your usual Shipment object with all of the available rates. You can then use any rate object_id
that was returned to create a transaction and get your shipping label and QR code:
curl https://api.goshippo.com/transactions \
-H "Authorization: ShippoToken shippo_test_831a7a042784f523b95db65444e6e084b636764b" \
-d rate="cf6fea899f1848b494d9568e8266e076"
-d label_file_type="PNG"
-d async=false
The Transaction API provides a qr_code_url
as a response if the Shipment has a qr_code_requested
flag and the carrier provides such an option.
{
"object_state": "VALID",
"status": "SUCCESS",
"object_created": "2022-11-23T18:26:07.753Z",
"object_updated": "2022-11-23T18:26:13.472Z",
"object_id": "1cb8f204c01044d8b80ebffe9e8ada7c",
"object_owner": "shippotle@shippo.com",
"test": true,
"rate": "3f7479c81fbd44dea767ad7569b0a5e9",
"tracking_number": "92055901755477000000000015",
"tracking_status": "UNKNOWN",
"eta": null,
"tracking_url_provider": "https://tools.usps.com/go/TrackConfirmAction_input?origTrackNum=92055901755477000000000015",
"label_url": "https://shippo-delivery-east.s3.amazonaws.com/1cb8f204c01044d8b80ebffe9e8ada7c.png?Signature=r609rRqZbsiV%2Fy2mQG4CMHbsSnI%3D&Expires=1700763970&AWSAccessKeyId=AKIAJKHBTIO2YQPYZSEA&versionId=Xw8i1.ut9lrHOKonttu2lwV67NnA7uka",
"commercial_invoice_url": null,
"messages": [],
"order": null,
"metadata": "",
"parcel": "defeb0a3a84949d390c94159ceb39bc6",
"billing": {
"payments": []
},
"qr_code_url": "https://shippo-delivery-east.s3.amazonaws.com/1cb8f204c01044d8b80ebffe9e8ada7c_qr_code.png?Signature=EMf5A3hYzUi1t35tkgha1rCRnXY%3D&Expires=1700763973&AWSAccessKeyId=AKIAJKHBTIO2YQPYZSEA&versionId=Qhg_FflYWTHkLQeBaxMSaCuJ7zx3gALr"
}
It's important to share instructions along with the QR code with details of how to use it. This incudes some of the following items.
- Detail on how to find a supporting in-store location such as the Post Office.
- Details about the packing required. Normally, merchants items should be already packaged and ready-to-ship.
Sample QR code instructions
[Friendly introduction (e.g.: Hi first name)]
[Merchant info about outbound shipment here (e.g.: items, order #, RMA #, date, etc.]
For your convenience, you can print your outbound label at participating USPS® Post Offices®. Simply bring your packaged and ready-to-ship item and show the Label Broker code below to the USPS Retail Associate at the Retail Counter.
![QR code sample](images/qr-code.png '#width=300px;')
You can find participating locations here: [https://www.usps.com/business/label-broker.htm](https://www.usps.com/business/label-broker.htm)
You can also use this website for instructions on how to print your label at home.