Public API
Delivery API
Courier Tracking Event Create
8min
creating courier tracking events when couriers are out for delivery, it is important to understand exactly where the courier is so that the appropriate parties have an accurate idea of how the delivery is progressing this information can be used to provide a tracking status and also give us insight into delivery events that are taking place event if an explicit event has not been provided 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 couriertrackingeventcreate($input couriertrackingeventcreateinput!) { couriertrackingeventcreate(input $input) { clientmutationid usererrors { on deliveryvalidationerror { message path } } } } variables variables { "input" { "clientmutationid" "your mutation id", "coordinates" { "latitude" 42 360081, "longitude" 71 058884 }, "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", "occurredat" "2024 02 05t17 27 55+0000" } } arguments argument name description input courier schema reference docid 7gv344rnwmuoknj9u4rw7 the input object for creating a new menu return type returns a courier schema reference docid 7gv344rnwmuoknj9u4rw7 success responses when the couriertrackingeventcreate mutation succeeds you can expect the response payload to look like response { "data" { "couriertrackingeventcreate" { "clientmutationid" "your mutation id", "usererrors" \[] } } } failure responses user errors when the couriertrackingeventcreate mutation fails because it is too early to add courier events you can expect the response payload to look like response too early { "data" { "couriertrackingeventcreate" { "clientmutationid" "your mutation id", "usererrors" \[ { "message" "it's too early to add the event for courier en route to pickup", "path" \[ "input", "occurredat" ] } ] } } } response too late { "data" { "couriertrackingeventcreate" { "clientmutationid" "your mutation id", "usererrors" \[ { "message" "delivery cannot receive updates 2 hours past its event time", "path" \[ "input", "deliveryid" ] } ] } } } 400 bad request when the couriertrackingeventcreate 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" } } ] }