Shipi Resources
Shipi Resources
Shipi Resources
Home / Knowledgebase / API Documentation: Shipi Management

API Documentation: Shipi Management

This page covers the remaining v1 API endpoints: Carrier AccountsAccount InfoShipping 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
ParameterTypeRequiredDescription
actionstringYesMust be get
idintegerYesCarrier account ID

Carrier Object Fields

FieldTypeDescription
idintegerCarrier account ID (use this when creating shipments)
carrierstringCarrier code: fedexupsdhluspscanada_postpurolator, etc.
is_primaryinteger1 = default carrier, 0 = additional
shipperobjectShipper address configured for this account
statusstringAccount 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

SectionFieldDescription
useridemailnameAccount owner details
storeidwebsite_urlsite_nameConnected store info
billing.balancefloatCurrent label balance (USD)
billing.rates_balanceintegerRemaining rate API calls
billing.planobjectCurrent subscription plan details
featuresbooleansEnabled features (tracking, packing, reports)
countsintegersNumber 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

ParameterTypeRequiredDescription
periodstringNotodayweekmonth (default), yearall
date_fromstringNoCustom start date (YYYY-MM-DD)
date_tostringNoCustom 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

SectionFieldDescription
shipments.totalintegerTotal shipments in the period
shipments.by_statusobjectCount per status (new, created, delivered, cancelled)
shipments.by_carrierobjectCount per carrier (fedex, ups, dhl, etc.)
costs.total_shipping_costfloatTotal shipping cost for the period
costs.average_costfloatAverage cost per shipment
tracking.deliveredintegerPackages delivered
tracking.in_transitintegerPackages currently in transit
tracking.failedintegerFailed deliveries
daily_trendarrayDay-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

ParameterTypeRequiredDescription
tracking_numberstringYesThe tracking number
carrierstringNoCarrier code. If omitted, auto-detects from tracking number format.

Supported Carriers

fedexupsuspsdhldhl_expresspurolatorcanada_postcanpararamexbluedartdelhiverydtdcecom_expressaustralia_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:

PatternDetected Carrier
Starts with 1ZUPS
12, 15, 20, or 22 digitsFedEx
Starts with 94, 93, 92, 91, 95USPS
10 digitsDHL
16 digitsCanada Post

The shipi_tracking URL always works as a universal fallback — it opens the Shipi tracking page which supports all carriers.

Last updated: February 17, 2026
Was this helpful?