Shipi Resources
Shipi Resources
Shipi Resources

API Documentation: Tracking

Written on February 17, 2026 by myshipi.com

Table of Contents

21 sections

The Track Shipment endpoint returns real-time tracking events for any shipment created through Shipi. Use it to build custom tracking pages, send status notifications, or display delivery updates in your application.

Base URL

https://app.myshipi.com

Authentication

No authentication required. The tracking endpoint is public — it looks up the shipment by tracking number and uses the stored carrier credentials to fetch tracking data. This makes it easy to embed tracking in customer-facing pages.

Endpoint

GET /tracking/tracking_api/tracking_internal.php

Returns real-time tracking events for a shipment created through Shipi.

Query Parameters

ParameterTypeRequiredDescription
nostringYesThe tracking number from the shipment

Example Request

GET https://app.myshipi.com/tracking/tracking_api/tracking_internal.php?no=794987330490

Success Response

{
  "status": "success",
  "trk_no": "794987330490",
  "carrier": "fedex",
  "events": [
    {
      "e_code": "DE",
      "e_status": "Delivered",
      "e_loc": "New York, NY",
      "e_time": "14:30:00",
      "e_date": "2024-01-15"
    },
    {
      "e_code": "OD",
      "e_status": "Out for Delivery",
      "e_loc": "New York, NY",
      "e_time": "08:15:00",
      "e_date": "2024-01-15"
    },
    {
      "e_code": "IT",
      "e_status": "In Transit",
      "e_loc": "Newark, NJ",
      "e_time": "03:22:00",
      "e_date": "2024-01-14"
    },
    {
      "e_code": "PU",
      "e_status": "Picked Up",
      "e_loc": "Los Angeles, CA",
      "e_time": "16:00:00",
      "e_date": "2024-01-12"
    }
  ],
  "edd": "2024-01-15",
  "deliverd_date": "2024-01-15",
  "delivery_setup": 3,
  "ship_from": {
    "city": "Los Angeles",
    "state": "CA",
    "country": "US"
  },
  "ship_to": {
    "city": "New York",
    "state": "NY",
    "country": "US"
  }
}

Response Fields

FieldTypeDescription
statusstring"success" or "error"
trk_nostringThe tracking number
carrierstringCarrier code (e.g. “fedex”, “dhl”, “ups”)
eventsarrayArray of tracking events, most recent first
eddstringEstimated delivery date (YYYY-MM-DD)
deliverd_datestringActual delivery date, if delivered (YYYY-MM-DD)
delivery_setupintegerCurrent delivery status code (see table below)
ship_fromobjectOrigin address (city, state, country)
ship_toobjectDestination address (city, state, country)

Event Object Fields

Each event in the events array contains:

FieldTypeDescription
e_codestringStandardized event code (see below)
e_statusstringHuman-readable status description
e_locstringLocation where the event occurred
e_timestringTime of the event (HH:MM:SS)
e_datestringDate of the event (YYYY-MM-DD)

Delivery Status Codes

The delivery_setup field provides a simple numeric status for the overall shipment:

CodeStatusDescription
0Shipment CreatedLabel created, not yet picked up by the carrier
1In TransitPackage is in transit between facilities
2Out for DeliveryPackage is out for final delivery
3DeliveredPackage has been delivered successfully

Common Event Codes

Event codes are standardized across all carriers:

CodeMeaning
PUPicked Up
ITIn Transit
ARArrived at Facility
DPDeparted Facility
CCCustoms Cleared
ODOut for Delivery
DEDelivered
EXException / Issue

Error Response

{
  "status": "error",
  "msg": "No tracking data found"
}

Code Examples

cURL

curl "https://app.myshipi.com/tracking/tracking_api/tracking_internal.php?no=794987330490"

PHP

$tracking_no = '794987330490';
$url = "https://app.myshipi.com/tracking/tracking_api/tracking_internal.php?no=" . $tracking_no;

$response = json_decode(file_get_contents($url), true);

if ($response['status'] === 'success') {
    echo "Carrier: " . strtoupper($response['carrier']) . "\n";
    echo "Status: " . $response['delivery_setup'] . "\n\n";

    foreach ($response['events'] as $event) {
        echo $event['e_date'] . ' ' . $event['e_time'] . ' - ' . $event['e_status'];
        if ($event['e_loc']) {
            echo ' (' . $event['e_loc'] . ')';
        }
        echo "\n";
    }
} else {
    echo "Error: " . $response['msg'];
}

Node.js

const trackingNo = '794987330490';
const response = await fetch(
  `https://app.myshipi.com/tracking/tracking_api/tracking_internal.php?no=${trackingNo}`
);
const tracking = await response.json();

if (tracking.status === 'success') {
  console.log(`Carrier: ${tracking.carrier.toUpperCase()}`);
  console.log(`Estimated Delivery: ${tracking.edd}`);

  tracking.events.forEach(event => {
    console.log(`${event.e_date} ${event.e_time} - ${event.e_status} (${event.e_loc})`);
  });

  if (tracking.delivery_setup === 3) {
    console.log(`Delivered on: ${tracking.deliverd_date}`);
  }
} else {
  console.error(`Error: ${tracking.msg}`);
}

Python

import requests

tracking_no = '794987330490'
response = requests.get(
    'https://app.myshipi.com/tracking/tracking_api/tracking_internal.php',
    params={'no': tracking_no}
).json()

if response['status'] == 'success':
    print(f"Carrier: {response['carrier'].upper()}")
    print(f"Estimated Delivery: {response['edd']}")

    for event in response['events']:
        print(f"{event['e_date']} {event['e_time']} - {event['e_status']} ({event['e_loc']})")

    if response['delivery_setup'] == 3:
        print(f"Delivered on: {response['deliverd_date']}")
else:
    print(f"Error: {response['msg']}")

Common Use Cases

1. Custom Tracking Page

Build a branded tracking page on your own website. Let customers enter their tracking number, call this API from your server, and display the results with your own design.

2. Automated Status Notifications

Set up a scheduled job (cron) that polls this endpoint for active shipments and sends email or SMS notifications to customers when the status changes (e.g., “Out for Delivery”, “Delivered”).

3. Delivery Analytics

Use the delivery_setup field and event timestamps to calculate delivery times, on-time rates, and carrier performance for your internal dashboards.

Important Notes

  • This endpoint is public — no authentication required. Only the tracking number is needed.
  • Events are returned in reverse chronological order (most recent first).
  • The tracking number must belong to a shipment created through Shipi.
  • Tracking data is fetched in real-time from the carrier’s API on each request.
  • Shipi also provides a built-in tracking page at https://app.myshipi.com/tracking/?no=YOUR_TRACKING_NUMBER that you can link customers to directly.

Need help? Contact us at support@myshipi.com