Skip to content

Delivery Tracking

These endpoints allow you to track active delivery orders and get real-time courier location coordinates along with route progress.

Active statuses: Accepted, OnTheWayToSender, ArrivedToSender, InProgress.

Orders with status Published, Finished, or Declined are not included.

Resources used: CourierTracking, TrackingRoute, TrackingPlace

Retrieve list of active delivery orders with courier tracking

Returns a paginated list of all active delivery orders for the authenticated client, including courier coordinates and route details.

Endpoint:

js
GET: `/v1/clients/auth/delivery-orders/tracking`
GET: `/v1/clients/auth/delivery-orders/tracking`

Query parameters:

ParameterTypeDefaultDescription
per_pagenumber15Number of items per page
pagenumber1Page number

Response:

json
{
    "data": [
        {
            "id": 456,
            "status": "InProgress",
            "courier": CourierTracking,
            "active_route": TrackingRoute,
            "routes": [
                TrackingRoute,
                ...
                TrackingRoute
            ]
        }
    ],
    "meta": { "current_page": 1, "last_page": 1, "per_page": 15, "total": 1 }
}
{
    "data": [
        {
            "id": 456,
            "status": "InProgress",
            "courier": CourierTracking,
            "active_route": TrackingRoute,
            "routes": [
                TrackingRoute,
                ...
                TrackingRoute
            ]
        }
    ],
    "meta": { "current_page": 1, "last_page": 1, "per_page": 15, "total": 1 }
}

Example:

json
{
    "data": [
        {
            "id": 456,
            "status": "InProgress",
            "courier": {
                "id": 42,
                "first_name": "John",
                "last_name": "D.",
                "phone": "+37120000000",
                "location": [56.9496, 24.1052],
                "location_updated_at": "2026-05-13T14:30:15.000000Z"
            },
            "active_route": {
                "id": 102,
                "status": "OnTheWay",
                "origin": {
                    "id": 201,
                    "address": "Brīvības iela 1, Rīga",
                    "coordinates": [56.9496, 24.1052],
                    "contact_name": "Warehouse",
                    "contact_phone": "+37120000001"
                },
                "destination": {
                    "id": 202,
                    "address": "Čaka iela 50, Rīga",
                    "coordinates": [56.9550, 24.1200],
                    "contact_name": "Customer A",
                    "contact_phone": "+37120000002"
                }
            },
            "routes": [
                {
                    "id": 101,
                    "status": "Finished",
                    "origin": { "id": 200, "address": "...", "coordinates": [56.9400, 24.1000], "contact_name": "...", "contact_phone": "..." },
                    "destination": { "id": 201, "address": "...", "coordinates": [56.9496, 24.1052], "contact_name": "...", "contact_phone": "..." }
                },
                {
                    "id": 102,
                    "status": "OnTheWay",
                    "origin": { "id": 201, "address": "...", "coordinates": [56.9496, 24.1052], "contact_name": "...", "contact_phone": "..." },
                    "destination": { "id": 202, "address": "...", "coordinates": [56.9550, 24.1200], "contact_name": "...", "contact_phone": "..." }
                },
                {
                    "id": 103,
                    "status": "New",
                    "origin": { "id": 202, "address": "...", "coordinates": [56.9550, 24.1200], "contact_name": "...", "contact_phone": "..." },
                    "destination": { "id": 203, "address": "...", "coordinates": [56.9600, 24.1300], "contact_name": "...", "contact_phone": "..." }
                }
            ]
        }
    ],
    "meta": { "current_page": 1, "last_page": 1, "per_page": 15, "total": 1 }
}
{
    "data": [
        {
            "id": 456,
            "status": "InProgress",
            "courier": {
                "id": 42,
                "first_name": "John",
                "last_name": "D.",
                "phone": "+37120000000",
                "location": [56.9496, 24.1052],
                "location_updated_at": "2026-05-13T14:30:15.000000Z"
            },
            "active_route": {
                "id": 102,
                "status": "OnTheWay",
                "origin": {
                    "id": 201,
                    "address": "Brīvības iela 1, Rīga",
                    "coordinates": [56.9496, 24.1052],
                    "contact_name": "Warehouse",
                    "contact_phone": "+37120000001"
                },
                "destination": {
                    "id": 202,
                    "address": "Čaka iela 50, Rīga",
                    "coordinates": [56.9550, 24.1200],
                    "contact_name": "Customer A",
                    "contact_phone": "+37120000002"
                }
            },
            "routes": [
                {
                    "id": 101,
                    "status": "Finished",
                    "origin": { "id": 200, "address": "...", "coordinates": [56.9400, 24.1000], "contact_name": "...", "contact_phone": "..." },
                    "destination": { "id": 201, "address": "...", "coordinates": [56.9496, 24.1052], "contact_name": "...", "contact_phone": "..." }
                },
                {
                    "id": 102,
                    "status": "OnTheWay",
                    "origin": { "id": 201, "address": "...", "coordinates": [56.9496, 24.1052], "contact_name": "...", "contact_phone": "..." },
                    "destination": { "id": 202, "address": "...", "coordinates": [56.9550, 24.1200], "contact_name": "...", "contact_phone": "..." }
                },
                {
                    "id": 103,
                    "status": "New",
                    "origin": { "id": 202, "address": "...", "coordinates": [56.9550, 24.1200], "contact_name": "...", "contact_phone": "..." },
                    "destination": { "id": 203, "address": "...", "coordinates": [56.9600, 24.1300], "contact_name": "...", "contact_phone": "..." }
                }
            ]
        }
    ],
    "meta": { "current_page": 1, "last_page": 1, "per_page": 15, "total": 1 }
}

Retrieve tracking for a single delivery order

Returns tracking data for a specific active delivery order, including courier coordinates and route details.

Returns 404 if the order is not in an active status. Returns 403 if the order does not belong to the authenticated client.

Endpoint: id = DeliveryOrder ID

js
GET: `/v1/clients/auth/delivery-orders/${id}/tracking`
GET: `/v1/clients/auth/delivery-orders/${id}/tracking`

Response:

json
{
    "data": {
        "id": 456,
        "status": "InProgress",
        "courier": CourierTracking,
        "active_route": TrackingRoute,
        "routes": [
            TrackingRoute,
            ...
            TrackingRoute
        ]
    }
}
{
    "data": {
        "id": 456,
        "status": "InProgress",
        "courier": CourierTracking,
        "active_route": TrackingRoute,
        "routes": [
            TrackingRoute,
            ...
            TrackingRoute
        ]
    }
}

Route statuses

Each route segment progresses through these statuses:

StatusDescription
NewNot yet started
PickedUpCourier picked up the package
OnTheWayCourier is en route to destination
ArrivedCourier arrived at destination
FinishedDelivery completed at this destination

Courier location

The location field contains [latitude, longitude] coordinates from the courier's latest GPS update. The location_updated_at field shows when the location was last recorded. Both fields are null if the courier has no recent location data.

Active route

The active_route field indicates the current route segment the courier is working on. Use it to show origin/destination on a map. The routes array provides the full delivery progress across all segments.

Rate limiting

These endpoints are rate-limited to 60 requests per minute per client in production. Poll at reasonable intervals (e.g., every 5-10 seconds).

© 2026 | SIA "QWQER EU" | qwqer.lv ™