AL Services

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 2026

Overview

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.

Request 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
Authentication Response Format
{
    "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

GET /states Get States

Returns all available states for address selection.

Response
{
    "data": [
        { "id": 1, "name": "Maharashtra", "type": "state" },
        { "id": 2, "name": "Gujarat", "type": "state" }
    ]
}
GET /cities?state_id={id} Get Cities

Returns all cities for a given state.

Query Parameters
ParameterTypeRequiredDescription
state_idintegerRequiredID of the state
Response
{
    "data": [
        { "id": 1, "name": "Mumbai", "type": "city", "parent_id": 1 }
    ]
}

Order Management

APIs for creating, tracking, and managing delivery orders.

POST /create-order Create Order

Create a new delivery order. Provide either hub IDs or full address details for pickup, delivery, and return locations. This single API works for both Local and Domestic orders — the system will automatically detect the order type based on pickup and delivery locations.

Pickup Location
ParameterTypeRequiredDescription
pickup_hub_idintegerOptionalHub ID for pickup (use this OR address fields)
pickup_addressstringRequired*Full pickup address (required if no hub_id)
pickup_pincodestringRequired*Pickup area pincode
pickup_latnumericOptionalPickup latitude coordinate
pickup_lngnumericOptionalPickup longitude coordinate
Delivery Location
ParameterTypeRequiredDescription
delivery_hub_idintegerOptionalHub ID for delivery (use this OR address fields)
delivery_addressstringRequired*Full delivery address
delivery_pincodestringRequired*Delivery area pincode
delivery_latnumericOptionalDelivery latitude
delivery_lngnumericOptionalDelivery longitude
Return Location
ParameterTypeRequiredDescription
return_hub_idintegerOptionalHub ID for return
return_addressstringOptionalReturn address
return_pincodestringOptionalReturn pincode
return_latnumericOptionalReturn latitude
return_lngnumericOptionalReturn longitude
Product & Delivery Details
ParameterTypeRequiredDescription
regionintegerRequiredRegion ID
product_namestringRequiredName of the product
product_valuenumericRequiredProduct value in INR
product_payment_typeintegerRequired1 = Prepaid, 2 = COD
cod_valuenumericOptionalCOD amount to collect (for COD orders)
customer_order_nostringOptionalYour internal order reference number
contact_personstringRequiredReceiver's name
contact_numberstringRequiredReceiver's phone number
lengthnumericRequiredPackage length (cm)
widthnumericRequiredPackage width (cm)
heightnumericRequiredPackage height (cm)
weightnumericRequiredPackage weight (kg)
notestringOptionalSpecial instructions
insuredbooleanOptionalWhether shipment is insured
agreedbooleanOptionalTerms and conditions agreement
certificate_nostringOptionalProduct certificate number
order_journey_typeintegerOptionalOrder journey type
product_imagefileOptionalProduct image (use multipart/form-data)
Request Example
{
    "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
}
Response
{
    "message": "Order created successfully.",
    "order_no": 10245,
    "label": "https://delivery.alfast.in/shipping-label/10245?signature=..."
}
200 OK 400 Bad Request 401 Unauthorized 422 Validation Error
GET /order-details?order_id={id} Order Details

Returns detailed information about a specific order including status, addresses, and product details.

Query Parameters
ParameterTypeRequiredDescription
order_idintegerRequiredThe order ID
200 OK 401 Unauthorized
GET /order-tracking?order_id={id} Order Tracking

Returns real-time tracking information and status history for an order.

Query Parameters
ParameterTypeRequiredDescription
order_idintegerRequiredThe order ID
200 OK 401 Unauthorized
GET /status-details Status Details

Returns current status along with associated media (images, signatures) for an order.

200 OK 401 Unauthorized
GET /order-pod Proof of Delivery

Returns proof of delivery data including receiver signature, delivery photo, and timestamp.

200 OK 401 Unauthorized
GET /order-podpdf POD PDF Download

Returns a downloadable PDF of the proof of delivery document.

200 OK 401 Unauthorized
POST /cancel_order Cancel Order

Cancel an existing order. Only works for orders not yet picked up.

Request Body
ParameterTypeRequiredDescription
order_idintegerRequiredOrder ID to cancel
cancellation_reasonstringRequiredReason for cancellation
Request Example
{
    "order_id": 10245,
    "cancellation_reason": "Customer changed their mind"
}
200 OK 400 Bad Request 401 Unauthorized

Status Values

Reference tables for status codes and payment types used across the API.

Payment Types

CodeDescription
1Prepaid
2COD (Cash on Delivery)

Order Status Codes

CodeStatus
1Created
2Assigned
3Pickup Pending
4In Transit
5Out for Delivery
6Delivered
7Cancelled
8Returned
9Delivered (Final)
10Cancelled and Returned
11Attempted 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."
}