Payload
The creation process starts with an integrator sending a payload with information about the delivery that needs to be created.
More info can be found here:
https://wumdrop.readme.io/docs/place-a-delivery
Example of a payload sent through to WumDrop.
{
"dropoff_address":"56 ocean view, seapoint",
"dropoff_contact_name":"Bianca",
"dropoff_contact_phone":"0760 714429",
"dropoff_remarks":null,
"order_reference":"2000089128123",
"pickup_address":"16 ocean view, seapoint",
"pickup_contact_name":"Receiver Name",
"pickup_contact_phone":"0760714429",
"customer_identifier": null,
"items":[{"weight":18,"price":10,"height":0.78,"width":0.55,"length":1.335,"quantity":1}]
}
The delivery database record is then populated with those fields specified in the payload.
Duplications
Notice the order_reference field in the payload above, this field needs to be unique, meaning no two deliveries may have the same order reference in our database.
Geo-coding and addresses
If no pickup_coordinates or dropoff_coordinates are not supplied, we geocode (convert text address to GPS coordinates) the pickup_address and dropoff_address using the Google Maps API.
Once we have received the coordinates we check if the coordinates lie within our area of operation.