Quick Commerce

Learn how to integrate your E-Commerce system with Doorhub Quick Commerce service. You can learn more about the service from our website Quick Commerce


Place an order

To place an order you can use this api service. The api is based on the services

Quick Commerce order

This api is for placing a Quick Commerce order for the store.

{primary} Example of a request

Endpoint

Method URI Headers
POST https://doorhub.io/api/v1/orders/services/quick-commerce Authorization: Bearer {api-key}

Payload

{
    "storeId": 174,
    "ownerId": "A2-1234",
    "pickupStreet": "Krumtappen",
    "pickupBuildingNo": "2",
    "pickupPostCode": "2500",
    "pickupCity": "Valby",
    "pickupState": "Copenhagen",

    "pickupFloor": "s.th",
    "pickupFirstName": "Sam",
    "pickupLastName": "Shahbazi",
    "pickupName": "QC Store",
    "pickupPhone": "82726353",
    "pickupEmail": "store1@email.com",

    "pickupInstructions": "Any things from customer",

    "dropOffStreet": "Krumtappen 2",
    "dropOffBuildingNo": 42,
    "dropOffPostCode": 2200,
    "dropOffCity": "Copenhagen",
    "dropOffState": "Copenhagen",

    "dropOffFloor": "2.th",
    "dropOffFirstName": "John K",
    "dropOffLastName": "Doe",

    "dropOffPhone": "+459817262",
    "dropOffWrapPhone": "+45330330",
    "dropOffEmail": "customer@email.com",
    "dropOffTime": "2021-03-04T12:12:21+01:00",
    "dropOffInstructions": "Any things from customer",

    "packages": [
        {
            "name": "Monitor",
            "length": 20.4,
            "width": 12,
            "height": 5,
            "weight": 11,
            "isFragile": true
        },
        {
            "name": "accessories",
            "size": "small",
            "weight": 5,
            "isFragile": false
        },
        {
            "name": "small items",
            "size": "small",
            "isFragile": true
        }
    ]
}   


Body Parameters
Parameters Type Status Description
storeId integer required,if ownerId not present The store id provided by Doorhub. Example: 123
ownerId integer/string optional, only required if storeId not present Your own store id. Example: "AD-123"
pickupStreet string optional pickupStreet what the pickup address street name. Example: "Krumtappen".
pickupBuildingNo string optional pickupBuildingNo which means the house / building number of the pickup address. Example: "2".
pickupPostCode string optional pickupPostCode is the post code of the pickup address. Example: "2500".
pickupCity string optional pickupCity is the city name of the pickup address. Example: "valby".
pickupState string optional pickupState is the state / region name of the pickup address. Example: "copenhagen".
pickupFloor string optional pickupFloor is the floor of the pickup address. Example: "1.th".
pickupName string optional pickupName is the name of the pickup address. Example: "Power Store copenhagen".
pickupPhone string optional pickupPhone is the phone of the pickup address. Example: "+456736543".
pickupEmail string optional pickupEmail is the email of the pickup address. Example: "power.store@email.com".
pickupInstructions string optional Here the store can write some specific information about the pickup address. Example: "Please wait for the call on the display before enter to the store".
dropOffStreet string required dropOffStreet what is the drop off street, usually the customer street name. Example: "Heimdalsgade".
dropOffBuildingNo string required dropOffBuildingNo which means the house / building number of the drop off address. Example: "42".
dropOffPostCode string required dropOffPostCode is the post code of the drop off address.. Example: "2200".
dropOffCity string required dropOffCity is the city name of the drop off address. Example: "Copenhagen N".
dropOffState string optional dropOffState is the state / region name of the drop off address. Example: "copenhagen".
dropOffFloor string optional dropOffFloor is the floor of the drop off address. Example: "2.th".
dropOffFirstName string optional dropOffFirstName is the first name of the drop off address. Example: "John".
dropOffLastName string optional dropOffLastName is the last name of the drop off address. Example: "Doe".
dropOffPhone string optional dropOffPhone is the phone or mobile number of the drop off address. Example: "+4598762544".
dropOffWrapPhone string optional dropOffWrapPhone is the phone number that the driver will see if provided instead of the the dropOffPhone. Example: "+45330033".
dropOffEmail string optional dropOffEmail is the emal of the drop off address. Example: "john.doe@email.com".
dropOffTime string optional is the time when is the order has to drop off at drop off address. Example: "2021-03-03 19:30:00".
dropOffInstructions string optional dropOffInstructions is any kind of instruction for the driver on the drop off address. Example: "Please call on the phone when arrived, the door phone of the building does not works".
packages array required packages is the number of package information, a single order can have multiple packages. Doorhub Driver needs to understand how many packages are for this order. Every package must have the name, but if they have other information like weight, length, width, height, isFragile they should be also included here, but otherwise if there size information is not available, a size with "small, medium, big" should be included. All the measurement units are expected on based on the country your company is registered on.

{success} Example of response [201]

{
    "success": true,
    "message": "Order created successfully",
    "data": {
        "order": {
            "orderRef": "MY1174-1627545123-10",
            "ownerRef": null
        },
        "pickup": {
            "storeId": 174,
            "ownerId": null,
            "fullName": "Sam Shahbazi",
            "firstName": "Sam",
            "lastName": "Shahbazi",
            "address": {
                "prettyAddress": "Krumtappen 2, 2500 København, Danmark",
                "street": "Krumtappen",
                "buildingNo": "2",
                "floor": null,
                "postCode": "2500",
                "city": "Valby"
            }
        },
        "dropOff": {
            "fullName": "John K Doe",
            "firstName": "John K",
            "lastName": "Doe",
            "address": {
                "prettyAddress": "Krumtappen 2, 2500 København, Danmark",
                "buildingNo": "42",
                "floor": "2.th",
                "postCode": "2200",
                "city": "Copenhagen"
            }
        },
        "packages": [
            {
                "id": 47,
                "packageId": "QC1741627545124-1",
                "number": 1,
                "description": null,
                "dimension": {
                    "length": "20.40",
                    "width": "12.00",
                    "height": "5.00",
                    "dimension": "20.40 x 12.00 x 5.00"
                },
                "isFragile": 1,
                "weight": "11.00",
                "size": null,
                "labels": {
                    "delivery-label": [],
                    "return-delivery-label": []
                },
                "pickup": {
                    "confirmedAt": null,
                    "isFound": null,
                    "confirmedWith": null,
                    "confirmedUserId": null
                },
                "dropoff": {
                    "confirmedAt": null,
                    "isFound": false,
                    "confirmedWith": null,
                    "confirmedUserId": null
                },
                "hubPickup": {
                    "confirmedAt": null,
                    "isFound": false,
                    "confirmedWith": null,
                    "confirmedUserId": null
                }
            },
            {
                "id": 48,
                "packageId": "QC1741627545124-2",
                "number": 2,
                "description": null,
                "dimension": {
                    "length": null,
                    "width": null,
                    "height": null,
                    "dimension": " x  x "
                },
                "isFragile": 0,
                "weight": "5.00",
                "size": "small",
                "labels": {
                    "delivery-label": [],
                    "return-delivery-label": []
                },
                "pickup": {
                    "confirmedAt": null,
                    "isFound": null,
                    "confirmedWith": null,
                    "confirmedUserId": null
                },
                "dropoff": {
                    "confirmedAt": null,
                    "isFound": false,
                    "confirmedWith": null,
                    "confirmedUserId": null
                },
                "hubPickup": {
                    "confirmedAt": null,
                    "isFound": false,
                    "confirmedWith": null,
                    "confirmedUserId": null
                }
            },
            {
                "id": 49,
                "packageId": "QC1741627545124-3",
                "number": 3,
                "description": null,
                "dimension": {
                    "length": null,
                    "width": null,
                    "height": null,
                    "dimension": " x  x "
                },
                "isFragile": 1,
                "weight": null,
                "size": "small",
                "labels": {
                    "delivery-label": [],
                    "return-delivery-label": []
                },
                "pickup": {
                    "confirmedAt": null,
                    "isFound": null,
                    "confirmedWith": null,
                    "confirmedUserId": null
                },
                "dropoff": {
                    "confirmedAt": null,
                    "isFound": false,
                    "confirmedWith": null,
                    "confirmedUserId": null
                },
                "hubPickup": {
                    "confirmedAt": null,
                    "isFound": false,
                    "confirmedWith": null,
                    "confirmedUserId": null
                }
            }
        ]
    }
}

Order details

This api you can get the placed order details with status updates

{primary} Example of a request

 curl -X GET -G "https://doorhub.io/api/v1/orders/{orderRef}" 
     -H "Authorization: Bearer {api-key}"


Query Parameters
Parameters Type Status Description
orderRef string required is the Doorhub / your own order ref number

{success} Example of response [200]

{
    "message": "Order details",
    "data": {
        "order": {
          "orderRef": "DDR-12001",
          "ownerRef": "Your-order-ref-12122"
        },
        "pickup": {
            "storeId": 12,
            "address": {
                "street": "Krumtappen",
                "buildingNo": "2",
                "floor": "1.th",
                "city": "Valby",
                "postCode": "2200"
            }
        },
        "dropOff": {
            "name": "John Doe",
            "phone": "+459827263",
            "address": {
                "street": "Heimdalsgade",
                "buildingNo": "42",
                "floor": "2.th",
                "city": "Nørrebro",
                "postCode": "2500",
                "state": "Copenhagen"
            }
        }      
    }
}

Get order label

{primary} Example of a request

 curl -X GET -G "https://doorhub.io/api/v1/orders/{orderRef}/label" 
     -H "Authorization: Bearer {api-key}"

{success} Example of response [200]

{
    "message": "Order label information",
    "data": {
        "order": {
            "orderRef": "DDR-1001", 
            "ownerRef": "Your-order-ref-1001"
        },
        "labels": {
            "delivery-label": {
                "type": "delivery-label",
                "format": "pdf",
                "size": "12x12",
                "source": "raw-pdf-label-file"
            },
            "return-delivery-label": {
                "type": "return-delivery-label",
                "format": "pdf",
                "size": "12x12",
                "source": "raw-pdf-label-file"
            }
        }
    }
}

Cancel an order

This api is used to cancel an order, the order can be canceled with some criteria. Check the requirements here.

{primary} Example of a request

 curl -X DELETE -G "https://doorhub.io/api/v1/orders/{orderRef}" 
     -H "Authorization: Bearer {api-key}"

{success} Example of response [200]

{
    "message": "Order canceled successfully",
    "data": {
        "order": {
            "orderRef": "DDR-1202",
            "ownerRef": "Your-order-ref-001"
        }
    }
}