Tracking
Read the status and checkpoints of a shipment, and confirm a delivery.
Track a shipment
Send the WeShipYou tracking number (WSY…), which you find in label.trackingNumber once the label is bought. The answer has the current status, the carrierName and the checkpoints. As the owner of the shipment you also get its details (addresses, items, locations), which are hidden from other callers.
curl https://sandbox.weshipyou.com/api/v1/tracking/WSY0000000000US \
-H "Authorization: Bearer $WSY_ACCESS_TOKEN"Tracking needs an access token. Poll it no more than a few times an hour per shipment: checkpoints come from the carriers and do not change faster than that.
Shipment states
A shipment's state goes from created through label_created to delivered, or to cancelled. Read the shipment itself for its state; read tracking for the carrier checkpoints.
Confirm a delivery
The recipient can record that a shipment arrived. No token is needed: the tracking number and the account number identify the shipment. A shipment that is already delivered can always be confirmed. An in_transit shipment can be confirmed only when it is overdue (its label was bought at least 30 days ago and, when it has a delivery promise, at least 15 days have passed since that date) and it has not reached WeShipYou at destination. Once the package is with WeShipYou in Cuba (picked up at the airport or port, on a transit trip or a delivery route), only WeShipYou marks it delivered. A refusal is a 400 with data.code: delivery-confirmation-at-destination, or delivery-confirmation-too-early with data.availableFrom.