Webhook Reference
Was this helpful?
Was this helpful?
This endpoint describes the structure of the payload sent to your configured webhook when a delivery status update occurs. It is not an actual callback trigger. The format of the data is defined in the CallbackDeliveryPayload schema. Your webhook must be capable of accepting POST requests with this structure.
POST /webhook/callback-example HTTP/1.1
Host: test.swooveapi.com
Accept: */*
Example payload structure
{
"success": true,
"code": 200,
"message": "Delivery Update Callback",
"responses": [
{
"pickup": {
"type": "text",
"value": "text",
"contact": {
"name": "text",
"mobile": "text",
"email": "text"
},
"country_code": "text",
"lat": 1,
"lng": 1,
"location": "text"
},
"dropoff": {
"type": "text",
"value": "text",
"contact": {
"name": "text",
"mobile": "text",
"email": "text"
},
"country_code": "text",
"lat": 1,
"lng": 1,
"location": "text"
},
"return_contact": {
"coordinates": [
1
]
},
"full_price": {
"discount": 1,
"value": 1,
"currency_code": "text",
"currency_symbol": "text",
"currency_name": "text"
},
"contact": {
"name": "text",
"mobile": "text",
"email": "text"
},
"return_delivery": true,
"return_reason": "text",
"distance": 1,
"individual_pricing_id": "text",
"status": "PENDING",
"instructions": "text",
"reference": "text",
"start_time": 1,
"end_time": 1,
"time_completed": 1,
"items": [
{
"itemName": "text",
"itemQuantity": 1,
"itemCost": 1,
"description": "text",
"itemWeight": 1,
"is_fragile": true,
"dimensions": {
"x": 1,
"y": 1,
"z": 1
}
}
],
"tracking_code": "text",
"delivery_code": "text",
"secret_code": "text",
"createdAt": "text",
"updatedAt": "text",
"tracking_link": "text",
"proof_of_delivery": {
"location": {
"latitude": 1,
"longitude": 1,
"address": "text"
},
"_id": "text",
"delivery_id": "text",
"image_url": "https://example.com",
"mobile": "text",
"name": "text"
},
"agent_details": {
"agent_first_name": "text",
"agent_last_name": "text",
"agent_mobile": "text",
"agent_picture": "text",
"license_type": "text",
"license_number": "text",
"license_expiry": 1
},
"agency_details": {
"name": "text",
"mobile_number": "text",
"logo": "text",
"rating": 1,
"location": {
"country_code": "text",
"latitude": 1,
"longitude": 1,
"city": "text",
"country": "text"
}
},
"vehicle_details": {
"brand": "text",
"model": "text",
"color": "text",
"picture": "text",
"license_plate_number": "text",
"insurance_provider": "text"
}
}
]
}