Confirm delivery via QR token
PUT/company/qr/confirm
This endpoint allows confirming a delivery using the QR token and service code.
When confirming a delivery:
- It is marked as completed in the system
- The confirmation token is invalidated
- The exact date/time of confirmation is recorded
Use cases:
- Confirm delivery upon arrival at the destination
- Record successful completion of a service
- Update delivery status in real time
Requirements:
- Valid QR token obtained from the GET /{token} endpoint
- Service code associated with the delivery
Request
Responses
- 200
- 404
Delivery successfully confirmed. Return the updated delivery data. Example:
{
_id: 5f8d3a1b2c3d4e5f6a7b8c9d,
service_code: SRV-2023-001,
status: delivered,
confirmed: true,
date_eta: 2023-10-15T14:30:00Z,
date_delivered: 2023-10-15T14:25:00Z
}
Delivery not found. Possible causes:
- The token or service code is invalid
- The delivery was already confirmed previously
- The delivery was canceled or deleted