Skip to main content

Book a Delivery

The Delivery Response Object

The Delivery type implements the ExternalIDProvider interface and is used to represent a delivery with various information such as status, distance, events, and contacts.

Response Fields

The following fields can be requested:

FieldTypeDescription
accountIdIDCustomScalarThe custom scalar ID associated with the account for the delivery.
attachments[DeliveryAttachment]An array of delivery attachments.
canceledAtDateTimeCustomScalarThe date and time when the delivery was canceled.
createdAtDateTimeCustomScalarThe date and time when the delivery was created.
declaredValueIntThe declared value of the items in the delivery.
deletedAtDateTimeCustomScalarThe date and time when the delivery was deleted.
deliveredAtDateTimeCustomScalarThe date and time when the delivery was completed.
deliveryImages[DeliveryImage]An array of delivery images.
deliveryMetaDeliveryMetaThe metadata associated with the delivery.
deliveryMethodStringThe method used for the delivery.
deliveryMethodDisplayNameStringThe display name of the delivery method.
deliveryQuoteIdIDCustomScalarThe custom scalar ID associated with the delivery quote.
deliveryRequirementsDeliveryRequirementsThe requirements for the delivery.
deliveryStatusDeliveryStatusThe current status of the delivery.
destinationAddressThe destination address for the delivery.
distanceStringThe total distance of the delivery.
driverDriverThe driver responsible for the delivery.
dropoffContactDeliveryContactThe contact information for the dropoff location.
estimatedTravelTimeStringThe estimated travel time for the delivery.
idIDCustomScalarThe custom scalar ID associated with the delivery.
isApiBooleanIndicates if the delivery was created using an API.
isSandboxBooleanIndicates if the delivery was created in a sandbox environment.
manifestItems[ManifestItem]An array of manifest items in the delivery.
originAddressThe origin address for the delivery.
pickupContactDeliveryContactThe contact information for the pickup location.
pointOfContactDeliveryContactThe point of contact for the delivery.
priceStringThe price of the delivery.
priorityStringThe priority level of the delivery.
quoteIdStringThe ID associated with the delivery quote.
receivedByStringThe name of the person who received the delivery.
receivedBySignatureUrlStringThe URL of the signature image of the person who received the delivery.
scheduledAtDateTimeCustomScalarThe date and time when the delivery was scheduled.
trackingIdStringThe tracking ID associated with the delivery.
trackingUrlStringThe URL for tracking the delivery.

bookDelivery Query

There are two ways to book a delivery:

  1. Use the deliveryQuoteId generated from deliveryQuotes or deliveryQuote.
  2. Pass the parameters you would have passed to deliveryQuotes along with skipQuote: true.

Both options allow you to book a delivery. You can include as many or as few contacts as you wish, such as dropoffContact, pickupContact, and pointOfContact.

It is recommended to have at least one contact for the delivery.

If you want to include additional delivery-related information, you can use the customerData object within deliveryMeta. This can include reference numbers, contact details, or tracking information.

Required Input Parameters

ParameterTypeDescription
deliveryMethodStringThe delivery method to be used for the booking.
destinationAddressInputAn object containing the address information for the delivery destination.
manifestItems[ManifestItemInput]An array of objects containing information about the items to be delivered.
originAddressInputAn object containing the address information for the delivery origin.

Optional Input Parameters

ParameterTypeDescription
accountIdIDCustomScalarThe ID of the Team Account associated with the delivery booking.
attachments[DeliveryAttachmentInput]A list of attachments related to the delivery.
declaredValueIntThe declared value of the items to be delivered.
deliveryMetaDeliveryMetaInputAdditional metadata associated with the delivery.
deliveryQuoteIdStringThe ID of the delivery quote associated with the booking.
dropoffContactDeliveryContactInputThe contact information for the dropoff location.
pickupContactDeliveryContactInputThe contact information for the pickup location.
pointOfContactDeliveryContactInputThe point of contact for the delivery.
preserveWalletBalanceBooleanIndicates whether the wallet balance should be preserved during the booking process.
priorityStringThe priority level for the delivery.
requirementsRequirementsInputAny additional requirements for the delivery.
scheduledAtStringThe scheduled time for the delivery.
skipQuoteBooleanIndicates whether the quote should be skipped during the booking process.

Team Account ID

If your user has purview and permission over many Subteams and would like to specify which Team Account specifically to book the delivery under, you can provide an optional accountId. If this is not provided, the delivery will be booked under the user's Default Team Account. NOTE: the provided quote needs to have been generated using the same accountId.

Book with a DeliveryQuote

To use an existing delivery quote from our API, pass it into to your mutation in the deliveryQuoteId field.

Book without a quote

You may omit a deliveryQuoteId by passing in the field skipQuote: true

Example Mutation

mutation {
bookDelivery(
data: {
deliveryQuoteId: "quote_B34GCPGNX3" # STRING (optional, if using `skipQuote: true`)
accountId: "acct_ABC123" # STRING (optional, user's Default Team Account used if not provided)
dropoffContact: {
name: "Bob Jones" # STRING (optional)
phoneNumber: "5553213265" # STRING (optional)
}
pickupContact: {
name: "Alice Khan" # STRING (optional)
phoneNumber: "5553213264" # STRING (optional)
}
pointOfContact: {
name: "Carlos Lee" # STRING (optional)
phoneNumber: "5553213263" # STRING (optional)
}
deliveryMeta: {
poNumber: "12" # STRING (optional)
orderNumber: "23" # STRING (optional)
pickupNote: "STUFF" # STRING (optional)
customerData: { trackingNumber: "ABC123", myFavoriteNumber: 7 } # JSON (optional)
}
manifestItems: [
{
height: 5 # INT (cm)
width: 5 # INT (cm)
length: 100 # INT (cm)
weight: 1 # INT (kg)
quantity: 1 # INT
description: "This is a small pipe" # STRING
}
]
}
) {
id # STRING
price # INT (cents)
deliveryMethod # STRING
trackingUrl # STRING
createdAt # STRING (timestamp with timezone)
}
}

Scheduling Pickups

You can schedule a pickup for Same Day and Scheduled deliveries by providing scheduledAt. For Same Day service, scheduledAt represents the earliest time when the delivery will be ready for pickup.

caution
  • For Scheduled Deliveries, Curri currently only offers a pickup time and not a guaranteed deliver by time.
  • For Same Day Deliveries, pickups can only be scheduled as late as 12:00pm local time.

Example Mutation

mutation {
bookDelivery(
data: {
skipQuote: true
origin: {
name: "305 South Kalorama Street"
addressLine1: "305 S Kalorama St"
addressLine2: ""
city: "Ventura"
state: "CA"
postalCode: "93001"
}
destination: {
name: "1129 Poli Street"
addressLine1: "1129 Poli St"
addressLine2: ""
city: "Ventura"
state: "CA"
postalCode: "93001"
}
dropoffContact: { name: "Bob Jones", phoneNumber: "5553213265" }
pickupContact: { name: "Alice Khan", phoneNumber: "5553213264" }
pointOfContact: { name: "Carlos Lee", phoneNumber: "5553213263" }
priority: "scheduled"
scheduledAt: "2022-08-16T12:00:00Z"
deliveryMethod: "truck"
manifestItems: [
{
height: 5
width: 5
length: 100
weight: 1
quantity: 1
description: "This is a small pipe"
}
]
}
) {
id
price
deliveryMethod
trackingUrl
createdAt
}
}