Get delivery information by QR token
GET/company/qr/:token
Retrieve all information for a delivery using its unique QR token.
The QR token is generated when the delivery is created. When the QR code is scanned with the mobile app, this endpoint returns the delivery details and in the process rotates the token:
- Removes the
qr_tokenfrom the delivery - Generates a new
confirm_token(used inPUT /confirm)
This endpoint is PUBLIC — no authentication required.
Typical Usage Flow
- The carrier arrives at the destination and scans the QR code.
- The app calls this endpoint with the QR token.
- The delivery details are displayed to the signer.
- The signer confirms via
PUT /company/qr/confirm.
Returned Fields
- Shipment data (
service_code,status,cargo_type, etc.) - Pickup and delivery addresses (
etl_address,etd_address) - Assigned vehicle and driver
- Estimated and actual dates
confirm_tokento use for confirmation
Technical Notes
- Source code:
src/features/company/qr_delivery/controller.js→getDeliveryFromToken - The original
qr_tokenis invalidated after the first query. - The generated
confirm_tokenis required to complete the delivery.
Request
Responses
- 200
- 404
- 500
Delivery information obtained successfully
Delivery not found. This may occur when:
- The QR token does not exist, has already been used, or has expired
- The delivery was removed from the system
- The token format is incorrect
Internal server error when querying the database