Skip to main content

Courier Image Create

Creating Delivery Images

Upon completion of a delivery, providing an image of the food having securely arrived at the delivery site is important. Delivery images allow both customer(s) and partner(s) to confirm that everything that was ordered arrived safely, and provides a rough indication of where the courier delivered the food and in what state it arrived.

If you already had a courier assigned to a delivery and are now assigning a new courier, we automatically take care of un-assigning the previous courier

Mutation

Mutation

mutation CourierImagesCreate($input: CourierImagesCreateInput!) {
courierImagesCreate(input: $input) {
clientMutationId
userErrors {
... on DeliveryValidationError {
message
path
}
}
}
}

Variables

Variables

{
"input": {
"clientMutationId": "your-mutation-id",
"courier": {
"id": "your-courier-id",
"firstName": "Test",
"lastName": "Courier",
"phone": "+15555555555",
"vehicle": {
"make": "Your Vehicle Make",
"model": "Your Vehicle Model",
"color": "Your Vehicle Color"
}
},
"deliveryId": "ezcater-delivery-id",
"imageUrls": ["https://your-courier-company.com/your-courier-id-delivery.jpg"]
}
}

Arguments

Argument Name

Description

The Input object for creating a new menu.

Return Type

Success Responses

Response

{
"data": {
"courierImagesCreate": {
"clientMutationId": "your-mutation-id",
"userErrors": []
}
}
}

Failure Responses

400 Bad Request

When the courierImagesCreate mutation fails due to bad user input, such as an invalid field, you can expect a HTTP 400 Bad Request and the response payload to look like:

Response

{
"errors": [
{
"message": "Variable \"$input\" got invalid value { clientMutationId: \"your-mutation-id\", coordinates: { latitude: 42.360081, longitude: -71.058884 }, courier: { id: \"your-courier-id\", firstName: \"Test\", lastName: \"Courier\", phone: \"+15555555555\", vehicle: [Object] }, deliveryId: \"your-ezcater-delivery-id\", eventType: \"PICKED_UP\", occurredAt: \"2025-05-07T19:52:32.841Z\" }; Field \"eventType\" is not defined by type \"CourierTrackingEventCreateInput\".",
"extensions": {
"code": "BAD_USER_INPUT"
}
}
]
}

Response

{
"errors": [
{
"message": "Variable \"$input\" got invalid value null at \"input.imageUrls\"; Expected non-nullable type \"[String!]!\" not to be null.",
"extensions": {
"code": "BAD_USER_INPUT"
}
}
]
}
Did this answer your question?