GreenDrive GDD API v1
GDD API · Reference

Zero-emission delivery,
built for developers.

Plug GreenDrive Delivery's 100% electric two-wheeler fleet into your platform with a handful of REST calls. Check serviceability, create orders, track riders in real time, and cancel — all over a clean, predictable HTTPS JSON API.

4
Endpoints
100%
EV Fleet
0g
CO₂ / km
v1
Stable

Base URLs

Two environments are available. Use development for testing and integration, and move to production only after end-to-end validation.

Base URL https://dev-api.greendrivedelivery.com/api
Purpose
Testing & QA
Real charges
No (sandbox)
Rate limit
Relaxed
Base URL https://agency.greendrivedelivery.com/api
Purpose
Live orders
Real charges
Yes
Rate limit
Enforced
i
Switching tabs above also updates the DEV / PROD environment globally — every code sample and "Try It" panel on this page reflects your selection.
Section 01

Authentication

All endpoints are authenticated using an API key issued by the GreenDrive onboarding team. Pass the key in the x-api-key header on every request.

Required Headers

HeaderValueRequired
x-api-keyTokenYes
Content-Typeapplication/jsonYes
!
Never expose your x-api-key in client-side JavaScript, mobile bundles, or public repositories. Always proxy requests through your backend.
Endpoint 01

Service Availability

Check whether GreenDrive can service a delivery between two locations and retrieve an estimated fare — base charge, GST, total, distance, duration, and the recommended vehicle's max capacity.

POST https://dev-api.greendrivedelivery.com/api/services/service-availability

Request Parameters

startAddress

FieldTypeRequiredDescription
addressStringYesPickup address
latitudeNumberYesPickup latitude
longitudeNumberYesPickup longitude

endAddress

FieldTypeRequiredDescription
addressStringYesDelivery address
latitudeNumberYesDelivery latitude
longitudeNumberYesDelivery longitude

deliveryDetails

FieldTypeRequiredDescription
specialInstructionsStringYesDelivery instructions
itemsArrayYesParcel item details

items[]

FieldTypeRequiredDescription
cargoTypeStringYesType of cargo
weightNumberYesWeight in KG
lengthNumberYesLength in CM
breadthNumberYesBreadth in CM
heightNumberYesHeight in CM

Try It

Run a request
Click Send Request to see the response

Success Response · 200

200 OK
{
  "estimatedFare": {
    "totalFare": 107,
    "baseCharge": 102,
    "subtotal": 107,
    "totalGST": 0,
    "currency": "INR",
    "distance": 16.769,
    "duration": 2348,
    "vehicleType": "2W",
    "waitingMinutes": 0,
    "extraWaitingCharge": 0,
    "maxCapacity": {
      "weight": 10,
      "length": 40,
      "width": 25,
      "height": 40,
      "items": 2
    }
  }
}

Error Responses

400 Validation Error
{
  "error": "Validation Error",
  "message": "Start Latitude is required"
}
404 / 422 Service Not Available
{
  "error": "SERVICE_NOT_AVAILABLE",
  "message": "No delivery service available for the selected route"
}
500 Internal Server Error
{
  "error": "Internal Server Error",
  "message": "Unexpected server error"
}
Endpoint 02

Create Order

Create a delivery order and dispatch it to an available EV rider. The system validates the request, generates a unique id (e.g. ORD-0321), and returns the full booking record.

POST https://dev-api.greendrivedelivery.com/api/orders/create-order

Root Fields

FieldTypeRequiredDescription
triptypeStringYesMust be delivery
partner_order_idStringYesUnique order reference from partner
tripStartDateISO DateYesPickup date and time (ISO 8601)
paymentTypeStringYesCOD, UPI, or Wallet

startAddress (Pickup)

FieldTypeRequired
addressStringYes
latitudeNumberYes
longitudeNumberYes
contactNameStringYes
phoneNumberStringYes
pincodeStringYes
i
Phone Number Format: Must start with +91 and be a valid Indian mobile number — e.g. +919876543210.

endAddress (Delivery)

FieldTypeRequired
addressStringYes
latitudeNumberYes
longitudeNumberYes
contactNameStringYes
phoneNumberStringYes
pincodeStringYes

deliveryDetails

FieldTypeRequired
specialInstructionsStringNo
itemsArrayYes

items[]

FieldTypeRequired
cargoTypeStringYes
weightNumberYes
lengthNumberYes
breadthNumberYes
heightNumberYes
imagesArrayNo

images[]

FieldTypeRequired
base64StringStringYes
fileTypeStringYes
i
Supported image types: image/jpeg, image/jpg, image/png, image/gif, image/webp, image/bmp, image/svg+xml.

Try It

Run a request
Click Send Request to see the response

Success Response

i
The response is returned as an array containing one order object.
Success
[
  {
    "id": "ORD-0321",
    "status": "Not assigned",
    "triptype": "delivery",
    "tripStartDate": "2026-03-23T02:30:00.000Z",
    "startAddress": {
      "address": " Coimbatore Railway Station ",
      "latitude": 13.046281,
      "longitude": 80.115179,
      "contactName": "Pratheesh",
      "phoneNumber": "+919342798869"
    },
    "endAddress": {
      "address": " Chennai Central Railway Station ",
      "latitude": 13.0425934,
      "longitude": 80.1236897,
      "contactName": "Pratheesh",
      "phoneNumber": "+917824024171"
    },
    "deliveryDetails": {
      "specialInstructions": "",
      "items": [
        {
          "cargoType": "GLW-GLASSWARE x 2",
          "weight": 8,
          "length": 10,
          "breadth": 12,
          "height": 10,
          "images": []
        }
      ]
    }
  }
]

Validation Errors

Invalid Phone Number
{
  "error": "Validation Error",
  "message": "Phone number must start with +91 and be a valid Indian mobile number"
}
Missing Partner Order ID
{
  "error": "Validation Error",
  "message": "Partner order ID is required"
}
Invalid Payment Type
{
  "error": "Validation Error",
  "message": "Payment type must be COD or UPI or Wallet"
}
Endpoint 03

Order Tracking

Fetch the latest tracking snapshot for an order — current status, assigned rider, and live coordinates. For real-time, push-based updates, use webhooks instead of polling.

POST https://dev-api.greendrivedelivery.com/api/orders/order-tracking

Request Parameters

FieldTypeRequiredDescription
order_numberStringYesSystem-generated order number

Try It

Run a request
Click Send Request to see the response

Success Response · 200

200 OK
{
  "success": true,
  "message": "Order tracking fetched successfully",
  "data": {
    "order_number": "ORD-0321",
    "status": "Assigned",
    "rider_name": "Ramesh Kumar",
    "rider_phone": "9876543210",
    "latitude": 13.046281,
    "longitude": 80.115179
  }
}

Response Fields

FieldDescription
order_numberSystem-generated order number
statusCurrent order status
rider_nameAssigned rider name
rider_phoneAssigned rider mobile number
latitudeRider's current latitude
longitudeRider's current longitude

Error Responses

404 Order Not Found
{
  "success": false,
  "message": "Order not found"
}
400 Validation Error
{
  "success": false,
  "message": "Order number is required"
}
500 Internal Server Error
{
  "success": false,
  "message": "Internal server error"
}
Endpoint 04

Cancel Order

Cancel an existing order if it has not yet started. Orders can only be cancelled when their current status is one of:

Pending
Assigned
Arrived_At_Pickup
POST https://dev-api.greendrivedelivery.com/api/orders/cancel-order

Request Parameters

FieldTypeRequiredDescription
order_numberStringYesSystem-generated order number
cancel_reasonStringYesReason for cancellation

Try It

Run a request
Click Send Request to see the response

Success Response · 200

200 OK
{
  "success": true,
  "message": "Order cancelled successfully"
}

Error Responses

400 Validation Error
{
  "success": false,
  "message": "Order number is required"
}
400 Validation Error
{
  "success": false,
  "message": "Cancel reason is required"
}
404 Order Not Found
{
  "success": false,
  "message": "Order not found"
}
409 Already Cancelled
{
  "success": false,
  "message": "Order is already cancelled"
}
409 Already Started
{
  "success": false,
  "message": "Order Already Started"
}
500 Internal Server Error
{
  "success": false,
  "message": "Internal server error"
}
!
Orders cannot be cancelled after pickup operations have started (status moves beyond Arrived_At_Pickup).
Integration · Push events

Webhook Configuration

GDD sends real-time order status updates to your configured webhook URL. Whenever an order status changes, GDD sends an HTTP POST request to your registered endpoint — eliminating the need to poll the tracking API.

Why webhooks matter

Real-time updates

Status changes reach you within seconds. No cron jobs, no polling delays.

Lower API load

Stop calling the tracking endpoint every few seconds — reduce your outbound traffic by 90%+.

Better customer UX

Trigger SMS, email, or push notifications the instant something happens.

Reliable reconciliation

Every event carries the order ID and new status — build idempotent handlers and never lose a state change.

Request

PropertyValue
MethodPOST
Content-Typeapplication/json

Payload Example

POST → your-server/webhooks/gdd
{
  "id": "ORD-0321",
  "status": "Assigned",
  "startAddress": {
    "address": "Chennai Central Railway Station",
    "latitude": 13.0827,
    "longitude": 80.2707,
    "contactName": "John Doe",
    "contactNumber": "+919876543210"
  },
  "endAddress": {
    "address": "Coimbatore Railway Station",
    "latitude": 11.0168,
    "longitude": 76.9558,
    "contactName": "David",
    "contactNumber": "+919876543211"
  },
  "driver": {
    "name": "Ramesh Kumar",
    "phone": "+919876543212",
    "latitude": 13.0851,
    "longitude": 80.2720,
    "is_online": true
  }
}

Expected Response

Your webhook handler must acknowledge receipt by returning the following JSON response with HTTP status 200 OK:

200 OK
{
  "success": true
}

Order Status Values

The status field in webhook payloads (and in tracking responses) can take any of these values:

Pending
Assigned
Arrived_At_Pickup
Picked_Up
Out_For_Delivery
Arrived_At_Delivery_Location
Delivered
Cancelled
Return_Initiated
RTO_Delivered
RTO_Failed

Best Practices

Webhook implementation checklist

  • Use HTTPS only. Plain HTTP endpoints will not be accepted.
  • Respond fast. Acknowledge with HTTP 200 within a few seconds — push heavy work (DB writes, notifications) into a background queue.
  • Be idempotent. The same order status can in rare cases arrive more than once — guard against double-processing using id + status.
  • Honor the status order. Don't downgrade — if you've already recorded Delivered, ignore a late Out_For_Delivery.
  • Log raw payloads for at least 30 days for debugging and reconciliation.
  • Whitelist GDD IPs at your firewall once shared by the support team.
  • Test in DEV first. Use a tunneling tool like ngrok or Cloudflare Tunnel to receive events on localhost.
i
Webhook URLs are configured manually by the GreenDrive onboarding team. Email support@greendrivedelivery.com with your HTTPS endpoint to enable status push notifications.
Help · Section 02

Support

Stuck on an integration? Our team replies during business hours and prioritises production-blocking issues. Pick whichever channel suits you.

Office Hours

9:30 AM – 6:30 PM IST
Monday – Saturday

Office Address

GreenDrive Delivery Pvt. Ltd.
[Address to be updated]

What to include when you reach out

A complete report lets us help on the first reply. Please share:

  • Your account name or API key prefix (never the full key)
  • Environment — Development or Production
  • Endpoint being called (e.g. /orders/create-order)
  • Full request payload (redact PII if needed)
  • Full response body including status code
  • Timestamp of the request in IST
  • Order ID or partner_order_id if applicable
  • Steps to reproduce the issue
!
Phone, WhatsApp, and office address values above are placeholders — please replace with GreenDrive's real contact details before publishing.
Get in touch · Section 03

Contact Us

Drive cleaner. Deliver faster.

Interested in onboarding GreenDrive's EV fleet for your business, exploring volume pricing, or discussing a custom integration? Talk to our team — we typically respond within one business day.

Business Enquiries

support@greendrivedelivery.com

Call Sales

+91 9908616865

WhatsApp

wa.me/91 9908616865

Visit Us

GreenDrive Delivery Pvt. Ltd.
GREEN DRIVE AUTO SERVICES PRIVATE LIMITED KHATA NO BBMP/CMC PID NO 368/327/52/2, LBT BUILDING NO 2MUNICIPAL NO 52/2, HEBBAGODI OPP HUSKUR GATE, ELECTRONIC CITY POST, HOSUR MAIN ROAD, Bengaluru, Bengaluru Rural, Karnataka, 560100

i
For technical integration support, head to the Support section above and follow the checklist for the fastest possible response.