Skip to main content

Courier Schema Reference

Courier Schema Reference

Objects

CourierAssignPayload

Return type of CourierAssign.

Field Name

Description

clientMutationId: String

A unique identifier for the client performing the mutation.

delivery: Delivery

The delivery where the courier was assigned.

The list of errors that happened from executing the mutation.

Example

{
"clientMutationId": "your-mutation-id",
"delivery": {
"id": "ezcater-delivery-id"
},
"userErrors": [CourierAssignUserError!]
}

CourierEventCreatePayload

Return type of CourierEventCreate.

Field Name

Description

clientMutationId: String

A unique identifier for the client performing the mutation.

delivery: Delivery

The delivery where the courier was assigned.

The list of errors that happened from executing the mutation.

Example

{
"clientMutationId": "your-mutation-id",
"delivery": {
"id": "ezcater-delivery-id"
},
"userErrors": [CourierAssignUserError!]
}

CourierImagesCreatePayload

Return type of CourierImagesCreate.

Field Name

Description

clientMutationId: String

A unique identifier for the client performing the mutation.

The list of errors that happened from executing the mutation.

Example

{
"clientMutationId": "your-mutation-id",
"userErrors": [CourierAssignUserError!]
}

CourierTrackingEventCreatePayload

Return type of CourierTrackingEventCreate.

Field Name

Description

clientMutationId: String

A unique identifier for the client performing the mutation.

The list of errors that happened from executing the mutation.

Example

{
"clientMutationId": "your-mutation-id",
"userErrors": [CourierAssignUserError!]
}

CourierUnassignPayload

Return type of CourierAssign.

Field Name

Description

clientMutationId: String

A unique identifier for the client performing the mutation.

delivery: Delivery

The delivery where the courier was assigned.

The list of errors that happened from executing the mutation.

Example

{
"clientMutationId": "your-mutation-id",
"delivery": {
"id": "ezcater-delivery-id"
},
"userErrors": [CourierAssignUserError!]
}

CouriersAssignPayload

Return type of CouriersAssign.

Field Name

Description

clientMutationId: String

A unique identifier for the client performing the mutation.

delivery: Delivery

The delivery where the courier was assigned.

The list of errors that happened from executing the mutation.

DeliveryValidationError

A validation error, with a user-friendly message, that occurred while executing the mutation.

Field Name

Description

message: String!

A description of the error.

A path to the input value that caused the error.

Example

{
"message": "It's too early to add the event for courier en route to pickup",
"path": [
"input",
"occurredAt"
]
}

InputObjects

CoordinatesInput

The latitude and longitude of where the event occurred by the courier.

Field Name

Description

latitude: Float!

The coordinate's latitude value.

longitude: Float!

The coordinate's longitude value.

Example

{
"latitude": 42.360081,
"longitude": -71.058884
}

CourierAssignInput

The input object for mutation CourierAssign.

Field Name

Description

allowMultipleCouriers: Boolean

When true, the provided courier input will be added to the delivery's existing assigned couriers without removing any current assignments. When false or omitted, any pre-existing assigned couriers for the delivery will be replaced by the provided courier input.

clientMutationId: String

A unique identifier for the client performing the mutation.

courier: CourierInput!

The details of the courier that's being assigned. When provided details of a courier that doesn't exist, then the courier will be created. When provided details of an existing courier, then the courier will be updated to match the input if there's new or changed attributes.

deliveryId: ID!

The globally-unique identifier of the delivery.

DEPRECATED deliveryServiceProvider: String!

DEPRECATED The delivery platform that is providing the courier. For example, DoorDash, Uber, etc. This is only used for internal tracking and the information is not presented to the the customer. Replaced by arguments: courier.providerSource[relink] and courier.providerName[relink]

Example

{
"clientMutationId": "your-mutation-id",
"courier": CourierInput,
"deliveryId": "ezcater-delivery-id",
"occurredAt": "2024-02-05T17:27:55+0000"
}

CourierAssignmentInput

The input fields for creating or updating a delivery courier and its assignment to the delivery.

Field Name

Description

id: ID!

The unique identifier for the courier. This is used to determine whether the courier exists in the system. If the courier does not exist then it can be created, if it does exist then it can be updated.

firstName: String

The courier's first name.

lastName: String

The courier's last name.

phone: String

The phone number of the courier. Formatted using E.164 standard. For example, +16175551234.

providerName: String

The name of the third-party service that's fulfilling the delivery. This is required when the providerSource is THIRD_PARTY.

providerSource: CourierProviderSource!

Whether the courier is in-house or from a third-party service.

The details on the courier's vehicle for the delivery.

CourierEventCreateInput

The input object for mutation CourierEventCreate.

Field Name

Description

clientMutationId: String

A unique identifier for the client performing the mutation.

coordinates: CoordinatesInput

The latitude and longitude of where the event occurred by the courier.

DEPRECATED courier: CourierInput

DEPRECATED The details of the assigned courier that submitted the event. When provided details of a courier that doesn't exist, then the courier will be created. When provided details of an existing courier, then the courier will be updated to match the input if there's new or changed attributes. The courier will be assigned to the delivery if they're not already, which unassigns any existing courier.

courierId: ID

Replaces argument: courier. Courier creation, updating, and assignment changes should now be performed using the courierAssign or couriersAssign mutations. If the courier for the provided courierId has not yet been created or is not assigned, then an execution error will be returned.

deliveryId: ID!

The globally-unique identifier of the delivery.

eventType: CourierEventCreateInputEventType! [relink]

The type of event by the courier for the delivery.

occurredAt: ISO8601DateTime! [relink]

The date and time (ISO 8601 format) when the event happened.

Example

{
"clientMutationId": "your-mutation-id",
"coordinates": Coordinates,
"courier": CourierInput,
"deliveryId": "ezcater-delivery-id",
"eventType": "EN_ROUTE_TO_PICKUP",
"occurredAt": "2024-02-05T17:27:55+0000"
}

CourierImagesCreateInput

The input object for mutation CourierImagesCreate.

Field Name

Description

clientMutationId: String

A unique identifier for the client performing the mutation.

DEPRECATED courier: CourierInput

DEPRECATED The details of the assigned courier that submitted the event. When provided details of a courier that doesn't exist, then the courier will be created. When provided details of an existing courier, then the courier will be updated to match the input if there's new or changed attributes. The courier will be assigned to the delivery if they're not already, which unassigns any existing courier.

courierId: ID

Replaces argument: courier. Courier creation, updating, and assignment changes should now be performed using the courierAssign or couriersAssign mutations. If the courier for the provided courierId has not yet been created or is not assigned, then an execution error will be returned.

deliveryId: ID!

The globally-unique identifier of the delivery.

imageUrls: [String!]!

A list of remote image URLs. Each URL must respond to an HTTP HEAD request with a 2xx status code and an image Content-Type header.

Example

{
"clientMutationId": "your-mutation-id",
"courier": CourierInput,
"deliveryId": "ezcater-delivery-id",
"imageUrls": ["https://your-courier-company.com/your-courier-id-delivery.jpg"]
}

CourierInput

The details of the assigned courier that submitted the event. When provided details of a courier that doesn't exist, then the courier will be created. When provided details of an existing courier, then the courier will be updated to match the input if there's new or changed attributes. The courier will be assigned to the delivery if they're not already, which unassigns any existing courier.

Field Name

Description

id: ID!

The unique identifier for the courier. This is used to determine whether the courier exists in the system. If the courier does not exist then it can be created, if it does exist then it can be updated.

firstName: String

The courier's first name. This is required for new couriers.

lastName: String

The courier's last name. This is required for new couriers.

phone: String

The phone number of the courier. Formatted using E.164 standard. For example, +16175551234. This is required for new couriers.

providerName: String

The name of the third-party service that's fulfilling the delivery. This is required when the providerSource is THIRD_PARTY.

providerSource: CourierProviderSource

Whether the courier is in-house or from a third-party service.

The details on the courier's vehicle for the delivery

Example

{
"id": "your-courier-id",
"firstName": "Test",
"lastName": "Courier",
"phone": "+15555555555",
"providerSource": "THIRD_PARTY",
"providerName": "DoorDash",
"vehicle": CourierVehicleInput
}

CourierTrackingEventCreateInput

The input object for mutation CourierTrackingEventCreate.

Field Name

Description

clientMutationId: String

A unique identifier for the client performing the mutation.

coordinates: CoordinatesInput

The latitude and longitude of where the event occurred by the courier.

DEPRECATED courier: CourierInput

DEPRECATED The details of the assigned courier that submitted the event. When provided details of a courier that doesn't exist, then the courier will be created. When provided details of an existing courier, then the courier will be updated to match the input if there's new or changed attributes. The courier will be assigned to the delivery if they're not already, which unassigns any existing courier.

courierId: ID

Replaces argument: courier. Courier creation, updating, and assignment changes should now be performed using the courierAssign or couriersAssign mutations. If the courier for the provided courierId has not yet been created or is not assigned, then an execution error will be returned.

deliveryId: ID!

The globally-unique identifier of the delivery.

occurredAt: ISO8601DateTime!

The date and time (ISO 8601 format) when the event happened.

Example

{
"clientMutationId": "your-mutation-id",
"coordinates": Coordinates,
"courier": CourierInput,
"deliveryId": "ezcater-delivery-id",
"occurredAt": "2024-02-05T17:27:55+0000"
}

CourierUnassignInput

The input fields for mutation CourierUnassign.

Field Name

Description

clientMutationId: String

A unique identifier for the client performing the mutation.

DEPRECATED courier: CourierInput

DEPRECATED The details of the courier that's being assigned. When provided details of a courier that doesn't exist, then the courier will be created. When provided details of an existing courier, then the courier will be updated to match the input if there's new or changed attributes.

courierId: ID

Replaces argument: courier. Courier creation, updating, and assignment changes should now be performed using the courierAssign or couriersAssign mutations. If the courier for the provided courierId has not yet been created or is not assigned, then an execution error will be returned.

deliveryId: ID!

The globally-unique identifier of the delivery.

Example

{
"clientMutationId": "your-mutation-id",
"courier": CourierInput,
"deliveryId": "ezcater-delivery-id"
}

CourierVehicleInput

The input fields for specifying a delivery courier's vehicle.

Field Name

Description

make: String

The vehicle's make. For example, Ford.

model: String

The vehicle's model.

color: String

The vehicle's color.

Example

{
"make": "Your Vehicle Make",
"model": "Your Vehicle Model",
"color": "Your Vehicle Color"
}

CouriersAssignInput

The input fields for mutation CouriersAssign.

Field Name

Description

clientMutationId: String

A unique identifier for the client performing the mutation.

A list of couriers to be assigned to the delivery. Each courier will be created or updated with the provided details. Any existing assignments will be replaced with the provided list. Providing an empty list will remove all couriers from the delivery.

deliveryId: ID!

The globally-unique identifier of the delivery.

Inputs

Delivery

The identifier representing an ezCater delivery.

Field Name

Description

id: ID!

A globally-unique identifier of the delivery.

Example

{
"id": "ezcater-delivery-id"
}

Unions

CourierAssignUserError

Field Name

Description

CourierAssignUserError: DeliveryValidationError

List of UserErrors for CourierAssign

CourierEventCreateUserError

Field Name

Description

CourierEventCreateUserError: DeliveryValidationError

List of UserErrors for CourierEventCreate

CourierImagesCreateUserError

Field Name

Description

CourierImagesCreateUserError: DeliveryValidationError

List of UserErrors for CourierImagesCreate

CourierTrackingEventCreateUserError

Field Name

Description

CourierTrackingEventCreateUserError: DeliveryValidationError

List of UserErrors for CourierTrackingEventCreate

CourierUnassignUserError

Field Name

Description

CourierUnassignUserError: DeliveryValidationError

List of UserErrors for CourierUnassign

Enums

CourierEventCreateInputEventType

The status by the courier that describes the current state of the delivery lifecycle.

Enum Name

Description

ARRIVED_AT_DROPOFF

The courier has arrived at the dropoff location.

ARRIVED_AT_PICKUP

The courier has arrived at the location to pickup the delivery.

DROPPED_OFF

The courier has dropped off the delivery.

EN_ROUTE_TO_DROPOFF

The courier is on their way to the dropoff location.

EN_ROUTE_TO_PICKUP

The courier is on their way to pickup the delivery.

PICKED_UP

The courier has picked up the delivery.

CourierProviderSource

Specifies whether a delivery is being fulfilled through self-delivery or from an external third-party service.

Enum name

Description

IN_HOUSE

The delivery is being fulfilled through self-delivery with an in-house courier.

THIRD_PARTY

The delivery is being fulfilled by a third-party service.

Scalars

BigInt

Represents non-fractional signed whole numeric values. Since the value may exceed the size of a 32-bit integer, it's encoded as a string.

Boolean

The Boolean scalar type represents true or false.

Date

ISO-8601 Date-only string, e.g. 2017-12-14

Float

The Float scalar type represents signed double-precision fractional values as specified by IEEE 754.

ID

The ID scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4") or integer (such as 4) input value will be accepted as an ID.

ISO8601DateTime

An ISO 8601-encoded datetime @specifiedBy(url: https://tools.ietf.org/html/rfc3339).

Int

The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.

JSON

Represents untyped JSON.

String

The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

UTCTimestamp

iso8601 formatted date & timestamp in UTC.

UUID

Universally unique identifier as defined by RFC 4122.

Did this answer your question?