DEVELOPER

Developer Center

Everything you need to integrate with our platform — REST, GraphQL, and MCP.

REST /api/v1/orders JSON
GQL query { orders { id } } GraphQL
MCP track_package(number) Tool
Developer Center

REST API Documentation

Explore, test, and integrate with our RESTful endpoints. Full Swagger UI with interactive request builder and authentication support.

GraphQL API Documentation

Query exactly the data you need with our GraphQL API. Interactive playground with schema explorer and operation testing.

MCP Server Guide

Connect your AI assistant to the platform using the Model Context Protocol. Setup guides for Claude, Cursor, and more.

Getting Started

1
Get Your API Token

Log in and go to Settings → API Keys to generate your personal access token.

2
Choose Your API

Use REST for standard CRUD operations, GraphQL for flexible data queries, or MCP to connect AI assistants directly to your logistics data.

3
Start Building

Open the interactive docs to test endpoints in your browser, then copy the code snippets into your application.

Authentication

All three APIs use the same Bearer token (obtained via the login endpoint). Some endpoints are public and require no authentication — including login, public tracking, and driver self-registration.

Obtain a token via the login endpoint:

# POST /api/v1/user/login
{ "email": "you@example.com", "password": "••••••••" }

Request Header

Authorization: Bearer YOUR_ACCESS_TOKEN
REST Required for most endpoints. Login, public tracking, and driver self-registration are public (no token needed).
GQL Required for authenticated operations. Public operations (login, tracking) work without a token.
MCP Optional. Public tools work without a token; a valid token unlocks personalized data access.
Base URLs

 

  • REST API https://api.miliexpress.com/api
  • GraphQL https://api.miliexpress.com/api/graphql
  • MCP https://api.miliexpress.com/mcp

Which API Should I Use?

REST API

Standard CRUD operations, webhooks, order/route management

GraphQL

Flexible data fetching, custom reports, nested queries

MCP

AI assistant integration (Claude, Cursor, Copilot, etc.)

AI Integration

Give your AI assistant logistics superpowers. Connect via MCP for zero-code setup, call our API directly from your AI agent, or download the skill file for complete semantic guidance.

Available Capabilities
Public Tracking

Look up any package's delivery status, event timeline, and proof of delivery (signature/photo) by tracking number.

PUBLIC
Operation Events

Get the full audit trail for orders — who changed what status, when, where, with GPS coordinates and attached photos.

AUTH REQUIRED
Label Service

Get shipping quotes from carriers, create shipping labels, download label PDFs, cancel shipments, and submit end-of-day manifests.

AUTH REQUIRED
Local Delivery

Create delivery/pickup orders, build optimized multi-driver routes, and manage the full last-mile delivery workflow.

AUTH REQUIRED
END USER User MCP Server

For AI assistants used by your customers. Paste the config and your AI can track packages instantly — no coding required.

ENDPOINT
https://api.miliexpress.com/mcp
Available Tools (11 tools)
track_package Track package by tracking number PUBLIC
create_order Create delivery/pickup order AUTH
get_orders List orders with filters AUTH
get_order_detail Get order details by ID AUTH
cancel_order Cancel an order AUTH
get_routes List delivery routes AUTH
get_operation_events Order audit trail AUTH
get_shipping_methods List carriers AUTH
get_shipping_rate Get shipping quote AUTH
create_shipping_label Create shipping label AUTH
search_address Address search/resolve AUTH
// .mcp.json — No authentication required { "mcpServers": { "superroute": { "type": "url", "url": "https://api.miliexpress.com/mcp" } } }
DEVELOPER Developer MCP Server

For AI coding assistants (Claude Code, Cursor, etc.) that help you build Superroute integrations. Your AI can directly call APIs, test endpoints, and generate integration code.

ENDPOINT
https://api.miliexpress.com/mcp/developer
Available Tools
track_package Track package by tracking number PUBLIC
get_operation_events Get order audit trail AUTH
get_shipping_methods List available carriers AUTH
get_shipping_rate Get shipping rate quote AUTH
create_shipping_label Create shipping label AUTH
get_shipping_label Get label details & download info AUTH
create_order Create delivery/pickup order AUTH
get_integration_guide Get integration guide PUBLIC
// .mcp.json — No authentication required { "mcpServers": { "superroute-dev": { "type": "url", "url": "https://api.miliexpress.com/mcp/developer" } } }

No auth needed to connect. Tools that call APIs will ask for a token at runtime and recommend storing it in .env.

Two separate MCP servers for different audiences. The User server is lightweight for end users; the Developer server provides the full API surface for building integrations. You can connect both simultaneously.
AI Tool Discovery Endpoints

Structured capability descriptions for AI agents, LLM tool-calling systems, and MCP clients. All endpoints are public, no authentication required.

PRIMARY AI Tools Manifest

Complete manifest with tool definitions, schemas, auth info, and workflows.

GET https://api.miliexpress.com/api/.well-known/ai-tools.json
Also available: /llms.txt
FORMAT Multi-Format Export

Get tool definitions in the format native to your AI platform.

# OpenAI function calling GET https://api.miliexpress.com/api/ai/tools?format=openai # Anthropic Claude tool_use GET https://api.miliexpress.com/api/ai/tools?format=anthropic # MCP tools/list GET https://api.miliexpress.com/api/ai/tools?format=mcp # LangChain StructuredTool GET https://api.miliexpress.com/api/ai/tools?format=langchain
REST OpenAPI + AI Extensions

OpenAPI spec enriched with x-ai-* extensions (tool names, when to use, categories).

GET https://api.miliexpress.com/api/ai/tools/openapi
GQL GraphQL + AI Hints

GraphQL docs enriched with aiHints per operation (when to use, related workflows).

GET https://api.miliexpress.com/api/ai/tools/graphql
Quick Integration
Python (OpenAI SDK)
import requests, json tools = requests.get( "https://api.miliexpress.com/api/ai/tools?format=openai" ).json()["tools"] # Pass to OpenAI response = client.chat.completions.create( model="gpt-4", messages=messages, tools=tools )
Python (Claude SDK)
import requests, anthropic tools = requests.get( "https://api.miliexpress.com/api/ai/tools?format=anthropic" ).json()["tools"] # Pass to Claude response = client.messages.create( model="claude-sonnet-4-20250514", messages=messages, tools=tools )
Node.js (fetch)
const res = await fetch( "https://api.miliexpress.com/api/ai/tools?format=openai" ); const { tools } = await res.json(); // Use with any LLM SDK console.log(`Loaded ${tools.length} tools`);
Capabilities summary: For a lightweight overview (just categories and tool names), use GET https://api.miliexpress.com/api/ai/capabilities
AI Tools Playground

Test Superroute AI tools directly in your browser. Select a tool, fill in the parameters, and see the live API response.

Select Tool
track_package
Response
Click "Run" to execute the tool...
Build with REST or GraphQL

For developers building custom AI agents, chatbots, or programmatic integrations. Call our API directly from your code with full access to all logistics capabilities.

REST REST API Endpoints
# Track package (public) GET https://api.miliexpress.com/api/v1/tracking/{number} # Operation events POST https://api.miliexpress.com/api/v1/tracking/operationevents # Get shipping rate POST https://api.miliexpress.com/api/v1/labelservice/rate # Create shipping label POST https://api.miliexpress.com/api/v1/labelservice/submitOrder # Create delivery order POST https://api.miliexpress.com/api/v1/client/orderCreate # Build optimized route POST https://api.miliexpress.com/api/v1/client/build-route
Full documentation
GQL GraphQL Operations
# Single endpoint POST https://api.miliexpress.com/api/graphql # Available operations trackingPublic ← Track package (public) trackingOperationevents ← Operation events labelserviceRate ← Get shipping rate labelserviceSubmitOrder ← Create shipping label clientOrderCreate ← Create delivery order clientBuildRoute ← Build optimized route
Full documentation
We recommend REST API for most AI integrations — it's simpler to debug and each endpoint is self-contained. Use GraphQL when you need flexible queries or want to fetch nested data in a single request.
Superroute AI Integration Skill

A comprehensive skill file with deep logistics domain knowledge — what each API does, when to use it, what parameters mean in real business context, how to interpret results, and how capabilities compose together.

Download Skill File (.md)
How to Use the Skill File
Claude Code
  • 1 Download the file above
  • 2 Place it in your project's .claude/skills/ directory
  • 3 Type /integrate in Claude Code to start the interactive wizard
mkdir -p .claude/skills cp superroute-ai-integration.md .claude/skills/
Cursor
  • 1 Download the file above
  • 2 Place it in your project's .cursor/rules/ directory
  • 3 Cursor will automatically use it as context when you ask about Superroute integration
mkdir -p .cursor/rules cp superroute-ai-integration.md .cursor/rules/
Other AI Tools
  • 1 Download the file above
  • 2 Paste the content into your AI tool's system prompt or knowledge base
  • 3 The AI will use the semantic descriptions to guide integration
# Or paste into system prompt cat superroute-ai-integration.md
The skill file goes beyond API documentation — it teaches your AI assistant the business meaning of each parameter, how to interpret responses, and how to combine capabilities for complex logistics workflows.

Code Examples

REST REST API — Track Package
Track a package (no token required)
curl https://api.miliexpress.com/api/v1/tracking/SR123456
Track a package (no token required)
<?php $res = (new \GuzzleHttp\Client())->get('https://api.miliexpress.com/api/v1/tracking/SR123456'); print_r(json_decode($res->getBody(), true));
Track a package (no token required)
import requests res = requests.get('https://api.miliexpress.com/api/v1/tracking/SR123456') print(res.json())
Track a package (no token required)
resp, _ := http.Get("https://api.miliexpress.com/api/v1/tracking/SR123456") var result map[string]interface{} json.NewDecoder(resp.Body).Decode(&result)
Track a package (no token required)
const res = await fetch('https://api.miliexpress.com/api/v1/tracking/SR123456'); const data = await res.json();
Track a package (no token required)
HttpClient client = HttpClient.newHttpClient(); HttpRequest req = HttpRequest.newBuilder() .uri(URI.create("https://api.miliexpress.com/api/v1/tracking/SR123456")) .build(); HttpResponse<String> res = client.send(req, HttpResponse.BodyHandlers.ofString()); System.out.println(res.body());
Track a package (no token required)
require 'net/http' puts Net::HTTP.get(URI('https://api.miliexpress.com/api/v1/tracking/SR123456'))
GQL GraphQL — Query Orders
Query orders
curl -X POST https://api.miliexpress.com/api/graphql \ -H "Content-Type: application/json" \ -d '{"query":"query { trackingPublic(trackingNumber: \"SR123456\") { trackingNumber status events { timestamp description } } }"}'
Query orders
$query = 'query { trackingPublic(trackingNumber: "SR123456") { trackingNumber status } }'; $res = (new \GuzzleHttp\Client())->post('https://api.miliexpress.com/api/graphql', [ 'json' => ['query' => $query, 'variables' => []], ]); print_r(json_decode($res->getBody(), true));
Query orders
import requests query = 'query { trackingPublic(trackingNumber: "SR123456") { trackingNumber status } }' res = requests.post('https://api.miliexpress.com/api/graphql', json={'query': query, 'variables': {}}) print(res.json())
Query orders
payload, _ := json.Marshal(map[string]interface{}{ "query": `query { trackingPublic(trackingNumber: "SR123456") { trackingNumber status } }`, "variables": map[string]interface{}{}, }) req, _ := http.NewRequest("POST", "https://api.miliexpress.com/api/graphql", bytes.NewBuffer(payload)) req.Header.Set("Content-Type", "application/json") resp, _ := http.DefaultClient.Do(req)
Query orders
const res = await fetch('https://api.miliexpress.com/api/graphql', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ query: `query { trackingPublic(trackingNumber: "SR123456") { trackingNumber status } }` }), }); const data = await res.json();
Query orders
String body = "{\"query\":\"query { trackingPublic(trackingNumber: \\\"SR123456\\\") { trackingNumber status } }\"}"; HttpRequest req = HttpRequest.newBuilder() .uri(URI.create("https://api.miliexpress.com/api/graphql")) .header("Content-Type", "application/json") .POST(HttpRequest.BodyPublishers.ofString(body)).build(); HttpResponse<String> res = HttpClient.newHttpClient().send(req, HttpResponse.BodyHandlers.ofString());
Query orders
require 'net/http'; require 'json' uri = URI('https://api.miliexpress.com/api/graphql') req = Net::HTTP::Post.new(uri, 'Content-Type' => 'application/json') req.body = JSON.dump({ query: 'query { trackingPublic(trackingNumber: "SR123456") { trackingNumber status } }' }) puts Net::HTTP.start(uri.hostname, uri.port) { |h| h.request(req) }.body
MCP MCP — Track a Package
2. Track a package (no token required)
curl -X POST https://api.miliexpress.com/mcp \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"track_package","arguments":{"tracking_number":"SR123456"}}}'
2. Track a package (no token required)
$payload = [ 'jsonrpc' => '2.0', 'id' => 1, 'method' => 'tools/call', 'params' => ['name' => 'track_package', 'arguments' => ['tracking_number' => 'SR123456']], ]; $res = (new \GuzzleHttp\Client())->post('https://api.miliexpress.com/mcp', ['json' => $payload]); print_r(json_decode($res->getBody(), true));
2. Track a package (no token required)
import requests payload = { 'jsonrpc': '2.0', 'id': 1, 'method': 'tools/call', 'params': {'name': 'track_package', 'arguments': {'tracking_number': 'SR123456'}}, } res = requests.post('https://api.miliexpress.com/mcp', json=payload) print(res.json())
2. Track a package (no token required)
payload, _ := json.Marshal(map[string]interface{}{ "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": map[string]interface{}{ "name": "track_package", "arguments": map[string]interface{}{"tracking_number": "SR123456"}, }, }) req, _ := http.NewRequest("POST", "https://api.miliexpress.com/mcp", bytes.NewBuffer(payload)) req.Header.Set("Content-Type", "application/json") resp, _ := http.DefaultClient.Do(req)
2. Track a package (no token required)
const res = await fetch('https://api.miliexpress.com/mcp', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ jsonrpc: '2.0', id: 1, method: 'tools/call', params: { name: 'track_package', arguments: { tracking_number: 'SR123456' } }, }), }); const data = await res.json();
2. Track a package (no token required)
String body = "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tools/call\",\"params\":{\"name\":\"track_package\",\"arguments\":{\"tracking_number\":\"SR123456\"}}}"; HttpRequest req = HttpRequest.newBuilder() .uri(URI.create("https://api.miliexpress.com/mcp")) .header("Content-Type", "application/json") .POST(HttpRequest.BodyPublishers.ofString(body)).build(); HttpResponse<String> res = HttpClient.newHttpClient().send(req, HttpResponse.BodyHandlers.ofString());
2. Track a package (no token required)
require 'net/http'; require 'json' uri = URI('https://api.miliexpress.com/mcp') req = Net::HTTP::Post.new(uri, 'Content-Type' => 'application/json') req.body = JSON.dump({ jsonrpc: '2.0', id: 1, method: 'tools/call', params: { name: 'track_package', arguments: { tracking_number: 'SR123456' } } }) puts Net::HTTP.start(uri.hostname, uri.port) { |h| h.request(req) }.body