This page covers the remaining v1 API endpoints: Carrier Accounts, Account Info, Shipping Statistics, and Tracking URL.
Authentication required for all endpoints except Tracking URL. See the API Overview for authentication details.
Carrier Accounts
List your configured shipping carrier accounts. This shows which carriers you have set up (FedEx, UPS, DHL, etc.) along with the shipper address configured for each account.
Security note: API credentials (passwords, API keys, secrets) are never returned. Only carrier type and shipper address information is exposed.
List All Carriers
GET /api/v1/carriers.php?action=list
Example Request
curl -X GET "https://app.myshipi.com/api/v1/carriers.php?action=list" \
-H "X-Integration-Key: sk_live_abc123"
// JavaScript
const res = await fetch("https://app.myshipi.com/api/v1/carriers.php?action=list", {
headers: { "X-Integration-Key": "sk_live_abc123" }
});
const data = await res.json();
# Python
import requests
response = requests.get("https://app.myshipi.com/api/v1/carriers.php",
params={"action": "list"},
headers={"X-Integration-Key": "sk_live_abc123"}
)
carriers = response.json()
Example Response
{
"status": "success",
"count": 3,
"data": [
{
"id": 15,
"carrier": "fedex",
"is_primary": 1,
"shipper": {
"s_name": "John Smith",
"s_company": "MyShop Inc",
"s_address1": "123 Main Street",
"s_city": "New York",
"s_state": "NY",
"s_postal": "10001",
"s_country": "US",
"s_phone": "555-0100",
"s_email": "john@myshop.com",
"account_number": "1234567890"
},
"status": "active"
},
{
"id": 18,
"carrier": "ups",
"is_primary": 0,
"shipper": {
"s_name": "John Smith",
"s_address1": "123 Main Street",
"s_city": "New York",
"s_state": "NY",
"s_postal": "10001",
"s_country": "US"
},
"status": "active"
},
{
"id": 22,
"carrier": "dhl",
"is_primary": 0,
"shipper": { ... },
"status": "active"
}
]
}
Get Single Carrier
GET /api/v1/carriers.php?action=get&id=15
| Parameter | Type | Required | Description |
|---|---|---|---|
action | string | Yes | Must be get |
id | integer | Yes | Carrier account ID |
Carrier Object Fields
| Field | Type | Description |
|---|---|---|
id | integer | Carrier account ID (use this when creating shipments) |
carrier | string | Carrier code: fedex, ups, dhl, usps, canada_post, purolator, etc. |
is_primary | integer | 1 = default carrier, 0 = additional |
shipper | object | Shipper address configured for this account |
status | string | Account status (active) |
Account Info
Get your Shipi account details including user info, store details, billing balance, subscription plan, and feature flags.
GET /api/v1/account.php
Example Request
curl -X GET "https://app.myshipi.com/api/v1/account.php" \
-H "X-Integration-Key: sk_live_abc123"
// PHP
$ch = curl_init("https://app.myshipi.com/api/v1/account.php?integration_key=sk_live_abc123");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = json_decode(curl_exec($ch), true);
curl_close($ch);
echo "Balance: $" . $result['data']['billing']['balance'];
echo "Plan: " . $result['data']['billing']['plan']['plan_name'];
// JavaScript
const res = await fetch("https://app.myshipi.com/api/v1/account.php", {
headers: { "X-Integration-Key": "sk_live_abc123" }
});
const { data } = await res.json();
console.log(`Balance: $${data.billing.balance}`);
console.log(`Carriers: ${data.counts.shipping_accounts}`);
# Python
import requests
response = requests.get("https://app.myshipi.com/api/v1/account.php",
headers={"X-Integration-Key": "sk_live_abc123"})
data = response.json()["data"]
print(f"Balance: ${data['billing']['balance']}")
print(f"Plan: {data['billing']['plan']['plan_name']}")
Example Response
{
"status": "success",
"data": {
"user": {
"id": 101,
"email": "john@myshop.com",
"name": "John Smith"
},
"store": {
"id": 55,
"website_url": "https://myshop.com",
"site_name": "MyShop",
"created_at": "2024-06-15 09:00:00"
},
"billing": {
"balance": 45.20,
"rates_balance": 8500,
"plan": {
"plan_name": "Growth",
"label_limit": 500,
"rates_limit": 10000
},
"plan_key": "growth_monthly"
},
"features": {
"tracking_enabled": true,
"packing_enabled": false,
"daily_report": true,
"monthly_report": false
},
"counts": {
"shipping_accounts": 3,
"addresses": 12
}
}
}
Response Fields
| Section | Field | Description |
|---|---|---|
user | id, email, name | Account owner details |
store | id, website_url, site_name | Connected store info |
billing.balance | float | Current label balance (USD) |
billing.rates_balance | integer | Remaining rate API calls |
billing.plan | object | Current subscription plan details |
features | booleans | Enabled features (tracking, packing, reports) |
counts | integers | Number of carrier accounts and saved addresses |
Shipping Statistics
Get shipping analytics — total shipments, status breakdown, carrier usage, costs, tracking status, and daily trends.
GET /api/v1/stats.php
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
period | string | No | today, week, month (default), year, all |
date_from | string | No | Custom start date (YYYY-MM-DD) |
date_to | string | No | Custom end date (YYYY-MM-DD) |
Use either period for preset ranges, or date_from + date_to for a custom range.
Example Request
curl -X GET "https://app.myshipi.com/api/v1/stats.php?period=month" \
-H "X-Integration-Key: sk_live_abc123"
// JavaScript — custom date range
const params = new URLSearchParams({
date_from: "2025-01-01",
date_to: "2025-01-31",
integration_key: "sk_live_abc123"
});
const res = await fetch(`https://app.myshipi.com/api/v1/stats.php?${params}`);
const data = await res.json();
# Python
import requests
response = requests.get("https://app.myshipi.com/api/v1/stats.php",
params={"period": "week"},
headers={"X-Integration-Key": "sk_live_abc123"})
stats = response.json()["data"]
print(f"Total shipments: {stats['shipments']['total']}")
print(f"Total cost: ${stats['costs']['total_shipping_cost']}")
print(f"Delivered: {stats['tracking']['delivered']}")
Example Response
{
"status": "success",
"data": {
"period": {
"type": "month",
"from": "2025-02-01 00:00:00",
"to": "2025-02-17 23:59:59"
},
"shipments": {
"total": 156,
"by_status": {
"new": 12,
"created": 98,
"delivered": 40,
"cancelled": 6
},
"by_carrier": {
"fedex": 72,
"ups": 45,
"dhl": 25,
"usps": 14
}
},
"costs": {
"total_shipping_cost": 1847.50,
"average_cost": 11.84
},
"tracking": {
"delivered": 40,
"in_transit": 55,
"failed": 3
},
"daily_trend": [
{ "date": "2025-02-01", "count": 8 },
{ "date": "2025-02-02", "count": 12 },
{ "date": "2025-02-03", "count": 15 },
...
]
}
}
Statistics Response Fields
| Section | Field | Description |
|---|---|---|
shipments.total | integer | Total shipments in the period |
shipments.by_status | object | Count per status (new, created, delivered, cancelled) |
shipments.by_carrier | object | Count per carrier (fedex, ups, dhl, etc.) |
costs.total_shipping_cost | float | Total shipping cost for the period |
costs.average_cost | float | Average cost per shipment |
tracking.delivered | integer | Packages delivered |
tracking.in_transit | integer | Packages currently in transit |
tracking.failed | integer | Failed deliveries |
daily_trend | array | Day-by-day shipment counts (great for charts) |
Tracking URL
Generate a carrier tracking URL from a tracking number. This is a public endpoint — no authentication required.
GET /api/v1/tracking_url.php
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
tracking_number | string | Yes | The tracking number |
carrier | string | No | Carrier code. If omitted, auto-detects from tracking number format. |
Supported Carriers
fedex, ups, usps, dhl, dhl_express, purolator, canada_post, canpar, aramex, bluedart, delhivery, dtdc, ecom_express, australia_post
Example Request
curl "https://app.myshipi.com/api/v1/tracking_url.php?tracking_number=794987330490&carrier=fedex"
// JavaScript — no auth needed!
const res = await fetch(
"https://app.myshipi.com/api/v1/tracking_url.php?tracking_number=1Z999AA10123456784"
);
const data = await res.json();
console.log(data.tracking_url);
// → "https://www.ups.com/track?tracknum=1Z999AA10123456784"
# Python — auto-detects UPS from "1Z" prefix
import requests
response = requests.get("https://app.myshipi.com/api/v1/tracking_url.php", params={
"tracking_number": "1Z999AA10123456784"
})
print(response.json()["tracking_url"])
Example Response
{
"status": "success",
"tracking_number": "794987330490",
"carrier": "fedex",
"tracking_url": "https://www.fedex.com/fedextrack/?trknbr=794987330490",
"shipi_tracking": "https://app.shipi.xyz/tracking?num=794987330490"
}
Auto-Detection
If you don’t specify a carrier, the API tries to detect it from the tracking number format:
| Pattern | Detected Carrier |
|---|---|
Starts with 1Z | UPS |
| 12, 15, 20, or 22 digits | FedEx |
| Starts with 94, 93, 92, 91, 95 | USPS |
| 10 digits | DHL |
| 16 digits | Canada Post |
The shipi_tracking URL always works as a universal fallback — it opens the Shipi tracking page which supports all carriers.