Example Flow
Summary
Our customers will use the Zoom2u API at various stages of the delivery process.
Sometimes a full end-to-end solution is required, and sometimes only 1 or 2 calls will be required.
Below is a full end-to-end example of how multiple systems can talk to each other, and the status progression of a Zoom2u booking.
Each and every request made to our API will need to provide the appropriate 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.
Generate Quote
More information, and a complete breakdown, on how to generate quotes can be found here: Request a quote.
Endpoint
Method | Endpoint | Notes |
---|---|---|
POST | https://api.zoom2u.com/api/v1/delivery/quote | Requires delivery, pickup, and drop off information to be provided. |
Request
{ "PurchaseOrderNumber":"ABCD1234", "PackageDescription": "1 box with some cakes", "ReadyDateTime": "2020-12-24T10:20:00.06Z", "VehicleType": "Car", "PackageType": "Box", "Pickup": { "ContactName": "John Smith", "Email": "test@test.com", "Phone": "0000 0000", "UnitNumber": "", "StreetNumber": "123", "Street": "Main St", "Suburb": "North Sydney", "State": "NSW", "Postcode": "2000", "Country": "Australia", "Notes" : "" }, "Dropoff": { "ContactName": "Jane Smith", "Email": "test@test.com", "Phone": "0000 0000", "UnitNumber": "ACME Co.", "StreetNumber": "123", "Street": "Main St", "Suburb": "North Sydney", "State": "NSW", "Postcode": "2000", "Country": "Australia", "Notes" : "" } }
Response
Success:
Example of deliveryspeed
submitted as Same day
or 3 hour
:
{ "deliverySpeed": "Same day", "price": 42.0, "deliveredBy": "2020-12-24T11:20:00Z", }
Example of deliveryspeed
submitted as VIP
:
{ "deliverySpeed": "VIP", "price": 42.0, "deliveredBy": "2020-12-24T11:20:00Z", "earliestPickupEta": "2020-12-24T11:20:00Z", "earliestDropEta": "2020-12-24T11:20:00Z" }
Example of deliveryspeed
submitted as ""
:
[ { "deliverySpeed": "Same day", "price": 68, "deliveredBy": "2020-12-25T06:00:00Z" }, { "deliverySpeed": "Same day", "price": 68, "deliveredBy": "2020-12-25T09:30:00Z" }, { "deliverySpeed": "3 hour", "price": 86, "deliveredBy": "2020-12-25T01:00:00Z" }, { "deliverySpeed": "VIP", "price": 159, "deliveredBy": "2020-12-24T11:20:00Z" } ]
If information is missing:
{ "message": "The request is invalid.", "modelState": { "getQuoteRequest.Pickup.Suburb": [ "The Suburb field is required." ], "getQuoteRequest.Pickup.Postcode": [ "The Postcode field is required." ], } }
Create Booking
More information, and a complete breakdown, on how to create individual bookings can be found here: Create a booking.
Endpoint
Method | Endpoint | Notes |
---|---|---|
POST | https://api.zoom2u.com/api/v1/delivery/create | Requires delivery, pickup, and drop off information to be provided. |
Request
{ "PurchaseOrderNumber":"ABCD1234", "PackageDescription": "1 box with some cakes", "ReadyDateTime": "2020-12-24T10:20:00.06Z", "VehicleType": "Car", "PackageType": "Box", "Pickup": { "ContactName": "John Smith", "Email": "test@test.com", "Phone": "0000 0000", "UnitNumber": "", "StreetNumber": "123", "Street": "Main St", "Suburb": "North Sydney", "State": "NSW", "Postcode": "2000", "Country": "Australia", "Notes" : "" }, "Dropoff": { "ContactName": "Jane Smith", "Email": "test@test.com", "Phone": "0000 0000", "UnitNumber": "ACME Co.", "StreetNumber": "123", "Street": "Main St", "Suburb": "North Sydney", "State": "NSW", "Postcode": "2000", "Country": "Australia", "Notes" : "" } }
Response
Success:
{ "reference": "Z20180101999999", "price": 42.0, "tracking-link": "https://track.zoom2u.com/A1B2C3D4E", "trackingCode": "A1B2C3D4E" }
If information is missing:
{ "message": "The request is invalid.", "modelState": { "getQuoteRequest.Pickup.Suburb": [ "The Suburb field is required." ], "getQuoteRequest.Pickup.Postcode": [ "The Postcode field is required." ], } }
Get Status
More information, and a complete breakdown, on how to request the current status of a booking, head here: Get booking status.
Endpoint
Method | Endpoint | Notes |
---|---|---|
GET | https://api.zoom2u.com/api/v1/delivery/status/{reference} | {reference} is the Zoom2u booking reference that would have been provided in the HTTP Response when the booking was created. |
Request
The body of the request should be left empty.
Response
{ "reference": "Z20190101123456", "status": "Dropped Off", "statusChangeDateTime": "2018-11-12T10:29:16.867Z", "purchaseOrderNumber": "", "tracking-link": "https://deliveries.zoom2u.com/EMPQ28I5J", "proofOfDeliveryPhotoUrl": null, "courier": { "id": "1234", "name": "Test Courier", "phone": "02 1234 5678" } }
Update booking information
More information, and a complete breakdown, on how to update the details of a booking, head here: Update booking information.
Endpoint
Method | Endpoint | Notes |
---|---|---|
POST | https://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. |
Request
{ "PurchaseOrderNumber":"ABCD1234", "PackageDescription": "1 box with some cakes", "ReadyDateTime": "2020-12-24T10:20:00.06Z", "VehicleType": "Car", "PackageType": "Box", "Pickup": { "ContactName": "John Smith", "Email": "test@test.com", "Phone": "0000 0000", "UnitNumber": "", "StreetNumber": "123", "Street": "Main St", "Suburb": "North Sydney", "State": "NSW", "Postcode": "2000", "Country": "Australia", "Notes" : "" }, "Dropoff": { "ContactName": "Jane Smith", "Email": "test@test.com", "Phone": "0000 0000", "UnitNumber": "ACME Co.", "StreetNumber": "123", "Street": "Main St", "Suburb": "North Sydney", "State": "NSW", "Postcode": "2000", "Country": "Australia", "Notes" : "" } }
Response
Success:
{ "reference": "Z20180101999999", "price": 42.0, "tracking-link": "https://track.zoom2u.com/A1B2C3D4E", "trackingCode": "A1B2C3D4E" }
If information is missing:
{ "message": "The request is invalid.", "modelState": { "getQuoteRequest.Pickup.Suburb": [ "The Suburb field is required." ], "getQuoteRequest.Pickup.Postcode": [ "The Postcode field is required." ], } }
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" }
Cancelling a booking
More information, and a complete breakdown, on how to cancel a booking, head here: Cancelling a booking.
Endpoint
Method | Endpoint | Notes |
---|---|---|
POST | https://api.zoom2u.com/api/v1/delivery/cancel/{reference} | {reference} is the Zoom2u booking reference that would have been provided in the HTTP Response when the booking was created. |
Request
The body of the request should be left empty.
Response
Success:
A successful request will result in a HTTP 200 (OK) Status Return.
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" }