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 or jewel@doorhub.io

Your account user is linked with your company, your company can have one or more stores (physical stores). Your company is also linked with allowed services (On-Demand, Sameday and Quick-commerce). You have to tell Doorhub what services you are interested. All of your stores can also have more than one service. Your store can only place associated service orders.

Get Company (we are right now only supports one company for a user)

This api will return your company details

{primary} Example of a request

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

{success} Example of response [200]

{
  "draw": 0,
  "recordsTotal": 1,
  "recordsFiltered": 1,
  "data": [
    {
      "id": 605,
      "userId": 1120,
      "name": "Company Quick Commerce",
      "address": "Krumtappen 2, København, Danmark",
      "phone": "+4591...",
      "vatNumber": "12345678",
      "testKey": "co_test_6d08...",
      "liveKey": "co_live_69ed...",
      "active": true,
      "stripeCustomer": {
        "id": 50,
        "customerName": "User Quick Commerce",
        "cardNumber": "0001",
        "cardBrand": "Visa",
        "expiryMonth": 12,
        "expiryYear": 2021
      },
      "isATest": false,
      "isCardRequired": true,
      "setup": {
        "isComplete": true
      },
      "logo": "https://doorhub.test/storage/companies/logo/1623249727.jpeg",
      "createdAt": "2021-01-13T11:57:42+01:00",
      "updatedAt": "2021-06-09T16:42:07+02:00"
    }
  ]
}

Get All the stores of the company

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": "+4553...",
      "pNumber": null,
      "maxBundle": 2,
      "active": 1,
      "deliveryArea": "55.739317,12.465466,55.643721,12.348736,55.62783,...",
      "type": "ondemand",
      "instruction": null,
      "preparationTime": 6.5,
      "confirmationRequired": 0,
      "regionId": 2,
      "doorhubServices": [
        {
          "id": 1,
          "name": "On demand",
          "slug": "on-demand",
          "shortCode": "OD",
          "isOperational": true,
          "comment": "anything",
          "expectedOpeningAt": "2021-02-25 16:45:00"
        },
        {
          "id": 4,
          "name": "Quick Commerce",
          "slug": "quick-commerce",
          "shortCode": "QC",
          "isOperational": true,
          "comment": null,
          "expectedOpeningAt": null
        }
      ],
      "configs": [
        {
          "id": 1,
          "slug": "order_place_allow_outside_region",
          "name": "Allow Order place outside region",
          "type": "boolean",
          "active": true
        },
        {
          "id": 2,
          "slug": "isatest",
          "name": "Is a Test",
          "type": "boolean",
          "active": true
        }
      ],
      "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/{storeId}/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"
        }
    ]
}

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"
            }
        ]
    }
}