Client API Documentation
Complete integration guide for the AL Services Logistics Management System. Create orders, track shipments, and manage deliveries for high-value cargo.
v2.0 — Updated April 2026Overview
All endpoints are RESTful and return JSON responses. Use the base URL below for all requests.
Base URL
https://delivery.alfast.in/api/v1/client
Content Type
Use application/json for request bodies. Use multipart/form-data for file uploads.
Authentication
All API requests (except login/OTP) require a Bearer token in the Authorization header.
Authorization: Bearer {your_access_token}
Content-Type: application/json
How to get an access token
- Login — Use mobile number and password
- OTP Verification — Use mobile number and OTP code
{
"flag": "Y",
"access_token": "265be79e-8f15-4c37-acf6-df6e42681bf6",
"profile_name": "John Doe",
"id": 1,
"email": "john@example.com",
"fc_id": 1,
"status": 1,
"profile_picture_url": "https://example.com/profile.jpg"
}
Location APIs
Returns all available states for address selection.
{
"data": [
{ "id": 1, "name": "Maharashtra", "type": "state" },
{ "id": 2, "name": "Gujarat", "type": "state" }
]
}
Returns all cities for a given state.
| Parameter | Type | Required | Description |
|---|---|---|---|
| state_id | integer | Required | ID of the state |
{
"data": [
{ "id": 1, "name": "Mumbai", "type": "city", "parent_id": 1 }
]
}
Order Management
APIs for creating, tracking, and managing delivery orders.
Create a new delivery order. Provide either hub IDs or full address details for pickup, delivery, and return locations. The system will automatically detect the order type based on pickup and delivery locations.
| Parameter | Type | Required | Description |
|---|---|---|---|
| pickup_hub_id | integer | Optional | Hub ID for pickup (use this OR address fields) |
| pickup_address | string | Required* | Full pickup address (required if no hub_id) |
| pickup_pincode | string | Required* | Pickup area pincode |
| pickup_lat | numeric | Optional | Pickup latitude coordinate |
| pickup_lng | numeric | Optional | Pickup longitude coordinate |
| Parameter | Type | Required | Description |
|---|---|---|---|
| delivery_hub_id | integer | Optional | Hub ID for delivery (use this OR address fields) |
| delivery_address | string | Required* | Full delivery address |
| delivery_pincode | string | Required* | Delivery area pincode |
| delivery_lat | numeric | Optional | Delivery latitude |
| delivery_lng | numeric | Optional | Delivery longitude |
| Parameter | Type | Required | Description |
|---|---|---|---|
| return_hub_id | integer | Optional | Hub ID for return |
| return_address | string | Optional | Return address |
| return_pincode | string | Optional | Return pincode |
| return_lat | numeric | Optional | Return latitude |
| return_lng | numeric | Optional | Return longitude |
| Parameter | Type | Required | Description |
|---|---|---|---|
| region | integer | Required | Region ID |
| product_name | string | Required | Name of the product |
| product_value | numeric | Required | Product value in INR |
| product_payment_type | integer | Required | 1 = Prepaid, 2 = COD |
| cod_value | numeric | Optional | COD amount to collect (for COD orders) |
| customer_order_no | string | Optional | Your internal order reference number |
| contact_person | string | Required | Receiver's name |
| contact_number | string | Required | Receiver's phone number |
| length | numeric | Required | Package length (cm) |
| width | numeric | Required | Package width (cm) |
| height | numeric | Required | Package height (cm) |
| weight | numeric | Required | Package weight (kg) |
| note | string | Optional | Special instructions |
| insured | boolean | Optional | Whether shipment is insured |
| agreed | boolean | Optional | Terms and conditions agreement |
| certificate_no | string | Optional | Product certificate number |
| order_journey_type | integer | Optional | Order journey type |
| product_image | file | Optional | Product image (use multipart/form-data) |
{
"pickup_hub_id": 1,
"delivery_address": "456 Delivery Street, Pune",
"delivery_pincode": "411001",
"delivery_lat": 18.5204,
"delivery_lng": 73.8567,
"return_hub_id": 1,
"region": 1,
"product_name": "Gold Necklace Set",
"customer_order_no": "ORD-2026-001",
"product_value": 50000.00,
"product_payment_type": 2,
"cod_value": 50000.00,
"contact_person": "Priya Sharma",
"contact_number": "9876543210",
"length": 15,
"width": 10,
"height": 5,
"weight": 0.5,
"insured": true,
"agreed": true
}
{
"message": "Order created successfully.",
"order_no": 10245,
"label": "https://delivery.alfast.in/shipping-label/10245?signature=..."
}
Returns detailed information about a specific order including status, addresses, and product details.
| Parameter | Type | Required | Description |
|---|---|---|---|
| order_id | integer | Required | The order ID |
Returns real-time tracking information and status history for an order.
| Parameter | Type | Required | Description |
|---|---|---|---|
| order_id | integer | Required | The order ID |
Returns current status along with associated media (images, signatures) for an order.
Returns proof of delivery data including receiver signature, delivery photo, and timestamp.
Returns a downloadable PDF of the proof of delivery document.
Cancel an existing order. Only works for orders not yet picked up.
| Parameter | Type | Required | Description |
|---|---|---|---|
| order_id | integer | Required | Order ID to cancel |
| cancellation_reason | string | Required | Reason for cancellation |
{
"order_id": 10245,
"cancellation_reason": "Customer changed their mind"
}
Status Values
Reference tables for status codes and payment types used across the API.
Payment Types
| Code | Description |
|---|---|
| 1 | Prepaid |
| 2 | COD (Cash on Delivery) |
Order Status Codes
| Code | Status |
|---|---|
| 1 | Created |
| 2 | Assigned |
| 3 | Pickup Pending |
| 4 | In Transit |
| 5 | Out for Delivery |
| 6 | Delivered |
| 7 | Cancelled |
| 8 | Returned |
| 9 | Delivered (Final) |
| 10 | Cancelled and Returned |
| 11 | Attempted and Returned |
Error Handling
All errors return a JSON response with a descriptive message.
400 - Bad Request
{
"message": "The given data was invalid.",
"errors": {
"field_name": ["The field_name is required."]
}
}
401 - Unauthorized
{
"message": "Unauthenticated."
}
422 - Validation Error
{
"message": "Validation failed",
"errors": {
"field": ["Specific validation message"]
}
}
500 - Internal Server Error
{
"message": "An error occurred. Please try again later."
}