Online Ordering Delivery V3
Delivery Flow Overview
High level Sequence diagram
Delivery Order Placement
Prerequisites:
- Delivery Service Provider is installed for the location. E.g., DoorDash Drive, Inhouse Delivery.
Delivery Order is placed as other orders with
POST /online-ordering/v3/{locationId}/orders
Full order structure is available in Order V3. For delivery orders pickupInfo, dineInInfo, curbsideInfo fields should be null.
Essential fields for Delivery Order Placement:
{
...,
"fulfillmentType": "DELIVERY",
"expectedAt": "<expected-food-delivery-time>",
"deliveryInfo": {
"deliveryType": "DELIVERY_SERVICE|SELF_DELIVERY",
"isContactless": false,
"address": Address,
"instructions": null,
"contactInfo": ContactInfo,
"deliveryService": {
"deliveryQuoteRef": "crn:310ddc51-5256-44b0-a08b-a239d4a301cc:dqt_SPR-sYE7xc0f4883",
"expectedPickupAt": "<expected-food-pickup-time>"
}
},
}
Get enabled Delivery Services for a location
GET /online-ordering/v3/{locationId}/deliveries/settings
Response 200
- Returns an array of objects DeliveryServiceSettings with enabled delivery services for the location
{
"deliveryServices": [
{
"name": "Doordash Drive",
"ref": "310ddc51-5256-44b0-a08b-a239d4a301cc"
},
{
"name": "InhouseDelivery",
"ref": "0b2d5658-3cdf-44c0-9fe6-5111d9bf5def"
}
]
}
How to lookup for the delivery quotes and estimate?
POST /online-ordering/v3/{locationId}/deliveries/quotes
Request - Required body
{
"dropoff_address":{
"city":"San Francisco",
"state":"California",
"street":"901 Market Street",
"unit":"Suite #600",
"zip_code":"94105"
},
"delivery_time":"2018-08-22T17:21:28", //If deferred order
"pickup_time":"2018-08-22T17:20:28", //If ASAP order
}
Response 412
- if there are no eligible “DELIVERY_SERVICE” for this location
Response 200
- Request was successfully accepted
{
"statistics": [
{"provider": "doordash", "status": "200|400|500"},
{"provider": "ihd", "status": "200|400|500"},
],
"quotes": [
{
"ref": "crn:310ddc51-5256-44b0-a08b-a239d4a301cc:dqt_SPR-sYE7xc0f4883",
"fee": 700,
"currency": "USD",
"dropoff_eta": "2022-02-25 01:30:39",
"pickup_eta": "2022-02-25 01:07:10"
}
]
}
Models
DeliveryServiceSettings
Name | Type | Description |
---|---|---|
name | string | Name of the delivery provider (e.g., Doordash Drive ). |
ref | string | Unique reference identifier for the quote (UUID format). |
QuoteRequest
Name | Type | Description |
---|---|---|
hasAgeRestrictedItems | boolean | Indicates whether the order contains items with age restrictions (e.g., alcohol). |
deliveryAddress.city | string | City of the delivery address. |
deliveryAddress.state | string | State or region of the delivery address. |
deliveryAddress.line1 | string | Primary street address line. |
deliveryAddress.line2 | string | Secondary street address line (e.g., apartment, suite, floor). |
deliveryAddress.postalCode | string | Postal or ZIP code of the delivery address. |
deliveryAddress.instructions | string or null | Special delivery instructions for the driver (optional). |
expectedDeliveryAt | string or null | Expected delivery date and time in ISO 8601 format (can be null if not set). |
expectedPickupAt | string | Expected pickup date and time in ISO 8601 format. |
Quote
Name | Type | Description |
---|---|---|
ref | string | Unique reference identifier in the format crn:[conecto-app-guid]:[3rd-party-external-identifier] . |
fee | integer | The service or delivery fee amount associated with the quote. |
currency | string | Currency code in ISO format (e.g., USD ). |
estimatedDeliveryAt | string (ISO 8601 datetime) | Estimated date and time when the order will be delivered. |
estimatedPickupAt | string (ISO 8601 datetime) | Estimated date and time when the order will be ready for pickup. |
Methods
Retrieve Delivery Settings
Returns a Location Delivery configuration.
GET /online-ordering/v3/{locationId}/delivery-service/settings
Response 200
Returns a list of available delivery services for the requested location.
{
"deliveryServices": [
{
"name": "string",
"id": "string"
}
]
}
Retrieve Delivery Quotes
Returns a list of Delivery Quotes for the requested location.
POST /online-ordering/v3/{locationId}/delivery-service/quotes
Request Body (required)
Content-Type: application/json
{
"hasAgeRestrictedItems": "boolean",
"deliveryAddress": {
"city": "San Francisco",
"state": "CA",
"line1": "901 Market Street",
"line2": "Suite #600",
"postalCode": "94105",
"instructions": "string | null"
},
"expectedDeliveryAt": null,
"expectedPickupAt": "2022-02-25T01:07:10Z"
}
Response 200
Returns a list of delivery quotes.
"quotes": [
{
"ref": "crn:[conecto-app-guid]:[3rd-party-external-indetifier]",
"fee": "integer",
"currency": "USD",
"estimatedDeliveryAt": "2022-02-25T01:30:39Z",
"estimatedPickupAt": "2022-02-25T01:07:10Z"
}
]
Response 412
- Precondition Failed - no DELIVERY SERVICE subscriptions for location