This api is for placing an on demand order for the store.
{primary} Example of a request
curl -X POST -G "https://doorhub.io/api/v1/orders/ondemand"
-H "Authorization: Bearer {api-key}"
-d "storeId" = 105
-d "ownerId" = "2333"
-d "pickupStreet" = "Krumtappen"
-d "pickupBuildingNo" = "2",
-d "pickupPostCode" = "2500",
-d "pickupCity" = "Copenhagen"
-d "pickupState" = "Copenhagen Region"
-d "pickupFloor" = "N/A"
-d "pickupPhone" = "88726635"
-d "pickupEmail" = "barakat@gmail.com"
-d "pickupName" = "Barakat restaurant"
-d "pickupInstructions" = "Any instruction from store / pickup"
-d "dropOffStreet" = "Heimdalsgade"
-d "dropOffBuildingNo" = "42"
-d "dropOffPostCode" = "2200"
-d "dropOffCity" = "Nørrebro"
-d "dropOffState" = "Copenhagen"
-d "dropOffFloor" = "4-44"
-d "dropOffFirstName" = "Customer"
-d "dropOffLastName" = "Name"
-d "dropOffPhone" = "+45982736"
-d "dropOffEmail" = "customer_email@gmail.com"
-d "dropOffInstructions" = "Any instructions from customer",
-d "packageSize" = "small"
-d "ownerRef" = "138474635-123"
-d "isAsap" = false
-d "dropOffTime" = "2021-02-01T12:28:15+01:00"
-d "cashOnDelivery" = false
-d "cashOnDelivery" = false
-d "instructions" = "any thing that we should know as delivery partner for this order"
Parameters | Type | Status | Description |
---|---|---|---|
storeId | integer | required,if ownerId not present | The store id provided by Doorhub. Example: 123 |
ownerId | integer/string | 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". |
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". |
{success} Example of response [200]
{
"message": "Order created successfully",
"data": {
"orderStatus": "Waiting",
"store": {
"id": 503,
"address": ""
},
"order": {
"id": 234866,
"orderRef": "DDR503-0007",
"ownerRef": "138474635-123",
"sourceAddress": "",
"isAsap": false,
"packageSize": "small",
"dropOffTime": "",
"cashOnDelivery": false,
"instructions": "",
"instructionsForPartner": ""
}
}
}