Logistics Tracking API Documentation

Overview

The Logistics Tracking API allows external systems to create or update a logistics tracking record in the system. Once the tracking record is created, a unique tracking URL is generated which can be shared with customers to track the vehicle movement and trip status in real time.

API Endpoint

Method: POST

Endpoint:

http://sitename/api/method/lnder_logistics.api.logistics_tracking.create_logistics_tracking

This API creates a new logistics tracking record or updates an existing one based on the provided tracking identifier (vwxh_no).


Request Payload Format

{
 "cmd": "lnder_logistics.api.logistics_tracking.create_logistics_tracking",
 "delivery": {
  "address": {
   "address_id": "4091",
   "city": "CHENNAI",
   "country": "India",
   "geofence_radius": "100",
   "latitude": "12.30213",
   "line": "Address info ",
   "longitude": "80.1263",
   "pincode": "600043",
   "state": "Tamil Nadu"
  },
  "party": {
   "name": "Party Name",
   "party_id": "851",
   "phone": "*********"
  },
  "party_type": "Company"
 },
 "pickup": {
  "address": {
   "address_id": "12",
   "city": "TAMBARAM,Chennai",
   "country": "India",
   "geofence_radius": "100",
   "latitude": "12.231312",
   "line": "Address",
   "longitude": "79.1092474",
   "pincode": "600045",
   "state": "Tamil Nadu"
  },
  "party": {
   "name": "customer name",
   "party_id": "12"
  },
  "party_type": "Customer"
 },
 "trip": {
  "expected_end_time": "05-03-2026 05:27:10",
  "expected_start_time": "05-03-2026 02:27:10",
  "status": "In Transit",
  "vehicle": "vehicle_no",
  "vwxh_no": "token"
 }
}

Request Parameters

Pickup Information

Field Description
pickup.party_type Type of party (Customer / Company)
pickup.party.name Name of the pickup party
pickup.party.party_id Unique identifier for pickup party
pickup.address.address_id Unique address identifier
pickup.address.line Pickup address line
pickup.address.latitude Pickup location latitude
pickup.address.longitude Pickup location longitude


Delivery Information

Field Description
delivery.party_type Type of party (Customer / Company)
delivery.party.name Name of the delivery party
delivery.party.party_id Unique identifier for delivery party
delivery.address.address_id Unique address identifier
delivery.address.line Delivery address line
delivery.address.latitude Delivery location latitude
delivery.address.longitude Delivery location longitude


Trip Information

Field Description
vehicle Vehicle registration number
vwxh_no Unique tracking identifier
expected_start_time Expected trip start time
expected_end_time Expected trip end time
status Trip status (Planned / In Transit / Completed)

Response Example

Success Response

{
 "status": "success",
 "tracking_url": "http://domain/track/7c2d9c0e-3c7e-4f21-b2e2-08a11d45a6c3",
 "expires_at": "2026-03-05 10:30:00",
 "message": "Logistics tracking created successfully",
 "is_duplicate": false
}

Error Response

{
 "status": "error",
 "message": "Vehicle does not exist"
}

System Workflow

  1. API receives logistics tracking request.
  2. Request is logged in the system for audit purposes.
  3. Payload data is extracted and flattened.
  4. System validates all required fields.
  5. Vehicle existence is verified.
  6. If tracking already exists:
    • Tracking URL may be renewed.
    • Existing record is updated asynchronously.
  7. If tracking does not exist:
    • A new Logistics Tracking record is created.
    • A unique tracking URL is generated.
    • Customer and address records are created in background.
  8. Tracking URL is returned to the client.

Tracking URL

A unique tracking URL is generated for every logistics tracking record. This URL allows customers to track the vehicle movement and delivery progress.

http://domain/track/{tracking_uuid}

The tracking URL expires based on the configured expiry threshold.

Features

  • Real-time vehicle tracking
  • Customer tracking link
  • Automatic customer creation
  • Automatic address creation
  • Vehicle telemetry integration
  • ETA calculation
  • Tracking history logs

Error Handling

All API requests and responses are logged using the Logistics Tracking API Log for debugging and auditing.

  • Missing required fields validation
  • Vehicle existence validation
  • Exception logging
  • Tracking link expiry validation

Notes

  • The API is designed to handle duplicate requests gracefully.
  • Background jobs are used for heavy operations such as customer and address creation.
  • Tracking URLs are automatically renewed when nearing expiration.
Discard
Save
This page has been updated since your last edit. Your draft may contain outdated content. Load Latest Version

On this page

Review Changes ← Back to Content
Message Status Space Raised By Last update on