Burq API V2 (Alpha)
Base URL: https://api.burqup.com/v2
Overview
Dispatch the route using the selected provider quote. This initiates the delivery process and assigns the route to the selected provider. Once dispatched, the route status will change from draft to dispatched, and the delivery process begins.
This is Step 5 of 5 in the complete delivery flow:
- Create Orders - Create one or more delivery orders
- Create Route - Group orders into a multi-stop delivery route
- Request Quote - Request pricing quotes from available providers
- Pick Provider - Retrieve and select a provider quote
- Dispatch ← You are here
Prerequisites
Before dispatching, ensure you have:
- Completed Step 4: Pick Provider
- The route ID from Step 2
- The quote ID from Step 4
- The route must be in
draftstatus - The quote must not be expired
Endpoint Details
Endpoint: POST /v2/routes/{route_id}/quotes/{route_quote_id}/dispatch
Operation ID: DispatchRoute
API Reference: Dispatch Route
Request
Headers
| Header | Value | Required |
|---|---|---|
Content-Type | application/json | Yes |
x-api-key | Your API key | Yes |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
route_id | string | Yes | The route ID from Step 2 |
route_quote_id | string | Yes | The quote ID from Step 4 |
Request Body
No request body is required for this endpoint.
Example Request
curl -X POST "https://api.burqup.com/v2/routes/route_xyz789/quotes/quote_abc123/dispatch" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY"Response
Success Response (200 OK)
{
"job_id": "job_dispatch_456",
"object": "job"
}Important:
- This endpoint returns immediately with a
job_id - Route dispatch happens asynchronously
- The route status will change from
drafttodispatchedonce processing completes - You can check the route status using
GET /v2/routes/{route_id}
Response Fields
| Field | Type | Description |
|---|---|---|
job_id | string | Unique identifier for the asynchronous dispatch job |
object | string | Always "job" |
Post-Dispatch Actions
After dispatching, the route enters the delivery process:
- Route Status - Changes from
drafttodispatched - Provider Assignment - Route is assigned to the selected provider
- Driver Assignment - A driver may be assigned (if available)
- Delivery Tracking - You can track delivery progress via webhooks or API polling
Monitoring Route Status
After dispatch, monitor the route status:
curl -X GET "https://api.burqup.com/v2/routes/route_xyz789" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY"The route status will progress through various states:
draft→dispatched→in_progress→completed(or error states)
Error Handling
Common errors when dispatching:
route_quote_account_mismatch- Merchant account cannot be different from the merchant account used to generate the provided route quoteroute_quote_already_expired- Provided route quote is already expiredroute_not_found_in_dm- Route not found in Driver Managementorders_not_found- Some of the orders provided do not existorder_part_of_another_route- Some orders are already part of another routeroute_order_already_initiated- Some orders are already initiatedorders_mismatch_with_stops- The number of stops are lesser than the number of orders pickups and drop-offsmerchant_account_id_mismatch- All orders do not belong to the same accountpickup_address_not_same- Pickup address is not same for all orderslesser_than_minimum_stops- There should be at least 2 stops in a route
See Error Handling for detailed error information.
Best Practices
- Dispatch promptly - Quotes may expire; dispatch soon after selection
- Verify route status - Check route status before dispatching
- Monitor after dispatch - Track route and order status after dispatch
- Handle errors gracefully - Implement retry logic for transient errors
- Use webhooks - Configure webhooks for real-time delivery updates
- Track job_id - Keep the job_id for tracking (optional, route_id is sufficient)
Next Steps After Dispatch
After successfully dispatching a route:
- Monitor Route Status - Use
GET /v2/routes/{route_id}to track progress - Track Individual Orders - Use
GET /v2/orders/{order_id}for order-specific updates - Handle Webhooks - Process webhook notifications for real-time updates
- Update Routes - Use route management endpoints if changes are needed
Complete Flow Summary
Congratulations! You've completed the full delivery flow:
1. Create Order(s)
POST /v2/orders
→ Saved order IDs
2. Create Route
POST /v2/routes
→ Saved route ID
3. Request Quote
POST /v2/routes/{route_id}/quotes
→ Quote generation initiated
4. Pick Provider
GET /v2/quotes/{route_id}
→ Saved quote ID
5. Dispatch
POST /v2/routes/{route_id}/quotes/{route_quote_id}/dispatch
→ Route dispatched! ✅
Related Documentation
- Step 4: Pick Provider - Previous step
- Route V2 APIs - Complete route management guide
- Order V2 APIs - Complete order management guide
- Error Handling - Error codes and handling
