Quiver
Track delivery
Documentation contents

Errors, retries and pagination

Errors and retries

If a booking times out or its outcome is unclear, first look it up by the original merchantOrderId.

curl --silent --show-error --fail-with-body --get "$BASE_URL/task/deliveries" \
  -H "x-api-key: $QUIVER_API_KEY" \
  --data-urlencode "merchantOrderId=$ORDER_ID"
Result What to do
Booking already exists If HTTP 400 includes an existing taskId in error, retrieve that task and continue with it.
Other 400 Correct the request. Check for an existing booking first if the error says creation is already in progress.
401 or 403 Check the key and your merchant account’s access.
404 Check the resource ID and the merchant that owns it.
409, 429 or a transient 5xx Reconcile uncertain writes, then use bounded backoff where retrying makes sense. Keep the same order ID.

Keep the original basket and order reference when retrying an uncertain booking. If Quiver reports creation is still in progress, wait briefly and look it up again. Requote after a checkout delay or any change to the basket or address.

Capture diagnostic information

Save the HTTP status, response body, UTC timestamp and any request ID returned with the error. Keep merchant keys and customer data out of logs and support tickets. For example, an empty quote payload can return HTTP 400:

{"error":"request: order or delivery must be provided"}

Contact Quiver if a request keeps failing after correction. Include the method and path, error text, request ID if present, and your non-sensitive order reference.

Retrieve a page of deliveries

On the delivery list, pageToken is a one-based page number. Start at page 1. Keep the page size and any date or status filters fixed across requests. The example uses count=true to request the total count.

curl --silent --show-error --fail-with-body --get \
  -H "x-api-key: ${QUIVER_SANDBOX_API_KEY:?Set your Sandbox API key}" \
  'https://api.quiver.london/task/deliveries' \
  --data-urlencode 'pageSize=25' \
  --data-urlencode 'pageToken=1' \
  --data-urlencode 'count=true'

If more records remain, repeat with pageToken=2, then increment the page number. Stop when you reach the reported count or a page has fewer than 25 records. Treat an omitted or empty deliveries collection as empty. For a sync that spans several requests, deduplicate by taskId and keep an overlap on updatedAfter so records changed during the sync are picked up. Check pagination on each endpoint before applying this pattern elsewhere.

How We Work
Pricing
Reviews
Become a Courier
Jobs
3
Developers