Update a Delivery
updateDelivery
Mutation
After the delivery is created with bookDelivery
you can update the following properties on
the delivery at any point:
- deliveryMeta (poNumber, orderNumber, dropoffNote, pickupNote)
- dropoffContact
- pickupContact
- pointOfContact
This mutation will replace the previous information on the delivery. Passing in null values will nullify any previously set values, and undefined values
Example Mutation
mutation {
updateDelivery(data: {
id: "del_CVNDR5F59Y",
deliveryMeta: {
poNumber: "12",
orderNumber: "23",
pickupNote: "STUFF"
},
dropoffContact: {
name: "Joe",
phoneNumber: "15053213265XXXX"
},
}) {
id
distance
price
}
}
Response
attribute | description |
---|---|
id | id of the delivery |
price | the fee for the delivery in cents |
Response Body
{
"data": {
"updateDelivery": {
"id": "del_CVNDR5F59Y",
"distance": "913",
"price": "1219"
}
}
}