Estimates
Create estimates for a delivery
Last updated
Was this helpful?
Create estimates for a delivery
Last updated
Was this helpful?
Bulk Delivery Estimate Body Sample And Schema
Array of deliveries to create an estimate for
Delivery Estimates Found
status of request true for success and false for failed request
code for reason for failure
const response = await fetch('https://test.swooveapi.com/bulk-estimate/create-bulk-estimate?app_key=text', {
method: 'POST',
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"delivery_list": [
{
"pickup": {
"type": "text",
"contact": {
"name": null,
"mobile": "text",
"email": null
},
"country_code": "GH",
"lat": null,
"lng": null,
"location": null
},
"dropoff": {
"type": "text",
"contact": {
"name": null,
"mobile": "text",
"email": null
},
"country_code": "GH",
"lat": null,
"lng": null,
"location": null
},
"items": [],
"vehicle_type": "MOTORCYCLE"
}
]
}),
});
const data = await response.json();
{
"success": true,
"code": 200,
"message": "Estimate completed",
"responses": {
"optimal_estimate": {
"estimate_type_details": {
"name": "Today",
"icon": "text"
},
"total_pricing": {
"discount": 0,
"value": 0,
"currency_code": "GHS",
"currency_symbol": "₵",
"currency_name": "Ghanaian cedi"
},
"time_string": "Pickup and Delivery Tomorrow (8:00am - 04:00pm)",
"estimate_id": "text",
"selected_estimate_link": "text",
"individual_pricing": [
{
"pickup": {
"type": "text",
"contact": {
"name": null,
"mobile": "text",
"email": null
},
"country_code": "GH",
"lat": null,
"lng": null,
"location": null
},
"dropoff": {
"type": "text",
"contact": {
"name": null,
"mobile": "text",
"email": null
},
"country_code": "GH",
"lat": null,
"lng": null,
"location": null
},
"items": [],
"vehicle_type": "MOTORCYCLE",
"price_details": {
"discount": 0,
"value": 0,
"currency_code": "GHS",
"currency_symbol": "₵",
"currency_name": "Ghanaian cedi"
},
"delivery_type": "SHARED"
}
]
},
"estimates": [
{
"estimate_type_details": {
"name": "Today",
"icon": "text"
},
"total_pricing": {
"discount": 0,
"value": 0,
"currency_code": "GHS",
"currency_symbol": "₵",
"currency_name": "Ghanaian cedi"
},
"time_string": "Pickup and Delivery Tomorrow (8:00am - 04:00pm)",
"estimate_id": "text",
"selected_estimate_link": "text",
"individual_pricing": [
{
"pickup": {
"type": "text",
"contact": {
"name": null,
"mobile": "text",
"email": null
},
"country_code": "GH",
"lat": null,
"lng": null,
"location": null
},
"dropoff": {
"type": "text",
"contact": {
"name": null,
"mobile": "text",
"email": null
},
"country_code": "GH",
"lat": null,
"lng": null,
"location": null
},
"items": [],
"vehicle_type": "MOTORCYCLE",
"price_details": {
"discount": 0,
"value": 0,
"currency_code": "GHS",
"currency_symbol": "₵",
"currency_name": "Ghanaian cedi"
},
"delivery_type": "SHARED"
}
]
}
]
}
}