Conducting End-To-End Test

NOTE: Examples of JSON payloads for all the API Calls can be found in the API Calls section.

Happy Path

  1. In your Sandbox, under Webhooks, enter in the endpoint URL for "Delivery Created".
  2. Make sure that when a request hits this endpoint, it returns a "delivery_id" value in the response. If we don't receive this in response, then the order will not be assigned to your fleet. See documentation here.
  3. On the "Dispatch" screen, click the "Create Order" button. After a few moments, you should see an order appear.
  4. Assign the order to your fleet (it will be the only fleet option available). By assigning an order to your fleet, this will trigger the Delivery Created webhook.
  5. In response, send your Delivery ID.
  6. In order to assign a driver to an order, send the Assign Order API call.
  7. To mark the order as started, send the Start Order API call.
  8. Send driver location updates using the Update Driver Location API call.
  9. To indicate that the driver has arrived on site, send the "Check In / Driver Arrived" API call.
  10. To indicate that the driver has left, send the Check Out / Driver Left API call. This will complete the first way point.
  11. The driver will automatically be marked as on the way to the second way point (customer).
  12. Check the driver in on arrival to the customer.
  13. If the driver has collected a signature, taken a photo or written a note, send the Create Note / Add POD API call (Proof of Delivery).
  14. Checking the driver out on the 2nd way point will automatically complete the order.

Canceling a Delivery

  1. At any stage in the process above, send a Cancel Order API call.

What’s Next

Once you have conducted end-to-end tests successfully, you are ready to be certified.