Order Tracking


Tracking api

This api is used to show the order tracking to the customer. This is a public open api, so there is no need for any authentications.

{primary} Example of a request

Endpoint

Method URI Headers
GET https://doorhub.io/api/v1/orders/public/trackings/{orderRef} Content-Type: "application/json"
Accept: "application/json"
Query Parameters
Parameters Type Status Description
orderRef string required Order Reference ID is a string of numbers and letters that is unique to doorhub and hashed(secured). It's only shared with customer, client (shop owner).

{success} Example of response [200]

{
    "data": [
        {
            "title": "Delivered",
            "description": "Your order :orderRef is delivered",
            "createdAt": "2021-09-20T16:45:24+02:00"
        },
        {
            "title": "Driver arrived at your location",
            "description": "Driver arrived to the drop off location of the Order",
            "createdAt": "2021-09-20T16:45:21+02:00"
        },
        {
            "title": "Driver assigned to the order",
            "description": "A Driver has assigned to the order.",
            "createdAt": "2021-09-20T10:07:06+02:00"
        },
        {
            "title": "Order is fulfilled",
            "description": "QD and OD store (FL) has confirmed the order. The order is scheduled to deliver on DATE between TIME to TIME",
            "createdAt": "2021-09-20T10:02:47+02:00"
        },
        {
            "title": "Order is created",
            "description": "An electronic request has made for the order from QD and OD store (FL). We are waiting to hear from the store to confirm and complete the fulfillment.",
            "createdAt": "2021-09-20T10:02:21+02:00"
        }
    ],
    "order": {
        "orderRef": "QDA652-QC-1...",
        "ownerRef": "Any ref number",
        "pickup": {
            "street": null,
            "buildingNo": null,
            "postCode": null,
            "city": null,
            "prettyAddress": "Vesterbrogade 10, Copenhagen Municipality, Denmark",
            "instruction": null,
            "floor": null,
            "name": "QD and OD store (FL)",
            "phone": null,
            "latitude": "55.6736061",
            "longitude": "12.5607322"
        },
        "dropOff": {
            "street": "Krumtappen",
            "buildingNo": "2",
            "postCode": "2500",
            "city": "København",
            "prettyAddress": "Krumtappen 2, 2500 København, Danmark",
            "instruction": "ath",
            "floor": "2.th",
            "name": "Customer name",
            "firstName": "Customer",
            "lastName": "Name",
            "phone": "+4521...",
            "latitude": "55.6594",
            "longitude": "12.5184551",
            "livingType": null,
            "apartmentNumber": null
        },
        "packages": [
            {
                "id": 188,
                "packageId": "QC6521632124941-1...",
                "number": 1,
                "description": null,
                "dimension": {
                    "length": null,
                    "width": null,
                    "height": null,
                    "dimension": " x  x "
                },
                "isFragile": 0,
                "weight": "2.00",
                "size": "small",
                "labels": {
                    "delivery-label": {
                        "pdf": "labels/QC6521632124941-1...13.pdf"
                    },
                    "deliveryLabel": {
                        "pdf": "labels/QC6521632124941-1...13.pdf"
                    },
                    "return-delivery-label": []
                }
            }
        ]
    },
    "liveTracking": {
        "enabled": true,
        "driver": {
            "lat": "55.685425",
            "lng": "12.508067"
        }
    },
    "setDeliveryTimeWindow": {
        "enabled": false
    },
    "message": {
        "title": "Delivered",
        "subTitle": "Yesterday"
    }
}


Response parameters description
Parameters Type Description
data array The list of tracking. The data is ordered as latest event first. Each object has three(3) elements title and description and when the event happened.
order object This represents the order details information that can be shared public. Basically it's the order pickup and drop Off details with packages.
liveTracking object if the live tracking is enabled then it should be true, otherwise false. if it's true we could see the drivers position.
setDeliveryTimeWindow object
message object title and subTitle

Update customer data

We can get some additional data from customer about the drop-off place. for example is that an apartment or a house? What is the apartment number? which floor they are living? so the Delivery man can easily find the location of the delivery.

{primary} Example of a request

Endpoint

Method URI Headers
PATCH https://doorhub.io/api/v1/orders/public/trackings/{orderRef} Content-Type: "application/json"
Accept: "application/json"
Query Parameters
Parameters Type Status Description
orderRef string required Order Reference ID is a string of numbers and letters that is unique to Doorhub and hashed(secured). It's only shared with customer, client (shop owner).
Payload
{
    "livingType": "apartment",
    "floor": "2.th",
    "dropOffInstructions": "more instructions",
    "apartmentNumber": "55",
    "leaveOutsideDoor": false
}
Data Parameters
Parameters Type Status Description
livingType string (apartment / house) required It can be either an apartment or a house
floor string floor information f.x 2.th
dropOffInstructions if the customer wants to add or change existing instruction
apartmentNumber string Apartment number of the customer
leaveOutsideDoor boolean if the store configured this then customer can have the option to choose if we can leave the product outside door or not