API Documentation
Integrate FreightCorner shipping services into your platform with our comprehensive REST API.
π Getting Started
FreightCorner API allows you to programmatically create shipments, get rates, track packages, and manage logistics operations.
Base URL: https://api.freightcorner.com.pk/v1
Authentication
All API requests require authentication using your API key in the Authorization header.
Authorization: Bearer YOUR_API_KEY
Get your API key from your account dashboard.
Create Shipment
Create a new shipment with origin and destination details.
POST /shipments
{
"origin": {
"city": "Karachi",
"country": "Pakistan",
"postalCode": "75000"
},
"destination": {
"city": "Dubai",
"country": "UAE",
"postalCode": "00000"
},
"shipmentType": "parcel",
"weight": 2.5,
"dimensions": {
"length": 30,
"width": 20,
"height": 15
},
"serviceType": "express"
}
Get Shipping Rates
Retrieve available shipping rates and options.
POST /rates
{
"origin": "Karachi",
"destination": "Dubai",
"weight": 2.5,
"dimensions": {
"length": 30,
"width": 20,
"height": 15
}
}
Track Shipment
Get real-time tracking information for a shipment.
GET /shipments/:trackingNumber/track
Returns shipment status, current location, and estimated delivery date.
Error Handling
API errors include status codes and error messages for debugging.
400 Bad Request
Invalid parameters or missing required fields
401 Unauthorized
Invalid or missing API key
404 Not Found
Resource does not exist
500 Server Error
Internal server error
API Frequently Asked Questions
What is the FreightCorner API base URL?
The FreightCorner REST API base URL is https://api.freightcorner.com.pk/v1. Use this host for shipment creation, rate quotes, tracking, and webhook integrations.
How do I authenticate FreightCorner API requests?
All API requests require a Bearer token in the Authorization header: Authorization: Bearer YOUR_API_KEY. Generate the key from your FreightCorner account dashboard after login.
How do I create a shipment with the API?
Send a POST request to /shipments with origin, destination, shipmentType, weight, dimensions, and serviceType. Example: origin Karachi, destination Dubai, weight 2.5 kg, express service.
How do I track a shipment with the API?
Call GET /shipments/:trackingNumber/track. The response includes shipment status, current location, and estimated delivery date.