321 Delivery API
API for managing deliveries
API for managing deliveries
Create a new delivery
Unique ID generated by the caller for the delivery.
Specifies the urgency of the delivery:
on_demand: Immediate delivery.time_window: Delivery within a specified time window, at least 2 hours from now.scheduled: Delivery scheduled for a future date and time.
Merchant warehouse ID for pickup.
If this field is set, it will override all other pickup fields
(e.g., pickup_address, pickup_latitude, pickup_longitude, pickup_name, pickup_phone_number)
except for pickup_instructions.
Full address for pickup.
Latitude coordinate for pickup location.
Longitude coordinate for pickup location.
Optional name of the pickup location.
Phone number for pickup, in E.164 format.
Instructions for the courier at pickup.
Full address for dropoff.
Latitude coordinate for dropoff location.
Longitude coordinate for dropoff location.
Optional name of the dropoff location.
Phone number for dropoff, in E.164 format.
Instructions for the courier at dropoff.
Specifies the delivery action:
meet_at_door: Meet at the door delivery.leave_at_door: Contactless delivery where the courier leaves the package at the door.Pickup ready time in ISO-8601 format. Used primarily for precise scheduled deliveries. If this field is set, it will override pickup_window
Pickup time window with a start and end time in ISO-8601 format. Used primarily for scheduled deliveries.
Dropoff time window with a start and end time in ISO-8601 format. Used primarily for scheduled deliveries.
Additional metadata related to the delivery.
curl --request POST \
--url https://deliveryapi-i4bl6pegoq-ew.a.run.app/v1/createDelivery \
--header 'Content-Type: application/json' \
--data '{
"external_id": "",
"urgency_level": "on_demand",
"dropoff_address": "",
"dropoff_latitude": 1,
"dropoff_longitude": 1,
"dropoff_name": "",
"dropoff_phone_number": "",
"deliverable_action": "meet_at_door",
"pickup_window": {},
"dropoff_window": {},
"metadata": {}
}'
{
"delivery_id": "…",
"status": "…",
"warnings": [
"…"
]
}Delivery successfully created