Creating orders for Dispatch / Last Mile Delivery

Overview

For platforms who don't directly handle delivery or aren't currently offering this order type, Deliverect allows for an order to be routed to an integrated 'Dispatch' service.

Formats

There are three ordering formats where dispatch services can be integrated;

FormatDescription
CommerceDeliverect's Commerce Suite orchestrates all aspects of the digital ordering flow, delivery jobs can be assigned to any fulfillment type 'delivery' and where "courier": "restaurant" is specified in Checkout
ChannelThis consists of an order creation endpoint where "courier": "restaurant" is specified
Standalone DispatchThis utilizes the same endpoint as above, but for a format where POS order injection isn't a requirement and validation on product PLUs is relaxed

Specifying any other string than `"restaurant"` will signal that your channel will be fully handling delivery

Dispatch Flow

See a complete flow diagram of the dispatch process via the link below;

Pre-requisites

A pre-requisite for delivery orders to be routed to one of our dispatch partners, a customer needs to select one or more services to connect with. See our full list of Dispatch partners here

Create Order for Dispatch

{
  "basket": {
    "id": "62********************3x"
  },
  "order": {
    "channelOrderId": "TEST****629",
    "channelOrderDisplayId": "T**629",
    "validationId": null,
    "courier": "restaurant",
    "by": "Mobile App"
  },
  "note": "ORDER LEVEL NOTE",
  "payments": [
    {
      "type": "dpay",
      "externalId": "68****************44",
      "isPrepaid": true,
      "amount": 900
    }
  ]
}
{
    "items": [
        {
            "plu": "BRG-0398",
            "name": "Burger",
            "price": 1500,
            "quantity": 1,
            "subItems": [],
            "productType": 1
        }
    ],
    "courier": "restaurant",
    "orderType": 2,
    "deliveryAddress": {
        "street": "Brown Street",
        "streetNumber": "900",
        "postalCode": "1120",
        "city": "New York",
        "extraAddressInfo": "Use Buzzer"
    },
    "deliveryCost": 0,
    "deliveryIsAsap": true,
    "deliveryTime": "yyyy-MM-ddTHH:mm:ssZ",
    "tip": 0,
    "channelOrderId": "501-bffe-f0e97",
    "channelOrderDisplayId": "f0e97"
}
{
    "items": [
        {
            "plu": "1234",
            "name": "Burger",
            "price": 1500,
            "quantity": 1,
            "subItems": [],
            "productType": 1
        }
    ],
    "courier": "restaurant",
    "orderType": 2,
    "deliveryAddress": {
        "street": "Brown Street",
        "streetNumber": "900",
        "postalCode": "1120",
        "city": "New York",
        "extraAddressInfo": "Use Buzzer"
    },
    "deliveryCost": 0,
    "deliveryIsAsap": true,
    "deliveryTime": "yyyy-MM-ddTHH:mm:ssZ",
    "tip": 0,
    "channelOrderId": "501-bffe-f0e97",
    "channelOrderDisplayId": "f0e97"
}

Pre-validating Dispatch Availability

To enhance the ordering flow and customer experience it is possible to check that an integrated Dispatch service is available before processing an order. The endpoint below can be used to validate Dispatch availability before submitting your order.

Receiving Courier Updates

Once an order is submitted, a webhook can be delivered when various courier-related events occur. These cover the following scenarios;

The status change for the order

Co-ordinates updated

The deliveryTimeETA changes by greater than 60 seconds

Courier name changes

See more about receiving courier updates below;

Package sizes & Transport types

It is optional to also specify the package sizes and transport types which will be sent using the format below.

"deliveryInfo": {
        "packageSize": "large",
        "transportType": "car"
 }
Package Size NameString ValueDimensionsDescription
SMALLsmall22 x 42 x 45 cmStandard delivery with a Courier on a bicycle or scooter.
LARGElarge30 x 124 x 80 cmDelivery which will require to be delivered via car
EXTRA LARGEextraLargeLarger than 30 x 124 x 80 cmFor large catering orders with many different trays to be delivered requiring a van
Transport Type NameString Value
BICYCLEbicycle
CARGOBIKEcargobike
MOTORBIKEmotorbike
MOTORBIKE XLmotorbikexl
CARcar