Delivery Order Object

Delivery Order Object

Attributes

orderId

Integer
Unique identifier for this order

orderNumber

String
Order reference of customer platform

companyId

Integer
Identifier of the company to which this order belong

areaId

Integer
Identifier of the operational area when the company is operating their delivery

customer

Object
Customer associated with the order

Child attributes

restaurant

Object
Restaurant associated with the order

Child attributes

assignedCarrier

Object
Assigned Carrier information for the order ( null if not assigned yet)

Child attributes

distance

Double
Calculated distance between pickup and delivery address

activityLog

Object
Order related events log

Child attributes

costing

Object
Order costing details

Child attributes

paymentMethod

String
Payment method for the order

orderItems

Array
Array of Order item objects

Ordered Item object child attributes

assignedCarrierId

Integer
Assigned carrier's ID

orderStatus

Object
Order status info

Child attributes

trackingLink

String
Customer tracking url link

feedback

String
Feedback of the customer

schedule

Boolean
Indication for the order if it is a scheduled order or not

parentId

Integer
Parent ID for the order

etaTime

String
Estimated time of arrival for the order

pickupInstruction

String
Pickup related instruction for the order

deliveryInstruction

String
Delivery Instruction for the order

proofOfDelivery

Object
Proof of delivery details

Child attributes

Supported orderState Enum values
ACTIVE
NOT_ASSIGNED
NOT_ACCEPTED
NOT_STARTED_YET
STARTED
PICKED_UP
READY_TO_DELIVER
ALREADY_DELIVERED
FAILED_DELIVERY
INCOMPLETE

Example JSON Output

{
    "orderId": 20625,
    "orderNumber": "7568",
    "companyId": 409,
    "areaId": 406,
    "customer": {
      "name": "William Jacob",
      "address": "CVV4+C7 Palo Alto, California, United States",
      "phoneNumber": "+16504135349",
      "emailAddress": "jacob.william@gmail.com",
      "latitude": 32.7875632,
      "longitude": -170.3874568
    },
    "restaurant": {
      "id":36726661,
      "name": "Garden fresh Palo Alto",
      "address": "460 Ramona St, Palo Alto, CA 94301, United States",
      "phoneNumber": "+16504632332",
      "latitude": 32.8069245,
      "longitude": -170.368697
    },
    "assignedCarrier": {
      "id": 30309,
      "personalId": null,
      "name": "John Doe",
      "codeName": null,
      "phoneNumber": "+12342342330",
      "companyId": null,
      "areaId": null,
      "isOnShift": null,
      "email": null,
      "carrierPhoto": "https://s3-us-west-2.amazonaws.com/qt.com.dashboard.profile.driver/somelinktothecarrierphoto.jpg",
      "isActive": null
    },
    "distance": 1.78772,
    "activityLog": {
      "placementTime": "2019-11-29T11:43:59",
      "expectedPickupTime": "12:12",
      "expectedDeliveryDate": "2019-11-29",
      "expectedDeliveryTime": "12:42",
      "assignedTime": "2019-11-30T13:40:07",
      "startTime": "2019-11-30T13:41:07",
      "pickedUpTime": "2019-12-01T05:43:15",
      "arrivedTime": "2019-12-01T05:43:15",
      "deliveryTime": "2019-12-01T05:43:15"
    },
    "costing": {
      "totalCost": 30.45,
      "deliveryFee": 0,
      "tip": 0,
      "discountAmount": 0,
      "tax": 1.45,
      "cashTip": 0
    },
    "paymentMethod": "CASH",
    "orderItems": [
      {
        "name": "Grilled Salmon Fillet",
        "quantity": 2,
        "unitPrice": 14.50
      }
    ],
    "assignedCarrierId": -1,
    "orderStatus": {
      "incomplete": false,
      "accepted": true,
      "orderState": "ALREADY_DELIVERED"
    },
    "trackingLink": null,
    "feedback": 5,
    "schedule": false,
    "parentId": 0,
    "etaTime": "",
   "pickupInstruction": "Will be ready in 15 minutes",
    "deliveryInstruction": "Please, Knock at the door",
    "proofOfDelivery": {
        "signaturePath": "https://s3-us-west-2.amazonaws.com/qt.com.dashboard.order.signature/a7dc65d0e8d44ef397e705512beb913d.jpg",
        "latitude": 23.8,
        "longitude": 90.36,
       "imageUrls": ["https://s3-us-west-2.amazonaws.com/qt.com.dashboard.order.signature/a7dc65d0e8d44ef397e705512beb913d.jpg"]
      }
}