WooCommerce Shipment Tracking API
Integrate multi-carrier parcel tracking into your WooCommerce store backend. Automate delivery confirmations, capture NDR reasons, and eliminate manual courier checks.
Backend Integration Architecture
Unlike rigid plugins that lock you into proprietary portals, ClearTrack exposes a lightweight REST API contract. Connect your WooCommerce store directly to track Speed Post, domestic couriers, and regional carriers from a single endpoint.
Why Developers Integrate ClearTrack with WooCommerce
Automated Order Notes
Append automated delivery milestones and checkpoint timestamps directly to WooCommerce order notes.
NDR Automation
Catch failed delivery attempts with normalized reason codes and trigger customer address confirmation emails.
Unified Carrier Contract
Parse identical JSON payloads regardless of whether the order was shipped via Speed Post or a private courier.
PHP Backend Implementation Example
Query consignment status in your WooCommerce theme or custom plugin using WordPress’s native HTTP client:
// Example: Fetch tracking status in WooCommerce backend
function check_cleartrack_order_status($carrier, $awb) {
$api_key = 'ct_live_your_api_key';
$url = 'https://api.cleartrackpromise.in/v1/track/' . urlencode($carrier) . '/' . urlencode($awb);
$response = wp_remote_get($url, array(
'headers' => array(
'X-API-Key' => $api_key,
'Accept' => 'application/json',
),
'timeout' => 15,
));
if (is_wp_error($response)) {
return null;
}
$body = wp_remote_retrieve_body($response);
return json_decode($body, true);
}
For complete endpoint specs and response structures, see the Tracking API Documentation, view prepaid lookup plans, and check Supported Carriers.
Frequently Asked Questions
Is ClearTrack an official WordPress plugin?
No. ClearTrack is an independent REST API that integrates directly into your WooCommerce store backend, theme functions, or custom WordPress code using standard HTTP requests.
How do I query tracking data from WooCommerce?
You can make server-side GET requests to the ClearTrack API using WordPress's built-in wp_remote_get() function or standard PHP cURL, passing your consignment number and API key.
Can I use ClearTrack to automatically update WooCommerce order statuses?
Yes. By scheduling a recurring WP-Cron job or background worker, you can check consignment statuses and update order statuses to Completed or trigger customer WhatsApp alerts when an NDR occurs.
Does ClearTrack support India Post consignments booked for WooCommerce orders?
Yes. ClearTrack provides standardized JSON tracking for Speed Post and India Post alongside private couriers.
Upgrade Your WooCommerce Tracking
Sign up for a free 14-day trial with 100 test lookups. Streamline order tracking across Indian carriers.