Skip to main content

Get Live Status API

This API endpoint retrieves the live status of bookings, optimized for the Master Dashboard. It provides a comprehensive overview of booking details, pickup/delivery addresses, truck requirements, goods descriptions, and live tracking information.

Endpoint​

GET /getLiveStatus/{officeBranch}/{userName}/{authKey}

Path Parameters​

ParameterTypeDescription
officeBranchStringThe office branch code or identifier.
userNameStringThe username of the authenticated user making the request.
authKeyStringThe authentication key for the user, used for validation.

Headers (Optional Filters)​

This API supports optional header parameters to filter the results.

HeaderTypeDescription
customerIdStringComma-separated list of Customer IDs to filter the bookings by specific customers.
userIdStringComma-separated list of User IDs (booked by) to filter the bookings created by specific users.

Request​

Method: GET Content-Type: N/A

No request body is required.

Response​

Content-Type: text/plain (returns a JSON string)

The response is a JSON object containing two main properties: data (the list of bookings) and statusCounts (an aggregation of booking statuses).

Response Schema​

{
"data": [
{
"bookingID": "string",
"bookedDate": "string",
"custRefNumber": "string",
"customer": "string",
"customerId": "string",
"status": "string",
"requestorPhone": "string",
"pickup": "string",
"delivery": "string",
"dropPoints": "string",
"doNumbers": "string",
"coNumber": "string",
"goodsDescriptionText": "string",
"pikcupTime": "string",
"deliveryTime": "string",
"tonnage": "string",
"equipments": "string",
"manpower": "string",
"truck": "string",
"driver": "string",
"vendor": "string",
"agreedPrice": "string",
"tripID": "string",
"gpsTrackingUrl": "string",
"userId": "string",
"deliveryAddress": [ ... ],
"pickupAddress": [ ... ],
"invoiceNumber": "string",
"invoiceStatus": "string",
"invoiceDate": "string",
"invoiceAmount": 0.0
}
],
"statusCounts": {
"Booked": 5,
"Assigned": 2,
"Delivery in progress": 10
}
}

Key Response Fields​

data Array Items​

FieldTypeDescription
bookingIDStringThe unique identifier for the booking.
bookedDateStringThe date the booking was created.
custRefNumberStringThe customer's reference number.
customerStringThe name of the customer.
customerIdStringThe ID of the customer.
statusStringThe current status of the booking (e.g., "Booked", "Assigned", "delivery closed").
pickupStringComma-separated list of pickup cities.
deliveryStringThe first delivery city.
dropPointsStringComma-separated list of all delivery cities.
doNumbersStringComma-separated list of Delivery Order (DO) numbers/Ship Reference Numbers associated with the goods.
coNumberStringComma-separated list of Container/CO numbers associated with the goods.
goodsDescriptionTextStringComma-separated list of goods descriptions.
gpsTrackingUrlStringThe URL for live GPS tracking of the assigned driver.
userIdStringThe name of the employee who created the booking.

statusCounts Object​

A key-value map where the key is the status string (e.g., "Booked", "Assigned") and the value is the integer count of bookings currently in that status based on the retrieved data set.

Errors​

Status CodeDescription
401 UnauthorizedReturned if the userName and authKey combination is invalid or missing.

Notes​

  • The API uses GROUP_CONCAT extensively in the underlying SQL to aggregate child entities (like multiple pickup/delivery points, goods descriptions, and truck requirements) into single, comma-separated strings for optimized performance.
  • The coNumber field was recently added to complement the existing doNumbers functionality.
  • The optional customerId and userId headers allow for dynamic filtering of the dashboard results based on the logged-in user's context or selected filters in the UI.