All the details of a booking can be modified using this API method, however an update request and a cancellation request will both fail if the booking status has reached or passed status #3 – On Route To Pickup;

  1. Unassigned – Your new booking is being offered to couriers, and a courier will be allocated shortly.
  2. Accepted – Booking has been accepted by a courier
  3. On Route to Pickup – Courier is heading towards the pick up location
  4. Picked up – Courier has picked up the parcel
  5. On Route to Dropoff – Courier has the parcel and is heading to the drop off location
  6. Tried to deliver – Parcel has attempted to be delivered. Contact courier or Zoom2u for redelivery options.
  7. Dropped Off – Booking is complete!

There are 3 other statuses that aren’t part of a standard booking flow, but may still occur on occasion.
A booking cannot be updated or cancelled in any of these status’ either, and an error message will be returned if attempted.

  • Cancelled – The booking has been cancelled
  • Returning – The booking has been requested to be returned to the pickup location.
  • Returned – The booking has been returned to the pickup location. Usually due to failed delivery or by request.
  • On Hold - With Courier – The booking has been paused temporarily.

 

Request

Endpoint

MethodEndpointNotes
POSThttps://api.zoom2u.com/api/v1/delivery/update/{reference}{reference} is the Zoom2u booking reference that would have been provided in the HTTP Response when the booking was created.
Requires delivery, pickup, and drop off information to be provided.

Example: https://api.zoom2u.com/api/v1/delivery/update/T20200101999999

Request Headers

{
  "Authorization" : "Bearer your-token-goes-here",
  "Content-Type"  : "application/json"
}

You will need to retrieve the bearer token by logging into your customer account and navigating to the “My Account” section.
There is a short guide here on how to access that information!

Note: This is a secret key and links to your account. For your own security, please do not share it or expose the key publicly.

Body

The elements required for updating a booking are the same ones that are used to request a quote or to create a new booking.

Do note that ALL fields are required to be submitted, even if some of the values are unchanged.
 
 

Response

The result of the request will usually be a HTTP status code 200 (OK), along with the regular response data (the same response format as for creating a booking).
However, you will receive a HTTP 400 (Bad Request) if you attempt to modify the booking if the status has passed the “On Route to Pick up” stage.

Note: The price may have changed if you have modified the pickup or dropoff addresses, the VehicleType, or DeliverySpeed.
Modifying the contact details of the pickup or dropoff will not alter the price.

There are 4 possible responses when creating a booking;

  1. Successful requests will return a booking reference, a price confirmation, and a unique tracking URL.
  2. If the booking is already in progress, an error response will be sent.
  3. If mandatory information is missing from the request, the response will indicate which fields need to be filled in.
  4. If there are issues unrelated to the submitted data

Success

NameTypeDescription
referenceStringThe booking reference number for the booking in our system.

This will be crucial for referencing the booking in further API calls.
priceDecimalDollar value of the booking (local currency)
tracking-linkStringURL sent to the customer and the recipient to track the location of the driver and the delivery.
trackingCodeStringUnique tracking code
{
    "reference": "Z20180101999999",
    "price": 42.0,
    "tracking-link": "https://track.zoom2u.com/A1B2C3D4E",
    "trackingCode": "A1B2C3D4E"
}

Error – Booking In Progress.

If the booking cannot be cancelled because it is already in progress:

{
    "error-code": "TOOLATE",
    "message": "The booking cannot be modified after its status has passed On Route to Pickup"
}

 

Error – Information missing from the request.

If the booking is missing critical information, the response will indicate which information is missing.
The elements required for updating a booking are the same ones that are used to request a quote or to create a new booking.

NameLocationTypeDescription
messageBodyStringShort error message
modelStateBodyObject / ArrayCollection of erroneous fields
getQuoteRequestmodelStateStringSpecific field that is missing.
Note: There can be multiple entries if multiple fields are missing.

{
  "message": "The request is invalid.",
  "modelState": {
    "getQuoteRequest.Pickup.Suburb":   [ "The Suburb field is required." ],
    "getQuoteRequest.Pickup.Postcode": [ "The Postcode field is required." ],
  }
}

 

Other issues and troubleshooting

  • If the reference value can’t be found in our system, a 404 error will be displayed.
  • An update request and a cancellation request will both fail if the booking status has reached or passed status #3 – On Route To Pickup
    1. Unassigned – Your new booking is being offered to couriers, and a courier will be allocated shortly.
    2. Accepted – Booking has been accepted by a courier
    3. On Route to Pickup – Courier is heading towards the pick up location
    4. Picked up – Courier has picked up the parcel
    5. On Route to Dropoff – Courier has the parcel and is heading to the drop off location
    6. Tried to deliver – Parcel has attempted to be delivered. Contact courier or Zoom2u for redelivery options.
    7. Dropped Off – Booking is complete!

    There are 3 other statuses that aren’t part of a standard booking flow, but may still occur on occasion.
    A booking cannot be updated or cancelled in any of these status’ either, and an error message will be returned if attempted.

    • Cancelled – The booking has been cancelled
    • Returned – The booking has been returned to the pickup location. Usually due to failed delivery or by request.
    • On Hold - With Courier – The booking has been paused temporarily.

 

Other issues

HTTP Status CodeMeaningDescriptionTroubleshooting
400Bad RequestThe server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).- Check the request syntax!
401UnauthorisedThe request has not been applied because it lacks valid authentication credentials for the target resource.- Check the bearer token is valid and has been submitted correctly.
- Check the url is correct
403ForbiddenThe server understood the request but refuses to authorize it.
404Not foundThe origin server did not find a current representation for the target resource or is not willing to disclose that one exists.- Check the endpoint URL to make sure it is correct.
415Unsupported media TypeThe origin server is refusing to service the request because the payload is in a format not supported by this method on the target resource.- Check the Content-Type field has been correctly assigned
- Check the syntax of the body data is correct, and is of the same language as the Content-Type tag