Quick Start Guide

Quick Start Guide

Get your first delivery created in under 5 minutes.

1. Authentication

All API requests require your API key in the Authorization header:

Bash
"token command">Authorization: Bearer YOUR_API_KEY

2. Create a Delivery

Send a POST request to create a new delivery:

cURL
"token command">curl "token flag">-X POST https://api.deliveryservice.com/api/v1/deliveries \
  "token flag">-H "Authorization: Bearer your_api_key_here" \
  "token flag">-H "Content-Type: application/json" \
  "token flag">-d '{
    "orderId": "ORDER-12345",
    "pickupAddress": {
      "street": "123 Restaurant St",
      "city": "London",
      "postcode": "SW1A 1AA",
      "coordinates": { "lat": 51.5014, "lng": "token flag">-0.1419 }
    },
    "deliveryAddress": {
      "street": "456 Customer Ave",
      "city": "London",
      "postcode": "E1 6AN",
      "coordinates": { "lat": 51.5155, "lng": "token flag">-0.0722 }
    },
    "customerName": "John Smith",
    "customerPhone": "+447123456789",
    "orderTotal": 25.99,
    "items": [
      { "name": "Margherita Pizza", "quantity": 1 },
      { "name": "Garlic Bread", "quantity": 2 }
    ]
  }'

3. Response

A successful response includes the delivery ID and tracking URL:

JSON
{
  "id": "del_abc123xyz",
  "orderId": "ORDER-12345",
  "status": "PENDING",
  "trackingUrl": "https://track.deliveryflow.fpontes.com/ORDER-12345",
  "estimatedPickup": "2024-01-15T12: 30: 00Z",
  "estimatedDelivery": "2024-01-15T13: 00: 00Z",
  "createdAt": "2024-01-15T12: 15: 00Z"
}

4. Track the Delivery

Share the trackingUrl with your customer. They'll see real-time updates including driver location, status, and ETA.

Next Steps