GET /api/track-order
Tracks an order by its ID, returning current status and shipment details. Supports multiple ID formats for flexible lookups.Query Parameters
Order identifier. Accepts multiple formats:
- Readable order ID (e.g., “1050”)
- Database UUID
- Venndelo external ID
- Tracking number/guide
Response
Venndelo order ID
Human-readable KAIU order number (e.g., 1050)
Venndelo PIN number
Order status:
PENDING, APPROVED, SENT, DELIVERED, CANCELLEDFulfillment status from logistics provider
URL for tracking shipment on carrier website
Carrier name (e.g., “Coordinadora”, “Servientrega”)
Carrier tracking/guide number
Order creation timestamp (ISO 8601)
Total order amount
Example Request by Readable ID
Example Request by Tracking Number
Example Response
Order Status Values
| Status | Description |
|---|---|
PENDING | Order created, awaiting payment/confirmation |
APPROVED | Payment confirmed, ready for fulfillment |
SENT | Shipment created and picked up by carrier |
DELIVERED | Package delivered to customer |
CANCELLED | Order cancelled |
Fulfillment Status Values
Fulfillment status provides more granular tracking:| Status | Description |
|---|---|
PENDING | Awaiting pickup |
PICKED_UP | Picked up by carrier |
IN_TRANSIT | In transit to destination |
OUT_FOR_DELIVERY | Out for delivery |
DELIVERED | Successfully delivered |
FAILED | Delivery failed |
RETURNED | Returned to sender |
ID Resolution Strategy
The endpoint uses intelligent ID resolution:- Numeric check: If the ID is a number ≤ 2,147,483,647, it’s treated as a readable ID
- Database lookup: Searches by
readableId, UUIDid,externalId, andtrackingNumber - Venndelo query: Fetches the last 100 orders from Venndelo API
- Match: Finds matching order by ID, PIN, or tracking number
- Fallback: Returns local database data if not found in Venndelo
The endpoint searches the last 100 orders from Venndelo. For older orders not in this range, it returns data from the local database.
Data Privacy
Example: Local Database Fallback
If an order exists in the database but not in Venndelo’s last 100 orders:Error Responses
400 Bad Request - Missing ID
404 Not Found
405 Method Not Allowed
500 Internal Server Error
502 Bad Gateway - Venndelo API Error
If the Venndelo API returns an error, the endpoint returns:Integration with Venndelo
The endpoint integrates with Venndelo’s API:CORS Headers
The endpoint includes full CORS support:Access-Control-Allow-Origin: *Access-Control-Allow-Methods: GET, OPTIONSAccess-Control-Allow-Credentials: true
Performance Considerations
- Database Query: ~10-50ms
- Venndelo API Call: ~500-2000ms
- Total Response Time: ~600-2500ms
Using Readable IDs
Readable IDs are customer-friendly order numbers:Tracking URL Format
Thetracking_url field provides a direct link to the carrier’s tracking page. Customers can click this link to see real-time updates on the carrier’s website.