Skip to main content

Dispatch Tracker (Developer Guide)

Web-based system for real-time QR-based transfer delivery tracking.

Overview

Dispatch Tracker is a centralized web application that enables real-time monitoring and status tracking of transfer delivery (TD) receipts through QR code scanning and manual entry. The system provides guard teams with a single interface to start delivery runs, update delivery outcomes as they happen, and maintain an accurate, up-to-date record of every store’s delivery status.

The system eliminates the need for manual status reporting, reduces the risk of missing or unrecorded deliveries, and ensures that all transfer outcomes — including failed attempts and cancellations — are properly documented with reasons and timestamps.

Target Users

Guard Teams

 

Problem Solved

·      There was previously no system to track whether a transfer delivery was successfully received, failed, or cancelled — outcomes were entirely unrecorded after dispatch.

·      IMD and Audit had no way to verify the result of a delivery. There was no official record of which TDs were completed, rejected, or never attempted.

·      There was no visibility into how long a transfer took from dispatch to store receipt, making it impossible to assess delivery performance or identify delays.

·      The system resolves these issues by recording every delivery outcome — with status, reason, timestamp, and responsible user — giving IMD, Audit, and the promo team a clear, auditable trail from dispatch to final store receipt.

Main Features

Category

Features

Dispatch Management

Start a delivery run by scanning a checklist QR code or entering the checklist ID manually.

Select which stores to include or skip before confirming a delivery run.

View all active delivery checklists and their real-time progress at a glance.

Search checklists by ID to quickly locate a specific run.

Status Tracking

Mark individual Transfer Documents (TDs) as Out for Delivery, Delivered, Failed, or Cancelled.

Record a reason when marking a TD as failed.

Re-attempt failed deliveries without creating a new dispatch record.

View the full attempt history for each TD including timestamps and responsible user.

Real-Time Monitoring

Live status summary per checklist: out for delivery, partial, delivered, failed, cancelled.

Store-level aggregate status derived automatically from individual TD statuses.

Instant UI updates on status changes — no page refresh required.

Visual indicators highlight checklists that are fully completed (green background).

QR Scanning

Scan printed checklist QR codes using the device camera.

Automatic QR detection with a framed viewfinder and scan-line animation.

Manual checklist ID entry as a fallback when a camera is unavailable.

QR codes are single-use: already-dispatched checklists are rejected with a clear error.

System Architecture

Frontend: React.js
Backend: Node.js + NestJS

Real-Time Communication: Socket.io
Queue System: BullMQ
Cache / Messaging: Redis
Database: Microsoft SQL Server
Authentication: JWT-based authentication
Printing Integration: Custom Printer Server

The system uses a client–server architecture with asynchronous job processing for printing operations.

Installation & Setup

Requirements

·         Node.js v18+

·         Visual Studio Code

·         MSSQL Database

·         Redis Server

Install Dependencies

Frontend and backend must be installed separately.

npm install

 Environment Variables

Frontend

VITE_FRONTEND_URL=https://localhost:5173
VITE_ENV=development

Backend

Server

PORT=3000
NODE_ENV=development

MSSQL Database

Mssql_DB_SERVER=10.10.42.33
Mssql_DB_USER=your_username
Mssql_DB_PASSWORD=your_pass
Mssql_DB_DATABASE=
Mssql_DB_PORT=1433

Redis

REDIS_HOST=192.168.42.52
REDIS_PASSWORD=W3lc0meRedis2026!

Security

BCRYPT_ROUNDS=12
JWT_ACCESS_SECRET=624767096055869195900403461040280741571
JWT_REFRESH_SECRET=85713100746876451665600600936409954832080
 
FRONTEND_URL_LIVE=
FRONTEND_URL_DEV=http://localhost:5173
 

Run Locally

Frontend:

npm run dev

Backend:

npm run dev

Environments

 Production Environment

  • VM IP Address: 192.168.42.52
  • Environment Name: Docker
  • Purpose: Live system used by end users

 Staging Environment

  • VM IP Address: 192.168.42.52
  • Environment Name: Docker
  • Purpose: Testing environment before production deployment

 

Repositories

Production Repository

Frontend

  • Repository Name: McjimReactLive
  • Branch:
    • main → Production

Backend

  • Repository Name: McjimNestLive
  • Branch:
    • main → Production

Staging Repository

Frontend

  • Repository Name: McjimReactStaging
  • Branch:
    • main → Staging

Backend

  • Repository Name: McjimNestStaging
  • Branch:
    • main → Staging

Deployment Workflow

  1. Develop changes locally
  2. Push changes to the Staging Repository
  3. CI/CD pipeline automatically builds and deploys to Staging Environment
  4. Perform testing and validation in staging
  5. Once approved:
  • Push the same changes to the Production Repository
  • CI/CD pipeline automatically builds and deploys to Production Environment

 

How to Push Changes

Step 1: Develop and Commit Locally

Make your changes in your local environment, then commit:

git add .
git commit -m "your message"

 

 Step 2: Push to Staging Repository

Push your changes to the staging repository:

git push origin main

This will automatically trigger the CI/CD pipeline to:

  • Build the application
  • Deploy to the Staging Environment
  •  

 Step 3: Test in Staging

  • Verify all features are working correctly
  • Perform testing and validation
  • Fix issues if needed (repeat Step 1–2)

Step 4: Push to Production Repository

Once staging is approved, push the same changes to the production repository:

git push origin main

This will automatically trigger the CI/CD pipeline to:

  • Build the application
  • Deploy to the Production Environment

 Notes

  • Always push to staging first before production
  • Ensure both repositories contain the same code/version
  • Do not skip staging validation before deploying to production

API Documentation

·         Get the store 

Endpoint:

GET /api/dispatch-tracker/get-stores

Description:  Based on the dates selected by the user, it will retrieve all stores with their TD numbers.

Request body:

{

    "checklist_id": "40000100"

}

 

Response:

 

[
    {
        "store_code": "RCE",
        "is_dispatch": "Y",
        "td_nums": "RCE2026134,RCE2026135,RCE2026136,RCE2026137,RCE2026138,RCE2026139,RCE2026140,RCE2026141,RCE2026142,RCE2026143,RCE2026144,RCE2026145,RCE2026146"
    },
    {
        "store_code": "SCE",
        "is_dispatch": "Y",
        "td_nums": "TD54260313,TD54260317,TD54260318,TD54260319,TD54260320,TD54260322,TD54260323,TD54260324,TD54260325,TD54260315"
    },
    {
        "store_code": "SCEM",
        "is_dispatch": "Y",
        "td_nums": "TD54260316,TD54260321,TD54260314"
    }
]

·         Create Dispatch

Endpoint:

POST /api/dispatch-tracker/create-dispatch

Description:  Based on the dates selected by the user, it will retrieve all stores with their TD numbers.

Request body:

{
    "checklist_id": "40000100",
    "username": "MMALINAO",
    "store_codes": [
        {
            "store_code": "EC",
            "is_dispatch": "Y",
            "td_nums": "EC20260108"
        },
        {
            "store_code": "LMT",
            "is_dispatch": "Y",
            "td_nums": "LMT2026316,LMT2026317,LMT2026318,LMT2026319,LMT2026320,LMT2026321,LMT2026322"
        },
        {
            "store_code": "LMTM",
            "is_dispatch": "Y",
            "td_nums": "LMT2026315"
        },
        {
            "store_code": "RAP",
            "is_dispatch": "Y",
            "td_nums": "RAP2026252,RAP2026254,RAP2026255,RAP2026256,RAP2026257,RAP2026258"
        },
        {
            "store_code": "RAPM",
            "is_dispatch": "Y",
            "td_nums": "RAP2026253"
        },
        {
            "store_code": "RMG",
            "is_dispatch": "Y",
            "td_nums": "RMG2026178,RMG2026179,RMG2026180,RMG2026181"
        },
        {
            "store_code": "RP",
            "is_dispatch": "Y",
            "td_nums": "RP20260199,RP20260200,RP20260201,RP20260202,RP20260203"
        },
        {
            "store_code": "SLE",
            "is_dispatch": "Y",
            "td_nums": "SLE2026196,SLE2026197,SLE2026198,SLE2026199,SLE2026200,SLE2026201"
        },
        {
            "store_code": "SST",
            "is_dispatch": "Y",
            "td_nums": "TD46260158,TD46260159"
        }
    ]
}

 

 

 

·         Get Dispatch List

Endpoint:

GET /api/dispatch-tracker/get-dispatch-list

Description:  Based on the dates selected by the user, it will retrieve all stores with their TD numbers.

Request body:

{

    "search": "40000100"

}

 

Response:

 

[
    {
        "checklist_id": "40000100",
        "created_at": "2026-06-10T06:39:30.040Z",
        "created_by": "MMALINAO",
        "stores": [
            {
                "store_code": "SST",
                "store_name": "SM CITY SAN MATEO",
                "status": "out_for_delivery",
                "td_nums": [
                    {
                        "store_id": 280,
                        "td_num": "TD46260159",
                        "current_status": "out_for_delivery",
                        "history": [
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:39:30.050Z"
                            },
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:34:06.713Z"
                            }
                        ]
                    },
                    {
                        "store_id": 279,
                        "td_num": "TD46260158",
                        "current_status": "out_for_delivery",
                        "history": [
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:39:30.050Z"
                            },
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:34:06.713Z"
                            }
                        ]
                    }
                ]
            },
            {
                "store_code": "SLE",
                "store_name": "STA. LUCIA EAST",
                "status": "out_for_delivery",
                "td_nums": [
                    {
                        "store_id": 278,
                        "td_num": "SLE2026201",
                        "current_status": "out_for_delivery",
                        "history": [
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:39:30.050Z"
                            },
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:34:06.713Z"
                            }
                        ]
                    },
                    {
                        "store_id": 277,
                        "td_num": "SLE2026200",
                        "current_status": "out_for_delivery",
                        "history": [
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:39:30.050Z"
                            },
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:34:06.713Z"
                            }
                        ]
                    },
                    {
                        "store_id": 276,
                        "td_num": "SLE2026199",
                        "current_status": "out_for_delivery",
                        "history": [
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:39:30.050Z"
                            },
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:34:06.713Z"
                            }
                        ]
                    },
                    {
                        "store_id": 275,
                        "td_num": "SLE2026198",
                        "current_status": "out_for_delivery",
                        "history": [
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:39:30.050Z"
                            },
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:34:06.713Z"
                            }
                        ]
                    },
                    {
                        "store_id": 274,
                        "td_num": "SLE2026197",
                        "current_status": "out_for_delivery",
                        "history": [
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:39:30.050Z"
                            },
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:34:06.713Z"
                            }
                        ]
                    },
                    {
                        "store_id": 273,
                        "td_num": "SLE2026196",
                        "current_status": "out_for_delivery",
                        "history": [
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:39:30.050Z"
                            },
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:34:06.713Z"
                            }
                        ]
                    }
                ]
            },
            {
                "store_code": "RP",
                "store_name": "RDS PASIG",
                "status": "out_for_delivery",
                "td_nums": [
                    {
                        "store_id": 272,
                        "td_num": "RP20260203",
                        "current_status": "out_for_delivery",
                        "history": [
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:39:30.050Z"
                            },
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:34:06.713Z"
                            }
                        ]
                    },
                    {
                        "store_id": 271,
                        "td_num": "RP20260202",
                        "current_status": "out_for_delivery",
                        "history": [
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:39:30.050Z"
                            },
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:34:06.713Z"
                            }
                        ]
                    },
                    {
                        "store_id": 270,
                        "td_num": "RP20260201",
                        "current_status": "out_for_delivery",
                        "history": [
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:39:30.050Z"
                            },
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:34:06.713Z"
                            }
                        ]
                    },
                    {
                        "store_id": 269,
                        "td_num": "RP20260200",
                        "current_status": "out_for_delivery",
                        "history": [
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:39:30.050Z"
                            },
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:34:06.713Z"
                            }
                        ]
                    },
                    {
                        "store_id": 268,
                        "td_num": "RP20260199",
                        "current_status": "out_for_delivery",
                        "history": [
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:39:30.050Z"
                            },
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:34:06.713Z"
                            }
                        ]
                    }
                ]
            },
            {
                "store_code": "RMG",
                "store_name": "RDS MAGNOLIA",
                "status": "out_for_delivery",
                "td_nums": [
                    {
                        "store_id": 267,
                        "td_num": "RMG2026181",
                        "current_status": "out_for_delivery",
                        "history": [
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:39:30.050Z"
                            },
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:34:06.713Z"
                            }
                        ]
                    },
                    {
                        "store_id": 266,
                        "td_num": "RMG2026180",
                        "current_status": "out_for_delivery",
                        "history": [
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:39:30.050Z"
                            },
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:34:06.713Z"
                            }
                        ]
                    },
                    {
                        "store_id": 265,
                        "td_num": "RMG2026179",
                        "current_status": "out_for_delivery",
                        "history": [
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:39:30.050Z"
                            },
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:34:06.713Z"
                            }
                        ]
                    },
                    {
                        "store_id": 264,
                        "td_num": "RMG2026178",
                        "current_status": "out_for_delivery",
                        "history": [
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:39:30.050Z"
                            },
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:34:06.713Z"
                            }
                        ]
                    }
                ]
            },
            {
                "store_code": "RAPM",
                "store_name": "RDS ANTIPOLO MONTEGANI",
                "status": "out_for_delivery",
                "td_nums": [
                    {
                        "store_id": 263,
                        "td_num": "RAP2026253",
                        "current_status": "out_for_delivery",
                        "history": [
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:39:30.050Z"
                            },
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:34:06.713Z"
                            }
                        ]
                    }
                ]
            },
            {
                "store_code": "RAP",
                "store_name": "RDS ANTIPOLO",
                "status": "out_for_delivery",
                "td_nums": [
                    {
                        "store_id": 262,
                        "td_num": "RAP2026258",
                        "current_status": "out_for_delivery",
                        "history": [
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:39:30.050Z"
                            },
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:34:06.713Z"
                            }
                        ]
                    },
                    {
                        "store_id": 261,
                        "td_num": "RAP2026257",
                        "current_status": "out_for_delivery",
                        "history": [
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:39:30.050Z"
                            },
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:34:06.713Z"
                            }
                        ]
                    },
                    {
                        "store_id": 260,
                        "td_num": "RAP2026256",
                        "current_status": "out_for_delivery",
                        "history": [
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:39:30.050Z"
                            },
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:34:06.713Z"
                            }
                        ]
                    },
                    {
                        "store_id": 259,
                        "td_num": "RAP2026255",
                        "current_status": "out_for_delivery",
                        "history": [
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:39:30.050Z"
                            },
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:34:06.713Z"
                            }
                        ]
                    },
                    {
                        "store_id": 258,
                        "td_num": "RAP2026254",
                        "current_status": "out_for_delivery",
                        "history": [
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:39:30.050Z"
                            },
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:34:06.713Z"
                            }
                        ]
                    },
                    {
                        "store_id": 257,
                        "td_num": "RAP2026252",
                        "current_status": "out_for_delivery",
                        "history": [
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:39:30.050Z"
                            },
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:34:06.713Z"
                            }
                        ]
                    }
                ]
            },
            {
                "store_code": "LMTM",
                "store_name": "LANDMARK TRINOMA MONTEGANI",
                "status": "out_for_delivery",
                "td_nums": [
                    {
                        "store_id": 256,
                        "td_num": "LMT2026315",
                        "current_status": "out_for_delivery",
                        "history": [
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:39:30.050Z"
                            },
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:34:06.713Z"
                            }
                        ]
                    }
                ]
            },
            {
                "store_code": "LMT",
                "store_name": "LANDMARK TRINOMA",
                "status": "out_for_delivery",
                "td_nums": [
                    {
                        "store_id": 255,
                        "td_num": "LMT2026322",
                        "current_status": "out_for_delivery",
                        "history": [
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:39:30.050Z"
                            },
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:34:06.713Z"
                            }
                        ]
                    },
                    {
                        "store_id": 254,
                        "td_num": "LMT2026321",
                        "current_status": "out_for_delivery",
                        "history": [
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:39:30.050Z"
                            },
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:34:06.713Z"
                            }
                        ]
                    },
                    {
                        "store_id": 253,
                        "td_num": "LMT2026320",
                        "current_status": "out_for_delivery",
                        "history": [
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:39:30.050Z"
                            },
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:34:06.713Z"
                            }
                        ]
                    },
                    {
                        "store_id": 252,
                        "td_num": "LMT2026319",
                        "current_status": "out_for_delivery",
                        "history": [
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:39:30.050Z"
                            },
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:34:06.713Z"
                            }
                        ]
                    },
                    {
                        "store_id": 251,
                        "td_num": "LMT2026318",
                        "current_status": "out_for_delivery",
                        "history": [
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:39:30.050Z"
                            },
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:34:06.713Z"
                            }
                        ]
                    },
                    {
                        "store_id": 250,
                        "td_num": "LMT2026317",
                        "current_status": "out_for_delivery",
                        "history": [
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:39:30.050Z"
                            },
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:34:06.713Z"
                            }
                        ]
                    },
                    {
                        "store_id": 249,
                        "td_num": "LMT2026316",
                        "current_status": "out_for_delivery",
                        "history": [
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:39:30.050Z"
                            },
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:34:06.713Z"
                            }
                        ]
                    }
                ]
            },
            {
                "store_code": "EC",
                "store_name": "EVER COMMONWEALTH",
                "status": "out_for_delivery",
                "td_nums": [
                    {
                        "store_id": 248,
                        "td_num": "EC20260108",
                        "current_status": "out_for_delivery",
                        "history": [
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:39:30.050Z"
                            },
                            {
                                "result": "out_for_delivery",
                                "reason": "",
                                "da_created_by": "MMALINAO",
                                "da_created_at": "2026-06-10T06:34:06.713Z"
                            }
                        ]
                    }
                ]
            }
        ]
    }
]

·         Update Store Status

Endpoint:

POST /api/dispatch-tracker/update-store-status

Description:  Based on the dates selected by the user, it will retrieve all stores with their TD numbers.

Request body:

{
    "checklist_id": "40000100",
    "store_id": 280,
    "status": "delivered",
    "reason": "",
    "username": "MMALINAO"
}

 

 

image.png