For: Developers
AcceptDelivery
Accept a pending delivery, or reaccept a modified delivery.
Request Arguments
Input Objects: AcceptDeliveryInput
Input Object Arguments
Name | Required | Type | Description |
| false | String | A unique identifier for the client performing the mutation. |
| true | ID | ID of the delivery |
Response Type
Type | Null |
AcceptDeliveryPayload | true |
Variables
{
"input": {
"clientMutationId": "String",
"deliveryId": "ID",
}
}
Example
mutation acceptDelivery($input: AcceptDeliveryInput!) {
acceptDelivery(input: $input) {
clientMutationId
delivery
}
}
Example response
{
"data": {
"acceptDelivery": {
"clientMutationId": "String",
"delivery": {
"cancelled": "Boolean",
"catererPickupVerification": "CatererPickupVerification",
"distance": "String",
"driverAskFor": "String",
"drivers": "Driver",
"dropoffAddress": "Address",
"eventAt": "ISO8601DateTime",
"id": "ID",
"order": "Order",
"pickupAddress": "Address",
"pickupInstructions": "String",
"priority": "DeliveryPriority",
"requestedPickupAt": "ISO8601DateTime",
"status": "DeliveryStatus",
"timeZoneIdentifier": "String"
}
}
}
}AssignDriver
Assign a driver to an accepted delivery.
AssignDriver has been deprecated and replaced with DriversAssign [link → Mutations § driversassign]
Request Arguments
Input Objects: AssignDriverInput
Input Object Arguments
Name | Required | Type | Description |
| false | String | A unique identifier for the client performing the mutation. |
| false | Boolean | When |
| true | ID | ID of the delivery to be assigned to |
| true | ID | External ID of the driver to be assigned |
| false | Phone | Optional phone number that masks the driver's real phone number |
Response Type
Type | Null |
AssignDriverPayload | true |
Variables
{
"input": {
"clientMutationId": "String",
"allowMultipleDrivers": "Boolean",
"deliveryId": "ID",
"driverId": "ID",
"maskedPhoneNumber": "Phone",
}
}
Example
mutation assignDriver($input: AssignDriverInput!) {
assignDriver(input: $input) {
clientMutationId
delivery
}
}
Example response
{
"data": {
"assignDriver": {
"clientMutationId": "String",
"delivery": {
"cancelled": "Boolean",
"catererPickupVerification": "CatererPickupVerification",
"distance": "String",
"driverAskFor": "String",
"drivers": "Driver",
"dropoffAddress": "Address",
"eventAt": "ISO8601DateTime",
"id": "ID",
"order": "Order",
"pickupAddress": "Address",
"pickupInstructions": "String",
"priority": "DeliveryPriority",
"requestedPickupAt": "ISO8601DateTime",
"status": "DeliveryStatus",
"timeZoneIdentifier": "String"
}
}
}
}CreateDriver
Creates a new driver record that can later be assigned to deliveries.
Request Arguments
Input Objects: CreateDriverInput
Input Object Arguments
Name | Required | Type | Description |
| false | String | A unique identifier for the client performing the mutation. |
| true | DriverInput | Input object for creating a driver |
Response Type
Type | Null |
CreateDriverPayload | true |
Variables
{
"input": {
"clientMutationId": "String",
"driver": "DriverInput",
}
}
Example
mutation createDriver($input: CreateDriverInput!) {
createDriver(input: $input) {
clientMutationId
driver
}
}
Example response
{
"data": {
"createDriver": {
"clientMutationId": "String",
"driver": {
"externalId": "ID",
"firstName": "String",
"id": "ID",
"lastName": "String",
"phone": "Phone",
"vehicle": "Vehicle"
}
}
}
}CreateDriverTrackingEvent
Submit a driver tracking event for a specified order. Events should be sent at a maximum frequency of once every 15 seconds.
Request Arguments
Input Objects: CreateDriverTrackingEventInput
Input Object Arguments
Name | Required | Type | Description |
clientMutationId | false | String | A unique identifier for the client performing the mutation. |
coordinate | true | CoordinateInput | Latitude and longitude of the driver's location. |
deliveryId | true | ID | ID of the delivery. |
driverId | false | ID | External ID of the driver that created the event. ***PLEASE NOTE***: This input is optional now, but it will become required after all API partners have updated their integrations. Until then the argument is only required if there's multiple drivers assigned to the delivery. |
timestamp | true | ISO8601DateTime | Timestamp of event in ISO 8601 format. Provided value must be in the UTC timezone. |
Response Type
Type | Null |
CreateDriverTrackingEventPayload | true |
Variables
{
"input": {
"clientMutationId": "String",
"coordinate": "CoordinateInput",
"deliveryId": "ID",
"driverId": "ID",
"timestamp": "ISO8601DateTime",
}
}
Example
mutation createDriverTrackingEvent($input: CreateDriverTrackingEventInput!) {
createDriverTrackingEvent(input: $input) {
clientMutationId
success
}
}
Example response
{
"data": {
"createDriverTrackingEvent": {
"clientMutationId": "String",
"success": "Boolean"
}
}
}DriverDeliveryEventCreate
Submit a delivery event for a given driver and delivery.
Request Arguments
Input Objects: DriverDeliveryEventCreateInput
Input Object Arguments
Name | Required | Type | Description |
| false | String | A unique identifier for the client performing the mutation. |
| false | CoordinateInput | Latitude and longitude of the driver's location. |
| true | ID | ID of the delivery. |
| true | ID | External ID of the driver that created the event. |
| true | DriverDeliveryEvent |
|
| true | ISO8601DateTime | Timestamp of event in ISO 8601 format. Provided value must be in the UTC timezone. |
Response Type
Type | Null |
DriverDeliveryEventCreatePayload | true |
Variables
{
"input": {
"clientMutationId": "String",
"coordinate": "CoordinateInput",
"deliveryId": "ID",
"driverId": "ID",
"eventType": "DriverDeliveryEvent",
"timestamp": "ISO8601DateTime",
}
}
Example
mutation driverDeliveryEventCreate($input: DriverDeliveryEventCreateInput!) {
driverDeliveryEventCreate(input: $input) {
clientMutationId
delivery
errors
}
}
Example response
{
"data": {
"driverDeliveryEventCreate": {
"clientMutationId": "String",
"delivery": {
"cancelled": "Boolean",
"catererPickupVerification": "CatererPickupVerification",
"distance": "String",
"driverAskFor": "String",
"drivers": "Driver",
"dropoffAddress": "Address",
"eventAt": "ISO8601DateTime",
"id": "ID",
"order": "Order",
"pickupAddress": "Address",
"pickupInstructions": "String",
"priority": "DeliveryPriority",
"requestedPickupAt": "ISO8601DateTime",
"status": "DeliveryStatus",
"timeZoneIdentifier": "String"
},
"errors": "String"
}
}
}DriverDropoffVerificationCreate
Submit proof that the driver successfully dropped off the order. This should include a clear photo that shows all of the food items and the location where they were left for the customer.
Request Arguments
Input Objects: DriverDropoffVerificationCreateInput
Input Object Arguments
Name | Required | Type | Description |
| false | String | A unique identifier for the client performing the mutation. |
| true | ID | ID of the delivery. |
| true | ID | External ID of the driver assigned to the delivery. |
| true | Uri | URL of a photo showing the food items picked up by the driver. The image should clearly display all items included in the delivery to verify order completeness. The image URL must respond to an HTTP HEAD request with a 2xx status code and an image Content-Type header. |
Response Type
Type | Null |
DriverDropoffVerificationCreatePayload | true |
Variables
{
"input": {
"clientMutationId": "String",
"deliveryId": "ID",
"driverId": "ID",
"proofOfDropoffImageUrl": "Uri",
}
}
Example
mutation driverDropoffVerificationCreate($input: DriverDropoffVerificationCreateInput!) {
driverDropoffVerificationCreate(input: $input) {
clientMutationId
errors
success
}
}
Example response
{
"data": {
"driverDropoffVerificationCreate": {
"clientMutationId": "String",
"errors": "String",
"success": "Boolean"
}
}
}DriverPickupVerificationCreate
Submit proof that the driver successfully picked up the order. This verification helps confirm the order's condition at the time of pickup and that all expected items are present.
Request Arguments
Input Objects: DriverPickupVerificationCreateInput
Input Object Arguments
Name | Required | Type | Description |
| false | String | A unique identifier for the client performing the mutation. |
| true | ID | ID of the delivery. |
| true | ID | External ID of the driver assigned to the delivery. |
| false | Int | The number of packages the driver received during pickup. |
| true | Uri | URL of a photo showing the food items picked up by the driver. The image should clearly display all items included in the pickup to verify order completeness. The image URL must respond to an HTTP HEAD request with a 2xx status code and an image Content-Type header |
Response Type
Type | Null |
DriverPickupVerificationCreatePayload | true |
Variables
{
"input": {
"clientMutationId": "String",
"deliveryId": "ID",
"driverId": "ID",
"numberOfPackages": "Int",
"proofOfPickupImageUrl": "Uri",
}
}
Example
mutation driverPickupVerificationCreate($input: DriverPickupVerificationCreateInput!) {
driverPickupVerificationCreate(input: $input) {
clientMutationId
errors
success
}
}
Example response
{
"data": {
"driverPickupVerificationCreate": {
"clientMutationId": "String",
"errors": "String",
"success": "Boolean"
}
}
}DriversAssign
Assign a single driver or multiple drivers to a delivery.
Request Arguments
Input Objects: DriversAssignInput
Input Object Arguments
Name | Required | Type | Description |
| false | String | A unique identifier for the client performing the mutation. |
| true | ID | ID of the delivery. |
| true | DriverAssignmentInput | A list of drivers to be assigned to the delivery. Any existing assigned drivers will be replaced with this list. When a driver is present in both the existing assignments and this list then they can be updated with any new attributes. Providing an empty array will unassign all existing drivers from the delivery. |
Response Type
Type | Null |
DriversAssignPayload | true |
Variables
{
"input": {
"clientMutationId": "String",
"deliveryId": "ID",
"drivers": "DriverAssignmentInput",
}
}
Example
mutation driversAssign($input: DriversAssignInput!) {
driversAssign(input: $input) {
clientMutationId
delivery
}
}
Example response
{
"data": {
"driversAssign": {
"clientMutationId": "String",
"delivery": {
"cancelled": "Boolean",
"catererPickupVerification": "CatererPickupVerification",
"distance": "String",
"driverAskFor": "String",
"drivers": "Driver",
"dropoffAddress": "Address",
"eventAt": "ISO8601DateTime",
"id": "ID",
"order": "Order",
"pickupAddress": "Address",
"pickupInstructions": "String",
"priority": "DeliveryPriority",
"requestedPickupAt": "ISO8601DateTime",
"status": "DeliveryStatus",
"timeZoneIdentifier": "String"
}
}
}
}RejectDelivery
Rejects the assigned delivery initiated by our webhook; this delivery will no longer be available once rejected.
Request Arguments
Input Objects: RejectDeliveryInput
Input Object Arguments
Name | Required | Type | Description |
| false | String | A unique identifier for the client performing the mutation. |
| true | ID | ID of the delivery that is getting rejected |
Response Type
Type | Null |
RejectDeliveryPayload | true |
Variables
{
"input": {
"clientMutationId": "String",
"deliveryId": "ID",
}
}
Example
mutation rejectDelivery($input: RejectDeliveryInput!) {
rejectDelivery(input: $input) {
}
}
Example response
{
"data": {
"rejectDelivery": {
}
}
}UnassignDriver
Unassign a driver from an accepted delivery.
Request Arguments
Input Objects: UnassignDriverInput
Input Object Arguments
Name | Required | Type | Description |
| false | String | A unique identifier for the client performing the mutation. |
| true | ID | ID of the delivery to unassign from |
| true | ID | External ID of the driver to unassign. |
Response Type
Type | Null |
UnassignDriverPayload | true |
Variables
{
"input": {
"clientMutationId": "String",
"deliveryId": "ID",
"driverId": "ID",
}
}
Example
mutation unassignDriver($input: UnassignDriverInput!) {
unassignDriver(input: $input) {
}
}
Example response
{
"data": {
"unassignDriver": {
}
}
}UpdateDriver
Update the details of a driver.
Request Arguments
Input Objects: AcceptDeliveryInput
Input Object Arguments
Name | Required | Type | Description |
| false | String | A unique identifier for the client performing the mutation. |
| true | DriverInput | Input object for updating a driver |
| true | ID | External ID of the driver to unassign. |
Response Type
Type | Null |
UpdateDriverPayload | true |
Variables
{
"input": {
"clientMutationId": "String",
"driver": "DriverInput",
"driverId": "ID",
}
}
Example
mutation updateDriver($input: UpdateDriverInput!) {
updateDriver(input: $input) {
}
}
Example response
{
"data": {
"updateDriver": {
}
}
}