Skip to main content
This walkthrough creates a delivery in the sandbox. Nothing here dispatches a real rider or charges money. You will make four requests:
  1. Ask for a delivery quote.
  2. Create a simulated delivery.
  3. Move it to the assigned status.
  4. Read its current status and event history.
Run each command in a terminal. Lines beginning with export save a value only for that terminal window.

1. Copy your test key

In the developer portal, create an application and then create a test key. Copy the full key when it appears; it is shown only once. Replace paste_your_complete_test_key_here below, then run both lines:
Your key must begin with hsg_test_key_. Keep the quotation marks.

2. Calculate a quote

This request asks, “What would a bike delivery between these two coordinates cost?” It does not create a delivery, so it does not need an idempotency key.
You should receive a response shaped like this:
Your exact distance_km may differ slightly. A sandbox trip over 15 km returns "requires_custom_quote": true and "fee": null.
If you receive INVALID_API_KEY, make sure you copied the entire key and included Bearer before it. If you receive ENVIRONMENT_MISMATCH, you used a live key with the sandbox URL or a test key with the live URL.

3. Create a delivery

This example creates the recipient and address inside the delivery request. HaulStow returns reusable recipient and address IDs in the response. The Idempotency-Key value identifies this one create action. If the command times out, run the same command with the same key. HaulStow will return the first result instead of creating a duplicate.
The response contains a delivery ID beginning with dlv_:
Copy the complete data.id value and save it in your terminal:
Replace the example ID with the one from your response.

4. Trigger a sandbox event

Real deliveries change status when HaulStow operations and riders do their work. In the sandbox, you trigger those changes yourself. Move the delivery from booked to assigned:
The next valid states are:
Move one step at a time. Skipping from assigned directly to delivered returns SANDBOX_TRANSITION_INVALID.

5. Check the delivery

Get the latest delivery snapshot:
Get its complete public event history:
If you configured a webhook endpoint, every accepted sandbox transition also queues a signed webhook. The payload and signature format are the same in live mode.

You are ready for the next step

You now know the basic request flow. Next: