Doorhub Services

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


How to integrate with Doorhub Services

Each of Doorhub service are different, but for each service there are some common steps. Please follow the below steps to start...

  1. Contact Doorhub (hello@doorhub.io) to create your account setup
  2. Once the account is setup you can place orders immediately from our Dashboard by login to your account, the account credentials (username and password) will be provided by Doorhub.
  3. You can also integrate with us by integrating with our public API, The public API is described below onto the service specific documentation.
  4. If you follow through the steps of the documentation the integration will be easy.
  5. If you have any problem understanding or have any questions, please contact our tech department at developer@doorhub.io

Get the stores list

This api will return you all the stores that was created for your company.

{primary} Example of a request

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

{success} Example of response [200]

{
    "draw": 0,
    "recordsTotal": 505,
    "recordsFiltered": 505,
    "data": [
        {
            "id": 1,
            "name": "DH Restaurant1",
            "address": "Gammel Jernbanevej 31, København, Denmark",
            "latitude": "55.6642532",
            "longitude": "12.5179944",
            "phone": "+4553532190",
            "pNumber": null,
            "maxBundle": 2,
            "active": 1,
            "deliveryArea": "55.739317,12.465466,55.643721,12.348736,55.62783,12.363842,55.648758,12.464093,55.648758,12.577389,55.668513,12.630261,55.715343,12.591809,55.759412,12.512845,55.758253,12.422894,55.735064,12.409161",
            "type": "ondemand",
            "instruction": null,
            "preparationTime": 6.5,
            "confirmationRequired": 0,
            "regionId": 2,
            "configs": [
                {
                    "id": 1,
                    "slug": "order_place_allow_outside_region",
                    "name": "Allow Order place outside region",
                    "type": "boolean",
                    "active": 1,
                    "createdAt": "2019-06-05T11:14:49+02:00",
                    "updatedAt": "2019-06-05T11:14:49+02:00"
                },
                {
                    "id": 2,
                    "slug": "isatest",
                    "name": "Is a Test",
                    "type": "boolean",
                    "active": 1,
                    "createdAt": "2020-05-01T18:05:05+02:00",
                    "updatedAt": "2020-05-01T18:05:05+02:00"
                }
            ],
            "isATest": true,
            "hasReturnConfiguration": true,
            "createdAt": "2019-02-11T00:08:37+01:00",
            "updatedAt": "2020-12-04T14:04:27+01:00"
        },
        {...},
        {...}

Supporting services (list) for the store.

Although you can get the supporting Doorhub services for the stores into the stores list api, you can also call this api to get the supporting Doorhub services for the specific store.

{primary} Example of a request

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

{success} Example of response [200]

{
    "draw": 0,
    "recordsTotal": 1,
    "recordsFiltered": 1,
    "data": [
        {
            "id": 1,
            "name": "On Demand",
            "slug": "ondemand",
            "isOperational": 1,
            "comment": "anything",
            "expectedOpeningAt": "2021-02-25 16:45:00",
            "createdAt": "2020-12-04T12:28:15+01:00",
            "updatedAt": "2020-12-04T12:28:15+01:00"
        }
    ]
}

Supporting services (list) for the account / Company

This api you can get the minimal information about the stores, and their supporting services.

{primary} Example of a request

curl -X GET -G "https://doorhub.io/api/v1/companies/{company}/stores/doorhub-services" 
    -H "Authorization: Bearer {api-key}" 

{success} Example of response [200]

{
    "draw": 0,
    "recordsTotal": 505,
    "recordsFiltered": 505,
    "data": [
        {
            "id": 1,
            "slug": "any-unique-name-of-store",
            "doorhub-services": [
              {
                  "id": 1,
                  "name": "On Demand",
                  "slug": "ondemand",
                  "isOperational": false,
                  "comment": "anything",
                  "expectedOpeningAt": "2021-02-25T12:28:15+01:00"
              },
              {...},
              {...}
            ]
        }
    ]
}

Is address supported

To check if the pickup or drop off locations are deliverable by Doorhub?

{primary} Example of a request

curl -X POST -G "https://doorhub.io/api/v1/pre-orders/address/check" 
    -H "Authorization: Bearer {api-key}"
    -d "storeId" = 105
    -d "service" = "quick-commerce"

    -d "pickupStreet": "Krumtappen",
    -d "pickupBuildingNo": "2",
    -d "pickupPostCode": "2500",
    -d "pickupCity": "Valby",
    -d "pickupState": "Copenhagen",    

    -d "dropOffStreet": "Heimdalsgade",
    -d "dropOffBuildingNo": "42",
    -d "dropOffPostCode": "2200",
    -d "dropOffCity": "Copenhagen",
    -d "dropOffState": "Copenhagen"


Body Parameters
Parameters Type Status Description
storeId integer required The pickup address. Example: Toftegårds Allé 49, 2500 København
service string required The dropoff address. Example: Heimdalsgade 44, 2200 København
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".
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".
dropOffState string optional dropOffState is the state / region name of the drop off address. Example: "copenhagen".


{info} As you are sending the storeId, Doorhub already know the pickup Address details, so if the pickup address is not different from the store address, you don't need to send the pickup sections (pickupStreet, pickupBuildingNo, etc).


{success} Example of response [200]

{
    "success": true,
    "message": "Address is verified",
    "data": []
}

{danger} Example of a response [400]

{
    "success": false,
    "message": "Drop off Address is not supported",
    "errors": {
        "address": [
            "Drop off Address is not supported"
        ],
        "suggestions": [
            {
                "message": "Please make sure the address is correct and valid to Doorhub delivery area"
            }
        ]
    }
}